IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing monitor models > Debugging monitor models
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.)
To test a specific time-based trigger:
Procedure
- In the High-Level Steps list, right-click the trigger.
- Click Emit Time Check Event.
Results
An event to test the trigger is generated for you. This event is added to the bottom of the input queue, so any other events that you have sent will be processed first.
What to do next
- Use a script to send events
You can also create scripts for sending time-based events through the debugger using the Integrated Test Client. There are two kinds of TIME-CHECK events that you might want to send:
- Generic - targeting all time-based triggers in the model
- Specific - targeting a specific time-based trigger
To create a TIME-CHECK event to test a time-based trigger:
- Create an XML file containing one of the following XML documents depending on the kind of event it is for.
- For a generic event, use the following XML. You will replace the attribute values in bold typeface in the next step.
<cbe:CommonBaseEvent version="1.0.1" creationTime=" 2008-05-22T18:39:50.214-05:00" extensionName="TIME-CHECK" xmlns:cbe="http://www.ibm.com/AC/commonbaseevent1_0_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <cbe:sourceComponentId component="" componentIdType="" componentType="" location="" locationType="locationType" subComponent="" /> <cbe:situation categoryName="RequestSituation"> <cbe:situationType xsi:type="cbe:RequestSituation" reasoningScope="" situationQualifier="" successDisposition="" /> </cbe:situation> </cbe:CommonBaseEvent>- For a specific event, use the following XML. You will replace the attribute values in bold typeface in the next step.
<cbe:CommonBaseEvent version="1.0.1" creationTime=" 2008-05-22T18:39:50.214-05:00" extensionName="TIME-CHECK" msg=" WarehouseMonitor.MDM.WarehouseItem.lowUsage" xmlns:cbe="http://www.ibm.com/AC/commonbaseevent1_0_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <cbe:sourceComponentId component="" componentIdType="" componentType="" location="" locationType="locationType" subComponent="" /> <cbe:situation categoryName="RequestSituation"> <cbe:situationType xsi:type="cbe:RequestSituation" reasoningScope="" situationQualifier="" successDisposition="" /> </cbe:situation> </cbe:CommonBaseEvent>
- Replace the values for creationTime (in both the generic and specific events), and the msg (in specific events) as follows:
- creationTime - The time must be greater than or equal to the next evaluation time of the trigger to be evaluated. You can inspect the data in the Instances view to see this value.
- msg - If the time-based trigger is in a monitoring context, this value must be:
<monitor model ID>.MDM. <top-level monitoring context ID>. ... . <bottom-level monitoring context ID>. <trigger ID>If the time-based trigger is in a KPI context, this value must be:
<monitor model ID>.KM. <KPI context ID>. <trigger ID>
- In the Integrated Test Client, in the Test Script section, click Import events
and select File containing events. Navigate to the directory where you put the file that you just created, select the file, and click Open. Click Finish. An import command with the file name that you specified is added to the script.
- To run the script and send the sample event, click Emit Events
.