Event processing
This section describes how events are handled. If you are interested in how to create events you can read about it here.
yasmine handles events according to the following scheme:
Search for initial transition(s)
When the state machine starts running initial transitions are searched in the root state's regions.
Execute transition
The found transitions are executed (details).
Search transitions emanating from choices
If transition execution stopped at a choice (or choices), get the emanating transitions.
Search completion transitions
Check if any state that is complete has a completion transition. Collect those.
Search transition(s) for event
Search enabled transitions for the current event. Also check for deferred events. See Transition search for more details.
Wait for events
Just wait for new events to occur...