29.4. More UML State Machine Diagram Notation
Transition Actions and Guards
A transition can cause an action to fire. In a software implementation, this may represent the invocation of a method of the class of the state machine diagram.A transition may also have a conditional guardor boolean test. The transition only occurs if the test passes. See Figure 29.2.
Figure 29.2. Transition action and guard notation.
Nested States
A state allows nesting to contain substates; a substate inherits the transitions of its superstate (the enclosing state). See Figure 29.3. This was a key contribution of the Harel statechart approach that the UML is based on, as it leads to succinct state machine diagrams. Substates may be graphically shown by nesting them in a superstate box.