Rule Execution Server API

ilog.rules.res.session
Interface IlrTraceFilter

All Superinterfaces:
Serializable
All Known Subinterfaces:
IlrDWTraceFilter

public interface IlrTraceFilter
extends Serializable

Use the class IlrTraceFilter to select the information that you want to see in the execution trace.

Code example

The following code example shows how to set all the trace filters.

   IlrSessionFactory sessionFactory = getFactory();

   // Create a session request object
   IlrSessionRequest sessionRequest = sessionFactory.createRequest();
   String rulesetPath = "/miniloanruleapp/miniloanrules";
   if (!rulesetVersion.equalsIgnoreCase("Latest")) {
     rulesetPath = rulesetPath + "/" + rulesetVersion;
   }
   sessionRequest.setRulesetPath(IlrPath.parsePath(rulesetPath));
   // Enable trace to retrieve info on executed rules
   sessionRequest.setTraceEnabled(true);
   // get all traces
   sessionRequest.getTraceFilter().setInfoAllFilters(true);
 

Since:
7.0

Field Summary
static String INFO_BOUND_OBJECT_BY_RULE
          Filter for Bound Object by Rule
static String INFO_EXECUTION_DATE
          Filter for Execution Date
static String INFO_EXECUTION_DURATION
          Filter for Execution Duration
static String INFO_EXECUTION_EVENTS
          Filter for Execution Events
static String INFO_INET_ADDRESS
          Filter for Inet Address
static String INFO_RULES
          Filter for List of All Rules
static String INFO_RULES_NOT_FIRED
          Filter for List of Rules Not Fired
static String INFO_SYSTEM_PROPERTIES
          Filter for System Properties
static String INFO_TASKS
          Filter for List of All Tasks
static String INFO_TASKS_NOT_EXECUTED
          Filter for List of Tasks Not Executed
static String INFO_TOTAL_RULES_FIRED
          Filter for Total Number of Rules Fired
static String INFO_TOTAL_RULES_NOT_FIRED
          Filter for Total Number of Rules Not Fired
static String INFO_TOTAL_TASKS_EXECUTED
          Filter for Total Number of Tasks Executed
static String INFO_TOTAL_TASKS_NOT_EXECUTED
          Filter for Total Number of Tasks Not Executed
static String INFO_WORKING_MEMORY
          Filter for Working Memory
static String WORKING_MEMORY_FILTER
          Filter to set Working Memory filter
 
