Try OpenEdge Now
skip to main content
BPM Events User's Guide
The rule language : Predefined rule actions : Discarding infopads and events : discardIndexEntry(): removing all events related to the same process
 
discardIndexEntry(): removing all events related to the same process
You may index events stored in the cache. Only one event index is supported, and BPM Events is configured so that this index is automatically implemented for all events coming from the BP Server process engine (event type = BP Server). These events are indexed based on the process instance ID they come from (context.PROCESSINSTANCEID).
Often, at the end of a process instance (marked by the reception of an event of value = "PI_COMPLETED"), all the events generated by this process become useless; that is, the application rules do not need any correlation with them. In that case, the application rules should explicitly discard these events from the cache as well as from the persistent image of the cache.
Each application generally has an "event clean-up" rule that discards the group of events corresponding to a particular index entry, using discardIndexEntry with the process instance ID in argument:
Note: This applies only to BP Server events.
rule end_process
activated by evt of BP Server::PI_COMPLETED{PROCESSTEMPLATENAME :
"myProcess"} then { discardIndexEntry(evt.PROCESSINSTANCEID); }
Note: It is important for each application to discard events from the cache that have become useless, otherwise these events clutter the cache and affect performance.