Fork

A fork is an element of a state machine. It is processed when it is reached by the only incoming transition.

It is used to split an incoming transition into two or more outgoing transitions which target states in different regions of a composite state.

A fork belongs to a region.

Symbol

A fork is shown as a short bold bar.

images/download/attachments/2785315/fork_symbol.png

Symbol in context

Example 1

images/download/attachments/2785315/fork_symbol_context_1.png

  • After the fork is reached, the two outgoing transitions of the fork are enabled.

  • Composite state 'Composite state 1' is entered and becomes active.

  • Simple states 'Simple state 2' and 'Simple state 4' are entered and become active directly (via the transitions emanating from the fork).

  • Simple state 'Simple state 3' is entered and becomes active (via the transition emanating from the initial pseudostate).

Example 2

images/download/attachments/2785315/fork_symbol_context_2a.png

  • After Simple state 1 is exited, the fork is reached.

  • 'Simple state 2' and 'Simple state 3' are entered and become active via outgoing transitions of the fork.

Targeting different nesting levels

'Simple state 2' is entered and activated even if it is a child of the 'Composite state 2' which is a child of 'Composite state 1'. The outgoing transition of the join can target a state at any nesting level.

Characteristics

  • A fork has at least 2 outgoing transitions and exactly 1 incoming transition.

  • All outgoing transitions of the fork have no guards or triggers.

  • All outgoing transitions of the fork have a state as target.

  • Different outgoing transitions cannot target states in the same region.

  • The outgoing transition of the fork can target a state at any nesting level.

Interpretation of and deviation from the UML specification

There is no interpretation of and deviation from the UML specification for a state machine's fork.