IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Adapter Toolkit > Implementing code from the IBM WebSphere Adapter Toolkit > Inbound event notification > Implementing an event store in the EIS

Event detection

Events detection mechanisms reflect the sources that trigger them: user actions in the application, batch processes that add or modify application data, or database administrator actions.

When an event detection mechanism is set up in an application and an application event associated with a business object occurs, the application must detect the event and write it to the event store.

Event detection mechanisms are application-dependent. Some applications provide an event detection mechanism for use by clients such as adapters. The event detection mechanism may include an event store and a prescribed way of inserting information about application changes into the event store.

For example, one type of implementation uses an event message box that receives messages from the application when it processes an event of interest to the adapter. The adapter application-specific component periodically polls the message box for new event messages.

Other applications have no built-in event detection mechanism but have other ways of providing information when application entities change. If an application does not provide an event detection mechanism, use whatever mechanism is available to extract information about entity changes for the adapter. Among those mechanisms are database triggers, exit calls to programs that write to event stores, or extracting information from flat files that aggregate application changes.

In all cases, the event detection mechanism should ensure data integrity between an application event and the event record written to the event store.

For example, the generation of an event record should not occur until all required data transactions for the event have completed successfully.


Steps Involved

In general, an application event detection mechanism should take the following steps:

  1. Detect an event on an application entity.

  2. Create an event record.

To create the record, the event detection mechanism should:

  1. Generate a unique event identifier (ID).
  2. Set the object key to the primary key of the application entity.
  3. Set the verb to the action that occurred in the database.
  4. Set the event timestamp.
  5. Set the name of the WebSphere business object complexType that corresponds to this application entity
  6. Set the event status to New.

Implementing an event store in the EIS