Method Summary
 String getWorkingMemoryFilter()
          Returns the list of class names to trace.
 Boolean isInfoBoundObjectByRule()
          Returns the trace filter on the list of objects bound by the rules fired before execution.
 Boolean isInfoExecutionDate()
          Checks the trace filter on the execution date.
 Boolean isInfoExecutionDuration()
          Checks the trace filter on the execution duration.
 Boolean isInfoExecutionEvents()
          Returns the trace filter on the execution events, that is, the rules fired and the tasks executed.
 Boolean isInfoInetAddress()
          Tests whether the Internet address filter is activated.
 Boolean isInfoRules()
          Tests whether the filter is activated for IlrExecutionTrace.getRules()
 Boolean isInfoRulesNotFired()
          Checks the trace filter on the rules that were not fired.
 Boolean isInfoSystemProperties()
          Returns the trace filter on the working memory.
 Boolean isInfoTasks()
          Tests whether the filter is activated for IlrExecutionTrace.getTasks().
 Boolean isInfoTasksNotExecuted()
          Returns the trace filter on the tasks that were not executed.
 Boolean isInfoTotalRulesFired()
          Checks the trace filter on the number of rules fired.
 Boolean isInfoTotalRulesNotFired()
          Checks the trace filter on the number of rules that were not fired.
 Boolean isInfoTotalTasksExecuted()
          Checks the trace filter on the number of tasks executed.
 Boolean isInfoTotalTasksNotExecuted()
          Checks the trace filter on the number of tasks that were not executed.
 Boolean isInfoWorkingMemory()
          Returns the trace filter on the working memory.
 void loadFromProperties(Map<String,String> properties)
          Loads all the filters from the properties passed.
 void setFilter(String filterName, String value)
          Sets a filter from a the name of a constant.
 void setInfoAllFilters(Boolean enable)
          Enables all filters.
 void setInfoBoundObjectByRule(Boolean enabled)
          Filter on the object bound by the fired rule before its execution.
 void setInfoExecutionDate(Boolean enabled)
          Filter on the execution date.
 void setInfoExecutionDuration(Boolean enabled)
          Filter on the execution duration.
 void setInfoExecutionEvents(Boolean enabled)
          Filter on the execution events.
 void setInfoInetAddress(Boolean enabled)
          Filter on the Internet address.
 void setInfoRules(Boolean enabled)
          Activates or deactivates the Rules filter.
 void setInfoRulesNotFired(Boolean enabled)
          Filter on the rules that were not fired.
 void setInfoSystemProperties(Boolean enabled)
          Global filter on the properties of the execution environment system.
 void setInfoTasks(Boolean enabled)
          Activates or deactivates the Tasks filter.
 void setInfoTasksNotExecuted(Boolean enabled)
          Filter on the tasks that were not executed.
 void setInfoTotalRulesFired(Boolean enabled)
          Filters on the number of rules fired.
 void setInfoTotalRulesNotFired(Boolean enabled)
          Filters on the number of rules that were not fired.
 void setInfoTotalTasksExecuted(Boolean enabled)
          Filter on the number of tasks executed.
 void setInfoTotalTasksNotExecuted(Boolean enabled)
          Filter on the number of tasks that were not executed.
 void setInfoWorkingMemory(Boolean enabled)
          Global filter on the working memory.
 void setWorkingMemoryFilter(String wmFilter)
          Filter on object class names inside the working memory.
 Map<String,String> toMap()
          Returns a map of all filters.
 

Field Detail

INFO_TOTAL_RULES_FIRED

static final String INFO_TOTAL_RULES_FIRED
Filter for Total Number of Rules Fired

See Also:
Constant Field Values

INFO_TOTAL_TASKS_EXECUTED

static final String INFO_TOTAL_TASKS_EXECUTED
Filter for Total Number of Tasks Executed

See Also:
Constant Field Values

INFO_EXECUTION_EVENTS

static final String INFO_EXECUTION_EVENTS
Filter for Execution Events

See Also:
Constant Field Values

INFO_TOTAL_RULES_NOT_FIRED

static final String INFO_TOTAL_RULES_NOT_FIRED
Filter for Total Number of Rules Not Fired

See Also:
Constant Field Values

INFO_TOTAL_TASKS_NOT_EXECUTED

static final String INFO_TOTAL_TASKS_NOT_EXECUTED
Filter for Total Number of Tasks Not Executed

See Also:
Constant Field Values

INFO_RULES_NOT_FIRED

static final String INFO_RULES_NOT_FIRED
Filter for List of Rules Not Fired

See Also:
Constant Field Values

INFO_TASKS_NOT_EXECUTED

static final String INFO_TASKS_NOT_EXECUTED
Filter for List of Tasks Not Executed

See Also:
Constant Field Values

INFO_EXECUTION_DURATION

static final String INFO_EXECUTION_DURATION
Filter for Execution Duration

See Also:
Constant Field Values

INFO_RULES

static final String INFO_RULES
Filter for List of All Rules

See Also:
Constant Field Values

INFO_TASKS

static final String INFO_TASKS
Filter for List of All Tasks

See Also:
Constant Field Values

INFO_SYSTEM_PROPERTIES

static final String INFO_SYSTEM_PROPERTIES
Filter for System Properties

See Also:
Constant Field Values

WORKING_MEMORY_FILTER

static final String WORKING_MEMORY_FILTER
Filter to set Working Memory filter

See Also:
Constant Field Values

INFO_WORKING_MEMORY

static final String INFO_WORKING_MEMORY
Filter for Working Memory

