IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing monitor models
Debugging monitor models
If you find a problem while testing your monitor model or if you just want to understand how your monitor model gathers information, use the debugger that is included with the IBM Business Monitor development toolkit.
You can submit events to a version of your monitor model that is running in the debugger, and manually step through the processing to understand what happens when each event arrives.
The debugger provides a representation of all of the operations performed on monitor model elements, such as updating metrics, evaluating triggers, starting and stopping stopwatches, and incrementing counters. You can set breakpoints to stop at points of interest. Then you can step through the operations and inspect the current state of a monitoring context instance as it is being updated.
Debugging a monitor model helps you understand the runtime behavior of the monitor model. You can see the order in which steps are processed for each inbound event. You can verify if expressions are being calculated correctly, metrics and key performance indicators (KPIs) are being updated properly, triggers are firing as expected, and events are being received or filtered out as planned.
You can examine the evaluation of a complex expression as metrics are updated, or the calculation of KPIs as the underlying metrics are set or changed.
You can find the cause of problems such as:
- No values showing up in the dashboard space.
- Maybe the events are not being emitted, or maybe none of the events is satisfying the filter condition to reach a monitoring context.
- Incorrect values being shown in the dashboard space.
- One or more metrics, stopwatches, counters, KPIs, or measures are not being updated properly.
- Outbound events not being sent.
- You can debug the model to see why the events are not being emitted.
You can also inspect the content of outbound events before they are emitted to see if they contain all the necessary information and are formatted as you expect.
Even when there are no problems, you might want to step through the operations of a new monitor model in the debugger before it is deployed. You will improve your understanding of how monitor models operate at run time, and you might also uncover problems or detect behavior that you did not expect.
- Get started with the monitor model debugger
This page gives you the steps you need to use the monitor model debugger for the first time.- Monitor model debugger
The debugger that is included with the IBM Business Monitor development toolkit enables you to debug the runtime behavior of monitor models. For each inbound event definition or time-based trigger in the monitor model, the debugger shows the processing steps that occur when an inbound event is received or a time-based trigger fires. It also shows the processing steps that update KPIs and measures. Using the debugger, you can inspect the contents of inbound events as they are received, metrics, counters, stopwatches, and KPIs as they are created or updated, and outbound events as they are populated and emitted.- Restrictions in the monitor model debugger
There are some restrictions to keep in mind while you are debugging your monitor models.- Starting the debugger
Starting the debugger opens the Debug Source page in the Monitor Model editor.- Sending events to the debugger
You can send events to the monitor model debugger as you would normally send events to be monitored. You do not need to generate Java EE projects or add the projects to the server.
- Evaluating time-based triggers
Any trigger with a recurring wait time, for example a trigger that is tested every minute, is shown in the High-Level Steps list. To test these time-based triggers during debugging, you must send a TIME-CHECK event to the debugger. (At run time, these events are generated automatically.)- Stepping through a running monitor model
In the debugger, you can set a breakpoint and then follow each of the steps as an event is processed and the monitor model runs.- Manage breakpoints
At a breakpoint, the processing flow is suspended so that you can see the effects of each low-level step from this point on. Click the Step Into icon on the toolbar or press F5 to proceed in single-step mode, or click the Resume icon to resume uninterrupted processing until another breakpoint is reached, or until all events in the input queue have been processed.- Update the model during debugging
When you want to change your monitor model (for example, update an expression), you can switch to another page in the Monitor Model editor, such as the Monitor Details Model or KPI Model, and make the change right away. However, changes to the monitor model are not reflected in the debugging process until you stop and restart the debugger.