Entering a single-region composite state

There are five ways to enter a single region composite state: default entry, explicit entry, shallow history entry, deep history entry, and entry point entry.

Entry method

Description

Default entry

Graphically, default entry is indicated by an incoming transition that terminates on the outside edge of the composite state. In this case, the default entry rule is applied. If there is a guard on the trigger of the transition, it must be enabled. A disabled initial transition is an error. The entry action of the composite state is executed before the action associated with the initial transition.

Explicit entry

If the transition goes to a substate of the composite state, then that substate becomes active and its entry code is executed after the execution of the entry code of the composite state. This rule applies recursively if the transition terminates on a transitively nested substate.

Shallow history entry

If the transition terminates on a shallow history pseudo-state, the active substate becomes the most recently active substate prior to this entry, unless the most recently active substate is the final state or if this is the first entry into this state. In the latter two cases, the default history state is entered. This is the substate that is target of the transition originating from the history pseudo-state. (If no such transition is specified, the initial transition is executed.) If the active substate determined by history is a composite state, then it proceeds with its default entry.

Deep history entry

The shallow history rule applies with this exception the rule is applied recursively to all levels in the active state configuration below this one.

Entry point entry

If a transition enters a submachine state through an entry point pseudo-state, then the entry behavior is executed before the action associated with the internal transition emanating from the entry point.