Specifying the Substates a Statechart Must Be in before Exiting the Superstate (Statechart Module)
- Updated2023-02-21
- 2 minute(s) read
You can specify that the statechart must be in multiple substates before the statechart can exit a particular superstate. These substates must be in different orthogonal regions, such as the following figure shows.

In the previous figure, the statechart can move from State 1 to the Terminal pseudostate at any time. However, you might want to specify that the statechart must be in particular substates before the statechart can take this transition. You can specify this behavior by creating a single transition that exits multiple substates.
Complete the following steps to create a single transition that exits multiple substates.
- Place a Join
connector below the regions in State 1.
Add
- Create a transition from State 3 to the Join connector.
- Create a transition from State 5 to the Join connector.
- Create a transition from the Join connector to the outgoing port that connects to the Terminal pseudostate.
The statechart diagram now resembles the following figure.

In the previous figure, the statechart must be in both State 3 and State 5 before the statechart can exit State 1 and move to the Terminal pseudostate.