See Also:
Constant Field Values

INFO_BOUND_OBJECT_BY_RULE

static final String INFO_BOUND_OBJECT_BY_RULE
Filter for Bound Object by Rule

See Also:
Constant Field Values

INFO_INET_ADDRESS

static final String INFO_INET_ADDRESS
Filter for Inet Address

See Also:
Constant Field Values

INFO_EXECUTION_DATE

static final String INFO_EXECUTION_DATE
Filter for Execution Date

See Also:
Constant Field Values
Method Detail

setInfoExecutionEvents

void setInfoExecutionEvents(Boolean enabled)
Filter on the execution events.

Parameters:
enabled - Set this parameter to true to activate this filter.

setWorkingMemoryFilter

void setWorkingMemoryFilter(String wmFilter)
Filter on object class names inside the working memory.

Parameters:
wmFilter - A string with comma-separated class names (for example, com.xyz.myClass,com.xyz.MyOtherClass. Set this parameter to null to remove the filter.

setInfoWorkingMemory

void setInfoWorkingMemory(Boolean enabled)
Global filter on the working memory.

Parameters:
enabled - Set this parameter to true to activate this filter.

setInfoSystemProperties

void setInfoSystemProperties(Boolean enabled)
Global filter on the properties of the execution environment system.

Parameters:
enabled - Set this parameter to true to activate this filter.

setInfoBoundObjectByRule

void setInfoBoundObjectByRule(Boolean enabled)
Filter on the object bound by the fired rule before its execution.

Parameters:
enabled - Set this parameter to true to activate this filter.

isInfoExecutionEvents

Boolean isInfoExecutionEvents()
Returns the trace filter on the execution events, that is, the rules fired and the tasks executed.

Returns:
true if the execution trace contains the rules fired.

isInfoWorkingMemory

Boolean isInfoWorkingMemory()
Returns the trace filter on the working memory.

Returns:
true if the execution trace contains the working memory.

isInfoSystemProperties

Boolean isInfoSystemProperties()
Returns the trace filter on the working memory.

Returns:
true if the execution trace contains the system properties.

getWorkingMemoryFilter

String getWorkingMemoryFilter()
Returns the list of class names to trace.

Returns:
the filter to apply to the working memory. This filter is a list of class names. The class names are separated by a comma. If this filter is empty, no filter is applied.

isInfoBoundObjectByRule

Boolean isInfoBoundObjectByRule()
Returns the trace filter on the list of objects bound by the rules fired before execution.

Returns:
code>true if the execution trace contains the list of objects bound by the rules fired before execution.

loadFromProperties

void loadFromProperties(Map<String,String> properties)
Loads all the filters from the properties passed. This reinitializes all the previously set filters to false. The passed properties must contain filters expressed as:
   INFO_TOTAL_RULES_FIRED=true
   INFO_WORKING_MEMORY=true
   WORKING_MEMORY_FILTER=com.xyz.MyClass1,com.xyz.MyClass2
   ...
 
where the name of the property corresponds to the JavaBeans property to be set on the IlrTraceFilter object. For example:
   INFO_TOTAL_RULES_FIRED=true -> setInfoNumRulesFired(true)
 

Parameters:
properties - a Properties object that contains the filters.

toMap

Map<String,String> toMap()
Returns a map of all filters.

Returns:
a map of all filters.

setFilter

void setFilter(String filterName,
               String value)
Sets a filter from a the name of a constant. See the constants defined in this interface.

Parameters:
filterName - the name of the filter to set.
value - the value of the filter.

setInfoTotalRulesFired

void setInfoTotalRulesFired(Boolean enabled)
Filters on the number of rules fired.

Parameters:
enabled - Set this parameter to true to filter on the number of rules fired.

setInfoTotalTasksExecuted

void setInfoTotalTasksExecuted(Boolean enabled)
Filter on the number of tasks executed.

Parameters:
enabled - Set this parameter to true to filter on the number of tasks executed.

setInfoTotalRulesNotFired

void setInfoTotalRulesNotFired(Boolean enabled)
Filters on the number of rules that were not fired.

Parameters:
enabled - Set this parameter to true to filter on the number of rules that were not fired.

setInfoTotalTasksNotExecuted

void setInfoTotalTasksNotExecuted(Boolean enabled)
Filter on the number of tasks that were not executed.

Parameters:
enabled - Set this parameter to true to filter on the number of tasks that were not executed.

setInfoRulesNotFired

void setInfoRulesNotFired(Boolean enabled)
Filter on the rules that were not fired.

Parameters:
enabled - Set this parameter to true to filter on the rules that were not fired.

setInfoTasksNotExecuted

void setInfoTasksNotExecuted(Boolean enabled)
Filter on the tasks that were not executed.

Parameters:
enabled - Set this parameter to true to filter on the tasks that were not executed.

setInfoExecutionDate

void setInfoExecutionDate(Boolean enabled)
Filter on the execution date.

Parameters:
enabled - Set this parameter to true to filter on the execution date.

setInfoExecutionDuration

void setInfoExecutionDuration(Boolean enabled)
Filter on the execution duration.

Parameters:
enabled - Set this parameter to true to filter on the execution duration.

setInfoInetAddress

void setInfoInetAddress(Boolean enabled)
Filter on the Internet address.

Parameters:
enabled - Set this parameter to true to filter on the Internet address.

isInfoRulesNotFired

Boolean isInfoRulesNotFired()
Checks the trace filter on the rules that were not fired.

Returns:
true if the execution trace contains the rules that were not fired.

isInfoTasksNotExecuted

Boolean isInfoTasksNotExecuted()
Returns the trace filter on the tasks that were not executed.

Returns:
true if the execution trace contains the tasks that were not executed.

isInfoExecutionDate

Boolean isInfoExecutionDate()
Checks the trace filter on the execution date.

Returns:
true if the execution trace contains the execution date.

isInfoExecutionDuration

Boolean isInfoExecutionDuration()
Checks the trace filter on the execution duration.

Returns:
true if the execution trace contains the execution duration.

isInfoTotalRulesFired

Boolean isInfoTotalRulesFired()
Checks the trace filter on the number of rules fired.

Returns:
true if the execution trace contains the number of rules fired.

isInfoTotalTasksExecuted

Boolean isInfoTotalTasksExecuted()
Checks the trace filter on the number of tasks executed.

Returns:
true if the execution trace contains the number of tasks executed.

isInfoTotalRulesNotFired

Boolean isInfoTotalRulesNotFired()
Checks the trace filter on the number of rules that were not fired.

Returns:
true if the execution trace contains the number of rules that were not fired.

isInfoTotalTasksNotExecuted

Boolean isInfoTotalTasksNotExecuted()
Checks the trace filter on the number of tasks that were not executed.

Returns:
true if the execution trace contains the number of tasks that were not executed.

isInfoRules

Boolean isInfoRules()
Tests whether the filter is activated for IlrExecutionTrace.getRules()

Returns:
true if the filter is activated for this method.

isInfoTasks

Boolean isInfoTasks()
Tests whether the filter is activated for IlrExecutionTrace.getTasks().

Returns:
true if the filter is activated for this method.

isInfoInetAddress

Boolean isInfoInetAddress()
Tests whether the Internet address filter is activated.

Returns:
true if the Internet address filter is activated

setInfoRules

void setInfoRules(Boolean enabled)
Activates or deactivates the Rules filter.

Parameters:
enabled - Set this parameter to true to activate the Rules filter.

setInfoTasks

void setInfoTasks(Boolean enabled)
Activates or deactivates the Tasks filter.

Parameters:
enabled - Set this parameter to true to activate the Tasks filter.

setInfoAllFilters

void setInfoAllFilters(Boolean enable)
Enables all filters. This is a shortcut method that calls the setXxx() method on all the individual filters.

Parameters:
enable - Set this parameter to true to enable all the filters.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013