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

Trigger Sets and Auto-Firing

Trigger Sets are an effective means of automating and streamlining the execution, testing and validation of simulation models. By re-using sets of triggers (with or without parameters) it is possible to quickly and efficiently walk through many simulation scenarios, either manually or automatically using the 'auto-firing' tool.

Access

Ribbon

Simulate > Dynamic Simulation > Events

About Trigger Sets

Aspect

Details

See also

Trigger Sets

  • Stored with an associated diagram
  • Made up of a list of Triggers in a set sequence
  • Can include Trigger parameters where necessary
  • Can be used manually by double-clicking Triggers to fire as required
  • Can be used as part of the 'auto-fire' behavior to automate execution
  • Managed from the Simulation Events Window

Managing Sets

Trigger sets can be created by manually dragging triggers into the active triggers list and then using the 'Manage Trigger Sets' drop menu to save a new set.

It is also possible to save a set of triggers built up during a single simulation setting as a new set. This is convenient for creating multiple test paths through a simulation, based on saving the manually fired triggers for each test case.

You can also delete a set and delete all sets for the current diagram.

It is also possible to load a set, modify parameters and/or order of firing and save the set with a new name. This is a convenient method for rapidly creating a suite of simulation test scripts.

Using Sets

To use a trigger set you first select it by name from the trigger set drop list as in this example image. Once selected it loads the Trigger List window with the defined trigger set.

Note that the special item <no event set> means no set is currently selected. At the start of each simulation, if a set is selected, it will be loaded afresh for the next run. If <no event set> is selected, the trigger list will be cleared.

Once you have selected a trigger set and the list of triggers loaded you have two options:

  • Fire the triggers as required manually
  • Use the auto-fire feature to fully automate the simulation

Auto-Firing

Auto-firing is a convenient way of streamlining your simulations. Once you have loaded a trigger set, if you select the Auto-fire button then Enterprise Architect will automatically pick up waiting triggers when it reaches an impasse in the simulation. In practice, this means that trigger sets matching exactly a path through the simulation will automatically run without your intervention.

As you can save any number of trigger sets with different pathways and trigger parameters, you can effectively and quickly test and work with many different scenarios.

Auto-Firing Rules

When a simulation runs with auto-firing enabled, Enterprise Architect will wait until a point is reached where the simulation is 'blocked' or stable, waiting on one or more triggers to advance the simulation. At that time, the first unfired trigger in the list will be picked up and fired into the simulation. The outcome depends on the relevance and perhaps on the parameters of the trigger.

  • If the trigger matches a 'waiting' trigger it is immediately consumed and the simulation advances
  • If the trigger matches no 'waiting' trigger or possible parent transition, then the trigger is 'lost' and the simulation remains in the current state; this corresponds to a scenario such as a user pressing an 'on' button several times in succession - there is no effect other than that occasioned by the first press