Magic Model Analyst will perform a State Machine simulation if the following elements are selected for the simulation

  • A State Machine.
  • A State Machine diagram.
  • A class whose Classifier Behavior is defined by a State Machine.
  • An InstanceSpecification whose Classifier is a Class that has a defined Classifier Behavior with a State Machine.

The function of Triggers is to change the State of a runtime object during a State Machine simulation. The Trigger can be either a signal or a time Event. If it is a signal Event Trigger, a signal will be sent to a runtime object to trigger it from one State to another. To send the Trigger signal, you have to select a runtime object, which is a target for the signal, in the Variables pane. All signals that can be received by the selected runtime object will be listed on the Trigger drop-down menu on the Simulation window toolbar as follows

The Triggers Drop-down Menu
The Trigger drop-down menu.

You can use a User Interface Mockup to send a signal to a runtime object. See more information about UI mockup in UI Modeling Diagram Simulation

You can trigger a transition directly on a diagram. The menu Fire Transition on the smart manipulation toolbar triggers a transition and sends it to the activeObject that is displayed on the diagram. The Fire Transition command ignores guards.

To trigger a transition directly on a diagram, do either of the following


  • Either select a target object from the Variables pane and right-click a transition line on the diagram, and select Fire Transition.
  • During the simulation, click a transition line on the diagram and select Fire Transition.