ILOG JRules User Guide > Executing Rules > Tasks > Executing a Ruleset Using Rule Execution Server > Tracing Ruleset Execution

You can get information on the tasks executed and the rules fired, and information on the working memory, including which version of the ruleset was executed.

To get information on the tasks executed and the rules fired:

To get information on the working memory:

desc.addFilterProperty(IlrExecutionTraceFilterConstants.INFO_WORKING_MEMORY, "true");

If you want to obtain the exact version of the executed ruleset, you can request the canonical ruleset path, using the following code:

IlrSessionResponse.getExecutionProperties().getCanonicalRulesetPath()

When the ruleset execution has completed, the execution trace is stored in an object and you can inspect the traces.

You can also get a trace when a ruleset is executed, using one of the following:

To invoke the execution trace in J2SE:

IlrSessionRequest request = new IlrSessionRequest(rulesetName); 
IlrSessionExecutionSettings execSettings = request.getExecutionSettings(); 
IlrSessionDescriptor desc = request.getSessionDescriptor(); 
ilog.rules.bres.session.IlrSessionFilter filter = ...;
    desc.setFilters(filter); 
    
IlrSessionParameters parameters = execSettings.getInputParameters(); 
parameters.setParameter("borrower", borrower); 
parameters.setParameter("loan", loan); 
 
IlrSessionResponse response; 
 
try { 
     IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactory.
                                       Builder(IlrRuleSessionProviderFactory.
                                      J2SE_RULESESSION_PROVIDER).
                                      setLogger(loggerPrinter).build(); 
     IlrStatelessRuleSession session = provider.
                                       createStatelessRuleSession(); 
     response = session.executeRules(request); 
{
catch {
      ...
}

To invoke the execution trace in J2EE/POJO:

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactory.
                                  Builder(IlrRuleSessionProviderFactory.
                                  SIMPLE_RULESESSION_PROVIDER).build();

To invoke the execution trace in J2EE/EJB:

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactory.
                                 Builder(IlrRuleSessionProviderFactory.
                                 MANAGED_RULESESSION_PROVIDER).build();

Related Concepts

Ruleset Execution Trace

Related Tasks

Creating a POJO Client Project for RuleApps
Creating a Web Service or Monitored Transparent Decision Service Project for RuleApps
Creating an SCA Component Client Project for RuleApps
Adding RuleApp Execution Artifacts to an Existing Project
Maintaining Execution Code Generators
Implementing a Ruleset Execution Interceptor
Invoking a Ruleset Using a Stateless Rule Session
Invoking a Ruleset Using a Stateful Rule Session
Invoking a Ruleset Using a Message-Driven Rule Bean
Monitoring Ruleset Execution Using the MBeans Accessor API
Handling Rule Engine Exceptions in Rule Execution Server

Related Reference

New Client Project for RuleApps Wizard
Execution Options Page