State Machine Extension
Like many other concepts in UML, state machines may be specialized as needed. A specialized state machine is an extension of a general state machine. You can specialize a state machine by adding regions, states, pseudostates, or transitions. In addition to adding features to state machines you can redefine states, regions, and transitions.
When drawing a specialized state machine, draw the inherited states with dashed or gray-toned lines. You may also place the keyword extended
in curly braces after the name of the state machine. Figure 8-16 shows a specialized soda dispensing state machine. The Dispensing Drink
state is extended to introduce a new substate, Out of selection
. The states Releasing drink
and Refunding change
retain their other transitions, and a new transition, Time expired
, is added to transition to the new substate if the IR sensor isn't triggered (see Figure 8-6 for the original composite state).
Get UML 2.0 in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.