0

One way to change states is by connecting a transition from the source state to the destination state. I was wondering if there’s a way to transition to another state by calling a function or by changing some state property. The idea here is that I have a state flow sub chart that needs to connect to many different states in the main chart. Before jumping into the sub chart, I would like to save the next state in a variable and set to that state on exit of the sub chart . My desired behavior:

Name: Last_State_In_Subchart
Entry:SetNextState(SavedState);

Is there a way to do this?

Amjad
  • 70
  • 6
  • You can `send` events, there are implicit events, or you can use messages with some logic. There are many different approaches possible. At least, it probably becomes easier when using parallel charts. – MonkeyProof Solutions Sep 19 '22 at 17:14
  • If you assign the output of `SetNextState` to a local variable then you can use the value of that variable within the conditions on each of exit connections to determine which one is taken. – Wolfie Sep 20 '22 at 09:34

0 Answers0