20.6.  Submachine State

A submachine state is a syntactical convenience that facilitates reuse and modularity. It is a shorthand that implies a macro-like expansion by another state machine and is semantically equivalent to a composite state. The state machine that is inserted is called the referenced state machine while the state machine that contains the submachine state is called the containing state machine. The same state machine may be referenced more than once in the context of a single containing state machine. In effect, a submachine state represents a call to a state machine subroutine with one or more entry and exit points. The entry and exit points are specified by stub states. SubmachineState is a child of State.

The submachine state is depicted as a normal state with the additional include declaration above (and separated by a line from) its internal transitions compartment. The expression following the include reserved word is the name of the invoked submachine.

ArgoUML currently only supports a horizontal division of a concurrent composite state in regions.

The description of the details panels of a concurrent region is almost identical to that of a composite state (see Section 20.4, “ Composite State and so is not duplicated here. The only difference is one additional field:

Submachine

Drop-down selector. Allows selecting the submachine included within this composite state.