Section 8.5. Pseudostates


8.5. Pseudostates

Pseudostates are special types of states that represent specific behavior during transitions between regular states. Combined with basic transitions, pseudostates can represent complex state changes within a state machine.

Figure 8-17. A simplified SMTP protocol state machine


Table 8-1 shows the types of pseudostates and their symbols. Refer to Figure 8-1 for an example showing how these symbols are used.

Table 8-1. Types of pseudostates

Pseudostate name

Symbol

Description

Initial pseudostate

The starting point of a state machine. The transition from the initial pseudostate to the first full state may be labeled with the event that instantiates the object the state machine is modeling.

Choice

Allows the execution of a state machine to choose between several different states based on guard conditions on the transitions (see Figure 8-17).

Deep history

Used inside a state region, a transition to this pseudostate from outside the region indicates the state machine should resume the last substate it was in within the given region, no matter how "deep" the substate is within the region.

Entry point

Represents a possible target for a transition into a composite state. An entry point can then transition to an internal substate that may differ from the default transition. You must label entry points by writing their name next to the symbol.

Exit point

Represents a possible source for a transition from a composite state. Like entry points, exit points are labeled with their names.

Fork and join

Represents a split in the execution of the state machine into orthogonal regions. The join reunites the regions into a single transition. The state machine won't transition from the join until all regions have transitioned to the join pseudostate.

Junction

Brings several possible transitions together into one pseudostate. One or more transitions may then leave the junction to other states.

Shallow history

Used inside a state region, a transition to this pseudostate from outside the region indicates the state machine should resume the last substate it was in within the given region, however the substate must be at the same level as the history pseudostate. You may specify a default "previous state" by showing a single transition from the shallow history pseudostate to an internal substate. This is used only if the region has never been entered.

Terminate node

Causes the state machine to terminate.





UML 2.0 in a Nutshell
UML 2.0 in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596007957
EAN: 2147483647
Year: 2005
Pages: 132

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net