State Shape |
Explains the visual appearance, usage, context menus and properties of the state shape.
The state shape is one of the 4 principal shapes used to compose a state diagram.
The state shape may represent either a simple state or, after switching the visualization, a composite state. In the composite mode sub-regions can be added to the state shape. The sub-regions provide the drawing real estate for sub-states. A detailed description about how to create a composite state can be found in Create a Composite State.
The state shape has multiple connection points at its outer border that shall be used to connect transition end points.
The state shape has a properties dialog that can be opened either by double clicking on the state name or by opening the context menu of the state and executing the menu item Properties....
The properties are as follows:
Property | Purpose |
---|---|
Name | Provides the state name for the code generator. The default code generator shape will use the value of this property as the state name parameter for the StateMachineTemplateState method. |
Entry Action, Exit Action, Do Action | These properties provide method names (or delegates or lambda expressions) for the code generator. The default code generator shape will use the values of these properties as parameters for the StateMachineTemplateState method. See Code Generator Shape how to customize the code generator shape if needed. |
Sort Order | Provides a key that defines the sequential order of the state in the generated code. The states are ordered alphabetically within the region. |
The state shape has the following additional context menu items:
Context Menu Item | Purpose |
---|---|
Convert to Composite State -or- Convert to Simple State | Converts the simple state to a composite state that initially contains no sub-regions. Sub-regions have to be added through the Microsoft Visio diagram window that appears through the menu item Configure Sub-Regions.... When the state is a composite state, the menu item changes to Convert to Simple State. The Convert to Simple State remains disabled while the state has sub-regions. See Revert a Composite State Back to a Basic State for details how to revert a composite state to a simple state. |
Configure Sub-Regions... | Opens a Microsoft Visio diagram window that allows to add sub-regions. See Create a Composite State for details. |
Show Actions | Turns on or off visibility of the action names in the diagram (to reduce drawing space). |