| Stateflow |     ![]()  | 
Default Transition in Exclusive (OR) Decomposition Example
This example shows a transition from an OR state to a superstate with exclusive (OR) decomposition, where a default transition to a substate is defined.
Initially the Stateflow diagram is asleep. State A is active. Event E_one occurs and awakens the Stateflow diagram. Event E_one is processed from the root of the Stateflow diagram down through the hierarchy of the Stateflow diagram:
E_one. There is a valid transition from state A to superstate B.
A exit actions (exitA()) execute and complete.
A is marked inactive.
A, is executed and completed. 
B is marked active.
B entry actions (entB()) execute and complete.
B detects a valid default transition to state B.B1.
B.B1 is marked active.
B.B1 entry actions (entB1()) execute and complete.
This sequence completes the execution of this Stateflow diagram associated with event E_one when state A is initially active.
   | Default Transition Examples | Default Transition to a Junction Example | ![]()  |