Topic
Prev Next

Execution and Simulation of Executable StateMachines

One of the many features of Enterprise Architect is its ability to perform simulations. An Executable StateMachine generated and built in Enterprise Architect can hook into the Simulation facilities to visually demonstrate the live execution of the StateMachine Artifact.

Starting a simulation

The Simulation Control toolbar provides a Search button that you use to select the Executable StateMachine Artifact to run. The control maintains a drop-down list of the most recent Executable StateMachines for you to choose from. You can also use the context menu on an Executable StateMachine Artifact itself to initiate the simulation.

Controlling speed

The Simulation Control provides a speed setting. You can use this to adjust the rate at which the simulation executes. The speed is represented as a value between 0 and 100 (a higher value is faster). A value of zero will cause the simulation to halt after every step; this requires using the toolbar controls to manually step through the simulation.

Notation for active states

As the Executable StateMachine executes, the relevant StateMachine diagrams are displayed. The display is updated at the end of every step-to-completion cycle. You will notice that only the active State for the instance completing a step is highlighted. The other States remain dimmed.

It is easy to identify which instance is in which State, as the States are labeled with the name of any instance currently in that particular state. If two or more artifact properties of the same type share the same state, the State will have a separate label for each property name.

Learn More