20.7.  Stub State

A stub state only appears on a submachine state.

A submachine state represents the invocation of a state machine defined elsewhere. In the general case, an invoked state machine can be entered at any of its substates or through its default (initial) pseudostate. Similarly, it can be exited from any substate or as a result of the invoked state machine reaching its final state. The non-default entry and exits are specified through stub states. In the UML metamodel, StubState is a child of State.

Every Stub State has a label on the diagram, which corresponds to the pathname represented by the “Reference State” attribute of the stub state.

The description of the details panels of a stub state is almost identical to that of a pseudo state (see Section 20.11, “ Pseudostate and so is not duplicated here. The only difference is one additional field:

Reference State

Drop-down selector. Allows entering the path name of the reference state.