| Stateflow | ![]() |
Executing an Active State
Active states that receive an event that does not result in an exit from that state execute a during action to completion if a during action is specified for that state. An on event_name action executes to completion when the event specified, event_name, occurs and that state is active. An active state executes its during and on event_name actions before processing any of its children's valid transitions. During and on event_name actions are processed based on their order of appearance in the state label.
The execution steps for executing a state that receives an event while it is active are as follows:
During actions and valid on event name actions are preformed.
| Entering a State | Exiting an Active State | ![]() |