A history junction represents historical decision points in the Stateflow® chart. The decision points are based on historical data relative to state activity. Placing a history junction in a superstate indicates that historical state activity information is used to determine the next state to become active. The history junction applies only to the level of the hierarchy in which it appears.
Example of History Junctions
The following example uses a history junction:
Power_on has a history junction and contains two
substates. If state
Power_off is active and event
switch_on occurs, the system can enter
Power_on.High. The first time superstate
is entered, substate
Power_on.Low is entered because it has a default
transition. At some point afterward, if state
Power_on.High is active and
switch_off occurs, superstate
Power_on is exited
Power_off becomes active. Then event
switch_on occurs. Because
Power_on.High was the last
active substate, it becomes active again. After the first time
becomes active, the history junction determines whether to enter
See Default Transition and a History Junction for more information on the semantics of this notation.
History Junctions and Inner Transitions
By specifying an inner transition to a history junction, you can specify that, based on a specified event or condition, the active state is to be exited and then immediately reentered.
See Using an Inner Transition to a History Junction for an example of this notation.
See Inner Transition to a History Junction for more information on the semantics of this notation.