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.
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.
Tendron Systems Ltd