Example State Machine

This diagram illustrates some features of State Machines:

ExampleofaStateMachineorStateChart

Composite Diagram States

The chain-link symbol in the bottom right corner of the Saved State indicates that it is a State with a Composite diagram.

You have two options for displaying the contents of a State's Composite diagram. Firstly, you can double-click on the parent element to display its child diagram separately, as shown below:

compstate

 
By default, the child diagram displays within a labeled frame that represents the parent object in the context of the child diagram. You can right-click on the background and select the Hide Diagram Frame option to hide the frame, and on the Show Diagram Frame option to show the frame again.

Alternatively, you can right-click on the composite element on the main diagram and select the Advanced | Show Composite Diagram context menu option, which again displays the child diagram in a labeled frame, but this time within the context of the parent diagram.

StateMachineContext

Notes

State elements can display either with or without a line across them; the line - as shown above - displays when the element has features such as attributes (which could be hidden) or when the Show State Compartment checkbox is selected in the Objects page of the Options dialog
It is possible to add Entry Point and Exit Point elements to the border of a State or State Machine element - right-click on the element and select the New Element |  Entry Point or Exit Point option; if the element is a composite element and represented by a frame, you can also right-click on the selected frame and add the Entry Point or Exit Point elements
If you have Entry Point and/or Exit Points on a State Machine that is a classifier for another State, you can create ConnectionPointReferences to the classifier from the other State
It is also possible to add Regions to a State element or State Machine element frame; right-click on the selected frame and select the Define Concurrent Substates option
 

Learn more