Trigger

d_trigger

Description

A Trigger indicates an event that initiates an action (and might arise from completion of a previous action). You initially define a Trigger in one of four ways:

As a property of a Transition relationship
As a property of an Accept Event Action (on the Triggers tab of the element Properties dialog)
As an event in a State Machine Table
Directly, as a Trigger element, through the New Element dialog or Diagram Toolbox (State Additional page)

 

When you save the Trigger, it is added to the list of elements for the parent package in the Project Browser. You can then right-click on it and select the Properties context menu option to view and, if required, edit its properties as an element rather than as a property itself. Triggers created as events remain as Event elements, whilst Triggers created in other ways are Trigger elements, with a Trigger tab in the Properties dialog.

Field

Action

See also

Type

If necessary, edit the type of trigger:

Call - specifies that the event is a CallEvent, which sends a message to the associated object by invoking an operation
Change - specifies that the event is a ChangeEvent, which indicates that the transition is the result of a change in value of an attribute
Signal - specifies that the event is a SignalEvent, which corresponds to the receipt of an asynchronous signal instance
Time - corresponds to a TimeEvent; which specifies a moment in time
 

 

Specification

Either type in the event instigating the Trigger, or click on the (  ...  ) button and select the event (depending on the Type value).

 

 

Ports

Click on the Add button and select the appropriate Port from the Select Port dialog.

To create new Ports using the Select Port dialog, the Trigger should be created as  a child of a Class or Component element
To add several Ports at once, press ( Ctrl )  as you select each Port
To check the exact location of a Port, right-click on the Port name and select the Find in Project Browser context menu option

 

Select Port Dialog

Notes

You can also drag an existing Trigger element onto another diagram, although there are limited uses for the element in that context
This element is not the same as a Trigger Operation, which is an operation automatically executed as a result of the modification of data in a database

Toolbox icon

e_trigger

Learn more

Triggers (as an Operation)

OMG UML Specification:

The OMG UML specification (UML Superstructure Specification, v2.1.1, p. 456) states:

Events may cause execution of behavior (e.g., the execution of the effect activity of a transition in a state machine). A trigger specifies the event that may trigger a behavior execution as well as any constraints on the event to filter out events not of interest.