Try OpenEdge Now
skip to main content
BPM Events User's Guide
The rule language : Operational semantics of rules : Event correlation : The triggering event and the correlating event
 
The triggering event and the correlating event
When a rule like record_process_time above is correlating two or more events, the rule engine attempts to trigger the rule each time an event of any of the profiles described in the activated by clause, is notified. When processing the rule record_process_time, the rule engine exhibits the following behavior, depending on which type of event it receives:
*If an event of profile BP Server::PI_ACTIVATED is received, then try finding in the event cache, an event of profile BP Server::PI_COMPLETED that comes from the same process instance (same INDEX value). Then test the activation filter. If the condition succeeds, then execute the "then" clause. Repeat for each possible PI_COMPLETED event.
*If an event of profile BP Server::PI_COMPLETED is received, then try finding in the event cache, an event of profile BP Server::PI_ACTIVATED that comes from the same process instance (same INDEX value). Then test the activation filter. If the condition succeeds, then execute the "then" clause. Repeat for each possible PI_ACTIVATED event.
In the first case, the PI_ACTIVATED event is called the triggering event for this rule execution. The other event (PI_COMPLETED) is called the correlating event. In the second case, the reverse is true: the triggering event is the PI_COMPLETED event.
Note: When these events are notified according to a known sequence in time, as it is the case here, the triggering event is always the last one of the sequence.
You may prevent a rule from triggering on some event variables, when you are sure that the triggering will not succeed on these event variables. In the previous example, we know the rule triggers only by the PI_COMPLETED event. Do not trigger it when an event of type PI_ACTIVATED is notified, because no corresponding event PI_COMPLETED exists yet in the cache. Refer to Controllingrule execution for more information about control.