In statechart diagrams, as shown in Figure, we work with the following elements:
The initial state represents the source of all objects:
It is not a normal state, because objects in this state do not yet exist.
The state of an object is always determined by its attributes and associations. States in statechart diagrams represent a set of those value combinations, in which an objectbehaves the same in response to events:
A transition represents the change from one state to another:
An internal transition is a transition from one state to itself. This means that the object handles the event without changing its state:
The events that initiate the internal transition are listed in the lower part of the state symbol. For instance, a frequent flyer card object in the state normal remains in the state normal when the event «M» add miles occurs.
A mutation event is the initiator of a transition from one state to another, or for an internal transition, where the state remains the same:
An action is the activity of an object that is initiated by an event:
An action describes what the object does in response to the event. This description can be textual or formalized.
A guard condition is a condition that has to be met in order to enable the transition to which it belongs:
Guard conditions can be used to document that a certain event, depending on the condition, can lead to different transitions.
The final state represents the end of an object’s existence:
A final state is not a real state, because objects in this state do not exist anymore.