Book a Demo
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.

Generate Timing Diagram

After completing the simulation of an Executable StateMachine, you can generate a Timing diagram from the output. To do this:

In the Simulation window toolbar, click on 'Tools | Generate Timing Diagram'.

Learn More