State done events
A state done event transitions from a parent state when one of its child states reaches its final state. State done events are labeled “onDone.”
In the video player above, when the video player reaches the Stopped state, the Opened state transitions through the onDone state done event to the Closed state.
How to add a state done event to a parent state
- Check the final child state has its state type set to Final. If the parent state doesn’t contain a final child state, the state done event type will not be available for transitions from the parent state.
- Select the parent state.
- Drag from the handles on the left, right and bottom sides of the selected state, and release to create a connecting transition, event and new state.
- Select the newly-created event. Then…
Using the quick actions menu
- Right-click the state to bring up the quick actions menu.
- Choose State done event from the Event type options.
Using the Transition details panel
- Open the Transition details panel from the right tool menu.
- Choose State done event from the Event type dropdown menu.