IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing monitor models > What are monitor models? > Monitor details models

Triggers

A trigger is a mechanism that detects an occurrence and can cause additional processing in response.

For example, you could define a trigger that causes a metric to be updated, a counter to be incremented, or a stopwatch to be halted each time a task ends. Triggers also determine when outbound events are sent.

Triggers are the control points that determine when things will happen. Each trigger has one or more occurrences that determine when it might fire, and a condition that determines whether it actually fires. You can think of the occurrences as defining when the trigger is tested (for example, every 10 minutes), and the trigger condition as the actual condition being monitored (for example, when the inventory is less than the threshold).

Triggers can be tested based on the following occurrences:

After the occurrence, the condition is evaluated to determine whether the trigger will fire.

For example, an inbound event might be received for each new customer order. A trigger might be tested each time a new order event arrives, but its condition tests the event's customer status field for a value of GOLD and evaluates to true only when an order for such a customer arrives. The trigger then fires, setting off some other action.

After its condition is met and it fires, a trigger can cause any of the following actions:

Some possible trigger conditions include the following examples:

Triggers can be associated with outbound events that can cause business actions. An administrator uses the Monitor action services to specify an action that occurs when the outbound event is received.

For example, you could create a trigger that checks the status of a stopwatch once a minute. This trigger is associated with a condition (myStopwatch > 2 hours), and when the condition is true, it generates an outbound event. As another example, you could have a trigger that is evaluated every 4 hours. Its trigger condition retrieves the value of a key performance indicator (KPI) and checks it against an acceptable range. If the KPI is outside the range, the trigger fires and an outbound event is sent.

By default, a trigger fires when the previous evaluation of its condition was false (or never evaluated) and the current evaluation of its condition is true.

For example, assume that you have a trigger that is tested every time the inventory metric is updated. If the inventory is less than 10, the trigger emits an outbound event. The inventory metric is updated as follows: 11, 10, 9, 8, 7, 10, 9. In this case, the trigger fires each time the inventory is 9, or only twice. When the inventory is updated to 8 and 7, the previous condition value was true so the trigger did not fire. If you make a trigger repeatable, however, the trigger fires when the condition first resolves to true, and then continues to fire every time that the trigger source is updated and the condition remains true.

Monitor details models