UML State Diagram ( Part-1 )

UML State Diagrams

State diagrams are one of the most valuable techniques available for describing the real-time behaviour of a software system. A well constructed state diagram denotes all the states that a specific object or class can be in. In addition a state diagram describes when and how transitions between the states occur as a result of external events that affect the object. Usually a state diagram is written for each class that exhibits real time behaviour.

The UML state diagram has its origins in earlier research work on real time systems and represents the distilled expertise of three decades of research by numerous experts, David Harel, Ed Yourdon, Grady Booch, James Rumbaugh among others.

UML State Diagram

UML State Diagram

 The transitions between states occur with an “Action”, which are not interrupted. The transition is deemed to occur instantaneously with an atomic action that is not interrupted.

Within a state we often have an activity that is performed during the objects time in that state. However, the acitivity can be interrupted by an event ( often a transition event ).

In the example diagram the stock picking state has the activity of identifying each stock item, when this is identified the state transitions back to the order checking state, if the order is complete, then the transition is to the delivery state.

Only one transition out of a state may be taken at a given time. It is not possible for two states to run concurrently.

In the example diagram, the delivery state is terminated which an signed receipt is obtained.

Most often, transitions from a state are guarded, and this means that the transition will only occur if the guard condition evaluates to true.

James Goode

Tendron Systems Ltd


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s