IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Monitoring events > Generate event definitions

Event definitions

The Common Base Event specification defines the content of those events that conform to the specification. Event definitions are files that enable you to define the structure of events that are based on the Common Base Event specification.

In the context of IBM Integration Designer, there are two kinds of events:

Predefined events are events that have been defined in advance for IBM Integration Designer components and their elements, such as business processes and their activities. Custom events, by comparison, are user-defined events that you can emit from custom event emitters in certain components, such as mediation flows and visual snippets.

Using the event definition generator, you can generate or regenerate event definitions for existing predefined and custom events if you have selected the WebSphere Business Monitor 6.0.2 event generation format.

However, to work with the event definitions in a meaningful way, you need the IBM Business Monitor development toolkit. The toolkit enables you to generate a monitor model for your event definitions and then add business metrics to the event definitions in the monitor model editor. It also enables you to deploy the monitor model and event definitions to an IBM Business Monitor server and monitor the emitted events using the IBM Business Monitor dashboard.

Generating event definitions is merely one task in an end-to-end chain of event monitoring tasks that you can perform using the tools of IBM Integration Designer and the IBM Business Monitor development toolkit. The following figure shows how the generation of event definitions relates to the other event monitoring tasks:

In the figure, the following tasks are illustrated:

Task Description
1 Select predefined events
2 Add custom event emitters
3 Generate event definitions
4 Edit event definitions
5 Test event definitions
6 Generate monitor model
7 Add business metrics to event definitions
8 Deploy the modules to the server
9 Monitor the emitted events

These tasks are briefly described in the following sections.


Selecting predefined events

In IBM Integration Designer, each kind of component consists of a number of elements that have predefined events.

For example, a business process consists of activities and each type of activity has one or more events predefined for it. If you want your component elements to emit events at run time, first select the predefined events for the elements in the event monitor. Once you have selected the predefined events, you can also choose to generate event definitions for them using the event definition generator. Information about selecting predefined events is found in the event monitor topics "Specifying event properties for component elements" and "Specifying event properties for components."


Adding custom event emitters

If you want to emit custom events from a mediation flow or visual snippet, you can add custom event emitters to the mediation flow or visual snippet in their editors. After you have added a custom event emitter to a mediation flow, you can choose to generate event definitions for it. Information about adding custom event emitter primitives to mediation flows is found in the mediation flow editor topic "Emitting common base events." Before you can add a custom event emitter to a visual snippet, first create a custom event definition for the emitter in the event definition editor. Information about adding custom event emitter activities to visual snippets is found in the visual snippet editor topic "Configure a custom event in a visual snippet."


Generate event definitions

After you have added custom event emitters to a mediation flow or you have selected predefined events for a component in the event monitor, you can select the mediation flow or component in the Business Integration view and then generate or regenerate event definitions for it. If , however, that you cannot generate event definitions for custom events in visual snippets and you cannot regenerate event definitions that were created from scratch in the event definition editor.

Generated event definitions are automatically stored in the module that contains your component and they are visible in the Physical Resources view. If you have installed the IBM Business Monitor development toolkit, they are also visible in the Project Explorer view of the Business Monitoring perspective. Information about how to generate event definitions is found in the task topic "Generating event definitions."


Editing event definitions

If you have generated event definitions for predefined or custom events using the event definition generator, you can optionally edit the event definitions in the event definition editor. However, any changes that you make to the event definitions in the editor will be overwritten when you next regenerate the event definitions. For this reason, it is assumed that you will be deploying any edited event definitions before you regenerate them. Generally, editing generated event definitions is unnecessary and it is only recommended for advanced users. The following paragraphs describe some recommended practices for editing generated event definitions.

If you have generated event definitions for predefined events, you should only edit event definitions for those predefined events that are capable of carrying payload and for which you have specified an event content of Full in the event monitor.

For example, the predefined business process event BPC.BFM.BASE does not carry payload even if you have selected an event content of Full. Thus, you should not attempt to edit it. By comparison, the predefined business process event BPC.BFM.VARIABLE.STATUS_XYZ#$%A123 can carry payload if you have specified an event content of Full. As a result, you can edit it and modify the extended data elements.

If you have generated event definitions for custom events in mediation flows, you can also optionally use the event definition editor to modify the extended data elements.

In general, you will typically need to edit generated event definitions whenever one or more elements of the payload have a type that is specified as schema type "any" or "anyType". When this occurs, the generated event definitions will specify "noValue" as the type, which means that you will need to explicitly add extended data elements as children of this element to be able to use the specified data in a monitor model. Information about working with extended data elements in the event definition editor is found in the event definition editor topic "Managing extended data elements."

Although you can use the event definition editor to edit generated event definitions, the primary purpose of the event definition editor is to create and edit custom event definitions. Information about using the event definition editor is found in the event definition editor topic "Creating custom event definitions."


Testing event definitions

After you have generated event definitions using the event definition generator, you can test the event definitions in the integration test client. The test client enables you to select an event definition and then emit an event to ensure that the event definition is defining the structure of the emitted event correctly. If you are testing an event definition for a predefined event, you can use the event monitor to change the content specifications in the event definition and then repeat your testing in the test client. Information about testing event definitions in the test client is found in the test client topic "Testing event definitions."


Generate monitor models

If you have installed the IBM Business Monitor development toolkit, you can either generate event definitions or a monitor model, depending on whether you are working with a 6.0.2 or 6.2 module. Event definitions are automatically stored in the same 6.0.2 module that contains the component for which you generated the event definitions. The monitor model is automatically stored in the 6.2 business monitoring project. Information about generating monitor models is found in the IBM Business Monitor development toolkit documentation.


Adding business metrics

If you have installed the IBM Business Monitor development toolkit, you can open a generated monitor model in the monitor model editor and add business metrics to the event definitions. If you later generate new event definitions that were not originally generated along with the monitor model, you can import the new event definitions into the monitor model using the monitor model editor. Information about using the monitor model editor is found in the IBM Business Monitor Development toolkit documentation.


Deploying the modules

Event definitions define events that are intended for monitoring by the IBM Business Monitor tools. For this reason, modules that contain event definitions must be deployed to an IBM Business Monitor server. When you deploy your module, any associated business monitoring projects, monitor models, and event definitions are automatically deployed as well.

Generally, deploying modules to an IBM Business Monitor server is similar in many respects to deploying modules to IBM Process Server. Specific information on deploying modules to an IBM Business Monitor server is found in the IBM Business Monitor development toolkit documentation. General information on deploying modules to servers is found in the IBM Integration Designer topic "Deploying modules."


Monitoring the emitted events

After you deploy your module to a running IBM Business Monitor server, you can right-click the server and select the WBM Web Dashboard menu item. This opens the IBM Business Monitor Web dashboard to enable you to monitor the emitted events. Information about using the dashboard to monitor emitted events is found in the IBM Business Monitor documentation.

Generate event definitions