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.
Examples of object states
• A person can be:
• Unmarried
• Married
• Divorced
• An item can be:
• Available
• In stock
• At reorder level
• Out of stock
• etc.
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 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.
Initial
An initial pseudo-state has a single output transition to the initial state of the object at its creation.
Deep history
A deep history pseudo-state represents the last active configuration of a composite state containing it; that is the configuration that was active the last time the composite state was exited.
Simple history
A simple history pseudo-state represents the most recent active sub-state of a composite state (without the sub-states of this sub-state).
Fork
A fork separates a transition into several concurrent transitions.
Join
A join is the grouping of several transitions into a single transition.
Choice
Represents the choice of a transition between several possible transitions.
Junction
A junction is used to define paths of complex transitions between several states.
Input
Entry point of a state machine or of a composite state.
Output
Exit point of a state machine or of a composite state.
Reference
Reference to an input or output of a state machine or of a composite state.
Final
Input in this pseudo-state involves complete shutdown of the state machine.
Deep history
A Deep History state represents the last active configuration of a composite state; that is the configuration that was active the last time the composite state was exited.
A Simple History state represents the most recent active sub-state of the composite state.
Example:
Consider the "Married" state as the last active configuration. Sub-states of this state are "With children" and "Without children". In the case of a deep history, the "With children" and "Without children" sub-state is specified. In the case of a simple history, only the "Married" state is taken into account.
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.
• 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: