Setting up debug notification with Java API
How to set up debug notification with Java™ API.
About this task
You can set the sequential.debug property in API statements. If you do so, you must set the property before any parsing so that it is taken into account even if the sequential rule task is defined statically by an explicit list of rule names.
Procedure
To set up debug notification with Java API:
Write code as follows. Make sure you pass a Boolean wrapper,
not a String.
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);
}
}