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