Execution trace API
Execution traces record which rules and tasks are executed. Specific classes and methods are available for you to trace ruleset execution on the server side and on the client side.
Use the following ilog.rules.res.session classes
and methods to define what you want the execution trace to show.
On the server side
To trace execution on the server side, use the EventPlugin class.
On the client side
On the client side, the following classes and methods are available.
- Access the execution trace directly
IlrSessionResponseinterface.- Get a response with an execution trace
IlrSessionRequest.IlrSessionRequest#setTraceEnabled(true)method- Access the business names
- Call the following methods of the
IlrBusinessExecutionTraceclass:- Business names of rules and tasks:
IlrBusinessExecutionTrace businessTrace = new IlrBusinessExecutionTrace(response.getRulesetExecutionTrace()); - Business name of an executed rule:
businessTrace.getRuleFiredBusinessNames()
- Business names of rules and tasks:
- Initialize input parameters
IlrSessionRequest.setInputParameterandIlrSessionRequest.setInputParametersmethods- Access the execution events as a tree of the executed tasks, and of the executed rules in each task, in their execution order
IlrSessionRequest.getTraceFilter().setInfoExecutionEventsmethodTip:By default, the objects that are bound to the rules are serialized in the trace. Such binding is possible only if the XOM objects are all serializable. Otherwise, also use the
IlrSessionRequest.getTraceFilter().setInfoBoundObjectByRulemethod to filter out from the execution trace the information about the objects that are bound to the executed rules.- Filter the execution data
- IlrTraceFilter interface
- Get the exact version of the executed ruleset
IlrSessionResponse.getCanonicalRulesetPathmethod- Get the state of the working memory
IlrTraceFilter.setInfoWorkingMemorymethod