Appendix D BusinessEvents Tools Overview : BusinessEvents Tools—Rule Debugger User Interface Overview

BusinessEvents Tools—Rule Debugger User Interface Overview
Rule debugger has all the panels found in Rule Analyzer (shown in BusinessEvents Tools—Rule Analyzer User Interface Overview), plus two more: the Rule Execution History and Debug Context Window panel.
Step Mode
In step mode, the engine pauses just before and just after each rule fires. You click the Step button to step to the next pause. Pausing before the rule fires lets you see how the rule conditions are matched by entities in working memory. Pausing after the rule fires lets you see the effect of the rule action or actions on the entities, and potentially on the rules in the agenda. The Rule Debugger panels show most information when you use step mode.
Rule Execution History Panel
When you use step mode, the Rule Execution History window shows you each rule in the rule agenda, in order of execution, for one conflict resolution cycle (see Understanding Conflict Resolution and Run to Completion Cycles).
You can click a rule box icon to display information about the rule in the Properties and Source panels. A yellow border appears around the selected rule. In addition, a pop-up window of facts relating to the rule displays.
You can also review past rule execution cycles (using up and down arrows).
Rule Box Color
The current rule is shown in an orange box. Rules that have executed appear in grey boxes to the left of the orange box. Rules in the rule agenda that may fire are shown in blue boxes to the right of the orange box (and also in the Agenda tab).
See Table 44, Rule Debugger Rule Execution History Panel Toolbar Options for details on the toolbar options.
Debug Context Window Panel
When you use step mode, Debug Context Window provides information about all rules that have fired and, in the case of the Agenda tab, are about to fire. This panel contains four tabs providing information about the current rule execution context, and a toolbar to control rule execution.
Step Mode and Run Mode  When you use run mode, only the Console tab displays information, and only if the engine is local. It is only in step mode that the detailed information becomes available.
Services with Multiple Rule Sessions
The rule execution details for each rule session are shown separately. To switch from one rule session to another, click the tabs at the bottom of the Debug Context panel. Each tab shows the name of one rule session:
See Table 45, Debug Context Panel Toolbar Buttons for details on the toolbar options.
Debug Context Window Panel Tabs
This section describes each of the tabs available in the Debug Context Window panel.
Console Tab
Shows information about the engine startup, rules being added, and so on. Displays messages printed to the console, as specified in particular rules, as they execute.
The information is similar to what you see when you start the BusinessEvents engine at the command line. This information is also saved in the engine log file (see BE Working Directory (and Log File Location) for information on location of the log files).
The first line shows the location of the property file used for this session. The property file for a debugger session is generated from the one specified in the debugger profile and is stored in the user’s temp area. For example, on the Windows platform, you might see:
Using property file: C:\DOCUME~1\jsmith\LOCALS~1\Temp\be-engine33146.tra
When you use run mode, only the Console tab is used. The other tabs in the Debug Context Window panel are used only in step mode.
Conditions Tab
Shows how the conditions for the rule that just fired were resolved. Click on a condition to view facts used to resolve the condition.
The most recent conditions appear at the top. Conditions with a red dot evaluated to false. Conditions with a green dot evaluated to true.
You can click a condition to expand it and see the facts that were associated with that condition at the time it was evaluated.
Agenda Tab
The Agenda tab shows the name of each of the rules in the agenda. You can expand the rules in the Rule column to see more information. Click a rule to see a single-line summary about each object affected by the rule actions. You can then expand the object nodes to see more details.
The rule at the top of the list corresponds to the rule directly to the right of the current rule (shown in the orange box). It is the next rule that will fire (unless a re-evaluation changes the agenda).
The Summary, Timestamp, and RTC Cycle columns are not currently used.
Facts Tab
The Facts tab shows facts used by the last rule that executed.
The same information appears in a pop-up window when you click on that rule’s box in the Rule Execution History window. (The pop-up window shows facts relating to rules that fired earlier when you click on their boxes.)