IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Building mediation flows > Emitting common base events

Choose properties of an event

The name given in the Event Emitter primitive's Label property identifies the event to the event consumers; viewer and monitor applications. Use an event label that is meaningful and unique to that particular event, so that consumers of the event can process it effectively.

At run time, common base events are generated when an Event Emitter primitive is encountered in the flow, and the Event Emitter's label property is used as the extension name of the common base event. The extension name as defined in the common base event indicates what data the event might contain.

For example, if the extension name is MyOrder, you would expect it to contain extended data elements (or application specific data) pertaining to MyOrder. Although a label is generated by default, specify a meaningful label.

Common base events are emitted to the CEI server which can be accessed by many different applications that consume the events, and so the names of the events must be unique across the system to distinguish the different event types.

If that the label cannot be greater than 64 characters in length, because 64 is the maximum length the extension name can be set in the event. A MediationRuntimeException will be thrown for the property label if it is greater than 64 characters.

In addition, consider what data will be stored in the message, and configure the emitter to store only significant message data. Configure the primitive to store the complete message will produce events of greater size compared to configuring the primitive to store just the most important information.

As an example, suppose your flow uses two Event Emitter primitives:

The following image shows the flow.

The label properties of the Event Emitters are OrderDataBaseFailure and LegacyOrderMessage. In the event, only include message content that is specific to the defined event type.

For example, in the OrderDatabaseFailureEvent, include only the context header that contains the failinfo element. In the LegacyOrderMessageEvent, include only the message body which contains the customer information.

When the administrator receives notification of an OrderDataBaseFailure event, she can begin investigating the problem by looking at the failure information contained in the message. When the inventory coordinator receives the LegacyOrderMessage, he can contact the customer to offer an alternative product.

If you want events to get to the CEI server even when the flow fails further down the line, you must set the transaction mode property to New. If that the transaction mode property only takes effect within a global transaction.

Emitting common base events