Final states
When a machine reaches the final state, it can no longer receive any events, and anything running inside it is canceled and cleaned up. The box with a surrounding border icon represents the final state.
A machine can have multiple final states or no final states.
In the video player below, Stopped is the final child state in the Opened state. When the video player is Stopped, the video player moves to its Closed state.
Make a state a final state
First, select the state you want to set as the final state.
On the canvas
- Right-click the state to open the edit menu.
- From the Type options, choose Final.
Using the state Details panel
- Select the state you want to set as the final state.
- Open the state Details panel from the right tool menu.
- From the type option, choose Final.
To set the state back as a normal state, follow the same steps and select the Normal type option.