Home. 
.

transparent

transparent

transparent

Draw Exceptional State Machine Diagrams

Altova 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.

Whether you are planning the logic of a business object such as in invoice – whose states might be issued, paid, or overdue – or the behavior of a complex hardware-based system, you'll find UModel® 2008 to be an intuitive and enjoyable tool as you develop your state machine diagrams.



UML state machine diagram

The UModel® 2008 state machine diagram toolbar brings together all the UML 2 elements you’ll need for your state machines.



UML state machine diagram toolbar

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.

If you’re following an iterative development process, your state machine diagrams are works in progress and you will want to revise and expand them based on new ideas and feedback from your project teammates.

UModel® 2008 makes it easy to modify existing diagrams. When you select a state to be changed, all its associated transition arrows will behave appropriately, eliminating extra steps. For instance, selecting then deleting the final state element automatically removes the transition arrow connecting it as well.



UML state machine diagram edit

Next, you may want to create a new transition from one state to another. UModel automatically connects the states with the shortest possible line.



UML state machine diagram transition

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.



UML state machine diagram layout toolbar

You can simply grab the line with your cursor and drag it to shape the path you want.



UML state machine diagram transition



UML state machine diagram transition

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.

You can easily add a guard in the UModel Properties helper window.



UML state machine diagram guard

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.



UML state machine diagram transition

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.

UML syntax lets you add an activity that is performed during transition out of any state. Incongruous as it may sound, in this case the activity will be a short period of doing nothing.

UModel® 2008 lets you select the transition arrow, then use the right-click context menu to insert a new activity.



UML state machine diagram tranisiton activity

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.



UML state machine diagram

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.

With UML joins and forks offered in a choice of orientations at a single click, and history and connection point reference elements all readily at hand, you’ll have everything you need to assemble superlative state diagrams.



Altova UModel



Altova UModel

See for yourself how easy it is to create UML 2 state machine diagrams with UModel® 2008! Download a free 30-day evaluation today.



transparent
Download
Pricelist
Buy
Video
Datasheet
Feature Comparsion
Print
Mail
Digg
delicious
.
.

UML logo

.
.

OMG logo

.
.

transparent

transparent