Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Example: Executable StateMachine

Example Class Model

This image shows a sample Class model that is used by the StateMachines described in this topic.

Example simple Class diagram for StateMachines in Sparx Systems Enterprise Architect

Example StateMachines

These two diagrams show the definitions of two StateMachines. The first references another StateMachine of the same type, while the second drives any instances of the first that exist.

Running States for Business Process Simulation in Sparx Systems Enterprise Architect

The top level controller.

Process Control for Business Process Simulation in Sparx Systems Enterprise Architect

Example Artifacts

From the example Class and StateMachine diagrams, we can create Executable StateMachines as shown here.

Executable StateMachines in System Simulation in Sparx Systems Enterprise Architect

Note how property values have been set for each property, and the links between elements identify the relationships that exist in the Class model.

Simulation Results

When running a simulation, Enterprise Architect will highlight the currently active States in any StateMachines. Where multiple instances of a StateMachine exist, it will also show the names of each instance in that State.

The executable state machine Turbine example from Enterprise Architect's example model