Dispatching triggered operations

A dispatched triggered operation uses the takeTrigger method to consume the event.

Before you begin

The following sequence diagram shows a dispatched triggered operation (synchronous event).

About this task

To dispatch triggered operations:

Procedure

  1. The takeTrigger method is called for the triggered operation.
  2. takeTrigger calls the processEvent method to consume the event.
  3. processEvent does the following:
    1. It calls isBusy to determine whether the object is already consuming an event. If the object is not busy, processEvent does the following: Sets the sm_busy flag to TRUECalls getlId to get the event ID
    2. processEvent calls shouldCompleteRun to see if there are any null transitions to take after the event has been consumed. If there are null transitions to be taken, the method calls runToCompletion to take them.
    3. processEvent calls undoBusy to reset the sm_busy flag to FALSE.
  4. takeTrigger calls the shouldTerminate and setShouldDelete methods. If (shouldTerminate() && shouldDelete()) is 1 (or TRUE), takeTrigger deletes the event.

Feedback