A state Machine models discrete behavior through finite state transition systems also called final state machine (FSM). The UML’s state machine formalism is an object-based variant of Harel statecharts. It often use to specify behavior (life cycle) of various model elements, e.g., classes, instances, subsystems, or components.
Creating state machine diagrams Visual Paradigm
State machine diagram is a kind of UML diagram that shows flow of control from state to state within single object. It usually contains simple states, composite states, composite states, transitions, events and actions.
Creating state machine diagram
Perform the steps below to create a UML state machine diagram in Visual Paradigm.
- Select Diagram > New from the application toolbar.
- In the New Diagram window, select State Machine Diagram.
- Click Next.
- Enter the diagram name and description. The Location field enables you to select a model to store the diagram.
- Click OK.
Creating states and transitions
- Move your mouse pointer over the source state.
- Press on the Resource Catalog button and drag it out.
Using Resource Catalog
- Release the mouse button at the place where you want the state to be created.
- Select the state to be created from Resource Catalog.
To create a state
- A new state will be created and is transited from the source state. Enter its name and press Enter to confirm editing.
Adding region to state
To model substates of a composite state, you need to add one or more regions to it. To add a region, right-click the state and select Add Horizontal Region from the popup menu.
|Add region to state|
Next, you can draw the substates inside the region.
|Substates in a composite state|
Modeling properties of transition
To model properties of transition such as effect and guard, right-click the transition and select Open Specification… from the pop-up menu.
|Open specification of transition|
When the Transition Specification pops out, you can edit its name, effect and guard. Next, select Create Activity… from the Effect property.
|Create Activity from transition|
In Activity Specification (Effect) window, change its name and then click OK button to apply the change.
Click OK in the Transition Specification to close it. The name and effect are shown on the transition caption.
|Name and effect shown in caption of transition|