Defining an event filter

The object selector and the object filter are used to locate objects that are to undergo a state transition when a particular event occurs. The object selector is sufficient to ensure that only the intended objects undergo a state transition. Note: Object selectors and filters both require database access.

You can define an event filter for a transition. This allows the transition to be ruled out based on the evaluation of the context data of the event. Event filters are processed before attempting to select any objects that are to undergo a state transition. Typical uses of event filters are:
  • To distinguish different transitions caused by the same event.
  • To prevent an SQL error when an object filter references a context value that is optional and might not be present for all occurrences of an event.
  • For an event for which there are several transitions, possibly across several FSMs, to prevent the execution of database select statements for inappropriate transitions, thereby improving execution efficiency. For example, the event E_MpInTxnMapped, which occurs in several FSMs for different transaction types, has an event filter which references the TXN_TYPE context value. This filters the number of transition object selector/object filters that need to be processed.
Note: Event filters that reference aggregated context data are currently not supported. FSM Model validation will highlight such filters as invalid.