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

Triggers

Triggers represent signals and events that can activate transitions leaving the current state(s). A trigger might represent a real world signal or event such as:

  • A button being pressed
  • A message being received
  • A pedal being depressed
  • A switch being thrown
  • A state in a concurrent region being entered or exited

For a trigger to have an Effect

  • Transitions must be defined that will fire when the simulation receives the Signal or Event
  • The current Simulation State(s) or its parent(s) must have an outgoing transition that accepts that trigger
  • The transition activated must be unguarded or have a guard that will evaluate to True

Managing Triggers

Action

Detail

See also

Creating Triggers

Triggers are either created as an instance of a Signal element or as an anonymous event. Triggers are connected to Transitions in the 'Transition Properties' dialog as shown here. In this example a Trigger named 'Pushdown' has been defined based on the Signal 'Signal_Pushdown'.

  • Omitting the Type and Specification details results in a simple anonymous Trigger.
  • If parameters are needed, these are defined on the Signal and must be supplied at the time the event fires
Trigger creation on a transition

A trigger will appear in the 'Project' tab of the Browser window, as illustrated here:

Trigger Icons in Project Browser
Trigger Transition Simulation Events Window

Using Triggers

Triggers are deployed by connecting them to transitions, as in the earlier example, and are used during simulation by 'firing' them into the running simulation as required.

When using triggers these points should be taken into account:

  • A 'triggered' transition can not take place until its effective trigger is signalled or fired
  • When a trigger is received it will activate all current waiting transitions dependent on that trigger (that is, the trigger is broadcast)
  • Triggers are evaluated on all transitions for all parents of a current child state; this allows a parent state to exit all child states if necessary
  • Once used in a simulation, a trigger is consumed and must be re-fired if needed again
  • Sets of triggers can be saved and either manually or automatically fired to facilitate automated model simulation under different event models
Re-Signal Triggers Connector Type-Specific Options

Firing Triggers

Firing triggers means to signal or activate a trigger within the current simulation. This could activate zero, one or many waiting transitions depending on the state and concurrency of the current Simulation.

Firing triggers can be achieved in many ways. The most efficient is the 'Waiting Triggers' list.

During the course of model Simulation, if the Simulator reaches an impasse due to required triggers not being available (fired), the list of all possible candidate triggers is shown in the 'Waiting Triggers' list of the Simulation Events window.

Available Triggers are listed when simulation is at an impasse

Double-clicking a trigger in this list will fire it into the Simulation. Other ways to fire a trigger include:

  1. Double-click an un-signalled trigger in the Events window.
    Event history in the simulation interface of Enterprise Architect
    You can also use the context menu on these events to either signal an un-signalled event, or to re-signal an event that has already been fired previously.
  2. Use the context menu of the Transition required to fire and select the 'Signal Trigger in Simulation' menu option.
Simulation Events Window Connector Type-Specific Options

Learn more