State diagram
State diagrams are used to graphically represent finite state machines. State transition tables are another possible representation.
There are many forms of state diagrams, which differ slightly and have different semantics.
UML state diagram
The Unified Modeling Language (UML) state diagram is essentially a Harel statechart with standardized notation, which can describe a lot of things, from computer programs to business processes. The following are the basic notational elements that can be used to make up a diagram:
- Filled circle, pointing to the initial state
- Hollow circle containing a smaller filled circle, indicating the final state (if any)
- Rounded rectangle, denoting a state. Top of the rectangle contains a name of the state. Can contain a horizontal line in the middle, below which the activities that are done in that state are indicated
- Arrow, denoting transition. The name of the event (if any) causing this transition labels the arrow body. A guard expression may be added after a "/" and enclosed in square-brackets ( eventName[guardExpression] ), denoting that this expression must be true for the transition to take place. If an action is performed during this transition, it is added to the label following a "/" ( eventName[guardExpression]/action ).
- Thick horizontal line with either x>1 lines entering and 1 line leaving or 1 line entering and x>1 lines leaving. These denote join/fork, respectively.
According to the "UML Pocket Reference By Don Pilone" the only predefined guard condition is ELSE. No other examples are provided within that publication.
Reference:
http://en.wikipedia.org/wiki/State_diagram