IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing monitor models > Create monitor models > Generate monitor models
When to choose monitoring contexts versus event groups
When you generate a monitor model from an application, you can choose monitoring contexts or event groups to contain your constructs. Once you have clicked Finish, you cannot reverse your decision. Event groups simplify the monitor model but eliminate some of your options for working with the model.
Monitoring contexts normally define all the information that must be collected as the system is running. The information is extracted from data carried by inbound events, and is held in metrics, counters, and stopwatches. Event groups are containers for inbound events that enable you to group related inbound events together without the increased work of using a monitoring context.
By default, the generated model contains a monitoring context for each event source that has children, and an event group for each event source that has no children.
For example, a process typically contains activities, so it is represented as a monitoring context. This choice is especially important when dealing with Business Process Execution Language (BPEL) processes and activities.
BPEL processes
When the monitoring context represents a BPEL process, consider carefully before replacing it with an event group. Monitoring contexts provide the following advantages over event groups when they are used to represent processes:
- With monitoring contexts, you can monitor individual instances of a process. If more than one instance of a process can run at a time, the monitoring context ensures inbound events are delivered to a specific instance. If you defined only an event group, the events for different instances cannot be distinguished from one another.
- A cube is created for each monitoring context that has a measure defined, permitting dimensional analysis in Business Monitor.
Use event groups to represent processes only if you know that only one instance of the process will exist, or if you know that you will not need to track each individual instance separately.
BPEL activities
By default, an event group is created under the parent monitoring context for each BPEL activity that does not contain any other activities. A monitoring context is created for each activity that contains other activities.
. Event groups simplify the model and provide the following behavior:
- Metrics are created in the parent monitoring context instead of in separate child monitoring contexts. This behavior is beneficial if an activity is guaranteed to run once within a process and you want to see the process and activity metrics together.
- Measures in the activity are created in the parent cube instead of in a separate cube. This behavior can simplify analysis if you want to see the process and activity measures together. Limiting the number of cubes also improves runtime performance and memory use.
If you choose, you can create a monitoring context under the parent monitoring context for each BPEL activity. Monitoring contexts provide the following behavior:
- With monitoring contexts, you can monitor individual instances of an activity. If an activity can run more than once within a process instance, a monitoring context instance is created for each activity instance.
- A cube is created for each monitoring context that has a measure defined, permitting dimensional analysis in Business Monitor.