Can a webflow's action state have multiple redirects on success?
Posted
by callie16
on Stack Overflow
See other posts from Stack Overflow
or by callie16
Published on 2010-06-10T08:09:35Z
Indexed on
2010/06/10
8:12 UTC
Read the original article
Hit count: 189
Say, I have this type of webflow:
def myFlow = {
state1 {
}
on("next").to("stateAct")
stateAct {
action {
... DB stuff ...
}
}
on("success").to("state2")
state2 {
}
on("prev").to("state1")
}
Now, the contents of "stateAct" is common between state1 and state2. Meaning, if I press "next" from state1, I need to pass by stateAct before I can go to state2 (which is the current implementation) and if I press "prev" in state2, I need it to pass by stateAct before it goes to state1. Obviously, in the sample webflow above, it doesn't do the latter.
So, my question is, is there a way to detect in stateAct who called it (state1 or state2) so that I can redirect accordingly on "success"? Or something similar to that behavior?
Thanks!
-Lee
© Stack Overflow or respective owner