![]() |
![]() | ![]() | ![]() | Draw Exceptional State Machine DiagramsAltova UModel® 2008 makes it easy to identify states and transitions of an object as it proceeds through its life cycle.
UML state machine diagrams describe the behavior of a class over time through illustrations of the states and transitions of a single object progressing through its lifetime. State machine diagrams are a traditional object-oriented way to show behavior and to document how an object responds to events, including internal and external stimuli.
The UModel® 2008 state machine diagram toolbar brings together all the UML 2 elements you’ll need for your state machines.
This special toolbar helps avoid confusion as you draw your diagram, since state machines share some – but not all – of the same UML element symbols used in activity diagrams.
Next, you may want to create a new transition from one state to another. UModel automatically connects the states with the shortest possible line.
Note that the new transition arrow remains selected after you connect the states. The new transition arrow has three small icons called waypoints that can be used to alter the line characteristics and the layout toolbar alerts you of the line style that is currently selected.
You can simply grab the line with your cursor and drag it to shape the path you want.
The new transition arrow in this example needs a guard, a Boolean statement to indicate an event or condition that will allow the transition to proceed. Without a guard, the new arrow indicates that the dehumidifier stops when the tank is full, then immediately proceeds to the sensing state. But what if humidity is still high? The circuit will turn on again and the tank will overflow.
Guard text requires brackets, which UModel provides automatically. You can select the guard in the drawing pane and move it wherever you like. You can edit the text in the Properties window or directly in the design pane if you wish.
The dehumidifier example needs one more piece of logic. Consider what would happen if the room’s humidity is neither above nor below, but exactly at the critical detection level. To prevent overloading the circuits by repeatedly turning the system on/off, on/off, on/off, likely, the simplest and most cost-effective remedy would be to add a delay to the transition out of the sensing state.
After you enter the text you can move it wherever you like, and the revisions to the state machine diagram in this example are complete.
If your own project is more complex than a dehumidifier control, you’ll find the UModel® 2008 elements for composite states, orthogonal states, and submachine states as easy to place and manipulate as simple states.
See for yourself how easy it is to create UML 2 state machine diagrams with UModel® 2008! Download a free 30-day evaluation today. | ![]() |
![]() | ![]() | |||||||||||||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | |||||
|
