State Transition Diagrams

State-transition diagrams describe all of the states that an object can have, the events under which an object changes state (transitions), the conditions that must be fulfilled before the transition will occur (guards), and the activities undertaken during the life of an object (actions). State-transition diagrams are very useful for describing the behavior of individual objects over the full set of use cases that affect those objects. State-transition diagrams are not useful for describing the collaboration between objects that cause the transitions.

The UML notation for state-transition diagrams is shown below:

5.1 XDD6232imagelistfilename1.jpg

Notation

For those not familiar with the notation used for state-transition diagrams, some explanation is in order.

State: A condition during the life of an object in which it satisfies some condition, performs some action, or waits for some event.

Event: An occurrence that may trigger a state transition. Event types include an explicit signal from outside the system, an invocation from inside the system, the passage of a designated period of time, or a designated condition becoming true.

Guard: A boolean expression which, if true, enables an event to cause a transition.

Transition: The change of state within an object.

Action: One or more actions taken by an object in response to a state change.




One thought on “State Transition Diagrams

Leave a Reply

error: Content is protected !!
%d bloggers like this: