... | ... | @@ -16,7 +16,18 @@ UML state diagrams use the following notations: |
|
|
- *States* are denoted as rectangles with rounded corners and a name.
|
|
|
"A State models a situation in the execution [...] during which some invariant condition holds.
|
|
|
In most cases this condition is not explicitly defined, but is implied, usually through the name associated with the State." (UML Spec 2.5, S.348/306)
|
|
|
For example: "Ringing" or "Dialing" are common states when modeling the state machine for a telephone.
|
|
|
For example: "Ringing" or "Dialing" are common states when modeling the state machine for a telephone. *States* may contain (optional) internal behavior that is sequentially executed after entering the state:
|
|
|
|
|
|
- *Entry* actions are executed and completed when the *state* has been entered.
|
|
|
- *Do* actions are executed when the *state* has been entered and always after a potential *entry* action is completed.
|
|
|
*Do* actions are executed until they are completed or until the *state* is left.
|
|
|
Therefore, their execution may be interrupted.
|
|
|
- *Exit* actions are executed right before leaving the *state*, but after potential *entry* and *do* actions.
|
|
|
In contrast to *do* actions, *exit* actions are always completely executed.
|
|
|
|
|
|
- *Transitions* are denoted with a solid line and an open arrow.
|
|
|
As the name implies, they are used to define *state transitions*.
|
|
|
|
|
|
- *Composite states* are also denoted as rectangles with rounded corners and a name.
|
|
|
They contain at least one *region*, i.e., a fragment that may execute concurrently with other *regions*.
|
|
|
A single *region* in a composite state is not visible.
|
... | ... | |