States
A state is a condition or situation in the life of an object, during which it satisfies some condition, performs some activity, or waits for some event. A state represents an interval of time delimited by two events. It is a phase an object passes through during its life cycle.
Creating a State
To create a state in a state machine diagram:
1. Click the arrow associated with the State button of the object insert toolbar
2. Select a state type.
3. Click in the diagram work area.
The Add State dialog box opens.
4. Indicate the Name of the state and click Create.
The state appears in the diagram.
State types
It is necessary to specify the state type at the time of its creation. It can be:
A normal state: has no sub-structure.
A composite state: comprises several states, described in the diagram.
A sub-machine state: calls the descriptor of a state machine described elsewhere. See Detailing Behavior of a State.
A final state
When you place a state in another state, it is automatically connected as a component of this state.
Pseudo-states
Pseudo-states are used to specify complex paths by combining several transitions between states.
They can be of different types: initial, final, choice, deep history, shallow history, input, output, fork, join, junction or reference.
Detailing Behavior of a State
A state can be made up of sub-states.
To describe composition of a state in a diagram:
1. Open the pop-up menu of a state and select New > Detailing Behavior.
The state machine diagram creation window opens.
2. Click New.
The diagram opens.
You can also define composition of a state by associating it with a new or existing state machine:
1. Open the Characteristics property page of the described state.
2. In the Detailing Behavior box, create a state machine or query an existing state machine.
State Properties
To access the state properties:
1. Right-click the state.
2. Select Properties.
The properties dialog box of the state appears:
This can be used to:
Modify the state Name.
Indicate whether the sub-states are Concurrent, meaning they can be executed simultaneously.
Indicate the Detailing Behavior (in the case of a complex state). See Detailing Behavior of a State.
Specify the Activities that can be performed at input, output or while the object is in this state.
*The contents of the properties dialog box of a state vary depending on state type.
See also: