| ILOG JRules User Guide > Running and Debugging > Tasks > Troubleshooting Execution > Debug Notifications |
Debug Notifications |
PREVIOUS NEXT |
Debugging of the sequential mode should be explicitly turned on so that the tools (IlrTool) connected to the rule engine can receive notification events at runtime. Once debugging is activated, the sequential mode compiler adds extra notification instructions to the generated bytecode.
You can activate the generation of the debugging notifications for the sequential mode:
You can activate debugging in IRL at task or at ruleset level, or for a particular task by setting the debug property.
To activate debugging at task level:
ruletask T {
property ilog.rules.engine.sequential.debug = true;
algorithm = sequential;
...
}
To activate debugging in IRL at ruleset level:
property ilog.rules.engine.sequential.debug = true;
}
ruletask T1 {
algorithm = sequential;
...
}
ruletask T2 {
algorithm = sequential;
...
}
In this case, debugging notifications will be added to the generated bytecode to both task T1 and task T2.
You can also activate debugging of the sequential mode for a particular task using a special generic notation:
property ilog.rules.engine.sequential.debug.T1 = true;
}
ruletask T1 {
algorithm = sequential;
...
}
ruletask T2 {
algorithm = sequential;
...
}
In this case, debugging notifications will be generated only for T1 and not for T2.
You can set the ruleset property using the API. In this case, you need to set the property prior to any parsing. This enables the debugging activation property to be taken into account even in the static case where the sequential ruletask is defined by an explicit list of rule names.
package myPackage;
import ilog.rules.engine.IlrRuleset;
import ilog.rules.factory.IlrPropertyList;
public class MyDebugSetter {
public static void setDebug(IlrRuleset rs,
boolean debug)
{
IlrPropertyList props = rs.getProperties();
Boolean wrapper = (debug ? Boolean.TRUE
: Boolean.FALSE);
// Pass a Boolean wrapper, not a String !
props.put("ilog.rules.engine.sequential.debug",wrapper);
}
}
You can activate debugging for the sequential mode by setting a Java property, typically when launching the application.
java -Dilog.rules.engine.sequential.debug=true myApp
Notice that the name of the variable must be fully qualified with "ilog.rules.engine" so as not to conflict with other Java variables.
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |