ilog.rules.res.session
Interface IlrTraceFilter
-
- All Superinterfaces:
- java.io.Serializable
- All Known Subinterfaces:
- IlrDWTraceFilter
public interface IlrTraceFilter extends java.io.Serializable
Use the classIlrTraceFilter
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
Fields Modifier and Type Field and Description static java.lang.String
INFO_BOUND_OBJECT_BY_RULE
Filter for Bound Object by Rulestatic java.lang.String
INFO_EXECUTION_DATE
Filter for Execution Datestatic java.lang.String
INFO_EXECUTION_DURATION
Filter for Execution Durationstatic java.lang.String
INFO_EXECUTION_EVENTS
Filter for Execution Eventsstatic java.lang.String
INFO_INET_ADDRESS
Filter for Inet Addressstatic java.lang.String
INFO_RULES
Filter for List of All Rulesstatic java.lang.String
INFO_RULES_NOT_FIRED
Filter for List of Rules Not Firedstatic java.lang.String
INFO_SYSTEM_PROPERTIES
Filter for System Propertiesstatic java.lang.String
INFO_TASKS
Filter for List of All Tasksstatic java.lang.String
INFO_TASKS_NOT_EXECUTED
Filter for List of Tasks Not Executedstatic java.lang.String
INFO_TOTAL_RULES_FIRED
Filter for Total Number of Rules Firedstatic java.lang.String
INFO_TOTAL_RULES_NOT_FIRED
Filter for Total Number of Rules Not Firedstatic java.lang.String
INFO_TOTAL_TASKS_EXECUTED
Filter for Total Number of Tasks Executedstatic java.lang.String
INFO_TOTAL_TASKS_NOT_EXECUTED
Filter for Total Number of Tasks Not Executedstatic java.lang.String
INFO_WORKING_MEMORY
Filter for Working Memorystatic java.lang.String
WORKING_MEMORY_FILTER
Filter to set Working Memory filter
-
Method Summary
Methods Modifier and Type Method and Description java.lang.String
getWorkingMemoryFilter()
Returns the list of class names to trace.java.lang.Boolean
isInfoBoundObjectByRule()
Returns the trace filter on the list of objects bound by the rules fired before execution.java.lang.Boolean
isInfoExecutionDate()
Checks the trace filter on the execution date.java.lang.Boolean
isInfoExecutionDuration()
Checks the trace filter on the execution duration.java.lang.Boolean
isInfoExecutionEvents()
Returns the trace filter on the execution events, that is, the rules fired and the tasks executed.java.lang.Boolean
isInfoInetAddress()
Tests whether the Internet address filter is activated.java.lang.Boolean
isInfoRules()
Tests whether the filter is activated forIlrExecutionTrace.getRules()
java.lang.Boolean
isInfoRulesNotFired()
Checks the trace filter on the rules that were not fired.java.lang.Boolean
isInfoSystemProperties()
Returns the trace filter on the working memory.java.lang.Boolean
isInfoTasks()
Tests whether the filter is activated forIlrExecutionTrace.getTasks()
.java.lang.Boolean
isInfoTasksNotExecuted()
Returns the trace filter on the tasks that were not executed.java.lang.Boolean
isInfoTotalRulesFired()
Checks the trace filter on the number of rules fired.java.lang.Boolean
isInfoTotalRulesNotFired()
Checks the trace filter on the number of rules that were not fired.java.lang.Boolean
isInfoTotalTasksExecuted()
Checks the trace filter on the number of tasks executed.java.lang.Boolean
isInfoTotalTasksNotExecuted()
Checks the trace filter on the number of tasks that were not executed.java.lang.Boolean
isInfoWorkingMemory()
Returns the trace filter on the working memory.void
loadFromProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Loads all the filters from the properties passed.void
setFilter(java.lang.String filterName, java.lang.String value)
Sets a filter from a the name of a constant.void
setInfoAllFilters(java.lang.Boolean enable)
Enables all filters.void
setInfoBoundObjectByRule(java.lang.Boolean enabled)
Filter on the object bound by the fired rule before its execution.void
setInfoExecutionDate(java.lang.Boolean enabled)
Filter on the execution date.void
setInfoExecutionDuration(java.lang.Boolean enabled)
Filter on the execution duration.void
setInfoExecutionEvents(java.lang.Boolean enabled)
Filter on the execution events.void
setInfoInetAddress(java.lang.Boolean enabled)
Filter on the Internet address.void
setInfoRules(java.lang.Boolean enabled)
Activates or deactivates the Rules filter.void
setInfoRulesNotFired(java.lang.Boolean enabled)
Filter on the rules that were not fired.void
setInfoSystemProperties(java.lang.Boolean enabled)
Global filter on the properties of the execution environment system.void
setInfoTasks(java.lang.Boolean enabled)
Activates or deactivates the Tasks filter.void
setInfoTasksNotExecuted(java.lang.Boolean enabled)
Filter on the tasks that were not executed.void
setInfoTotalRulesFired(java.lang.Boolean enabled)
Filters on the number of rules fired.void
setInfoTotalRulesNotFired(java.lang.Boolean enabled)
Filters on the number of rules that were not fired.void
setInfoTotalTasksExecuted(java.lang.Boolean enabled)
Filter on the number of tasks executed.void
setInfoTotalTasksNotExecuted(java.lang.Boolean enabled)
Filter on the number of tasks that were not executed.void
setInfoWorkingMemory(java.lang.Boolean enabled)
Global filter on the working memory.void
setWorkingMemoryFilter(java.lang.String wmFilter)
Filter on object class names inside the working memory.java.util.Map<java.lang.String,java.lang.String>
toMap()
Returns a map of all filters.
-
-
-
Field Detail
-
INFO_TOTAL_RULES_FIRED
static final java.lang.String INFO_TOTAL_RULES_FIRED
Filter for Total Number of Rules Fired- See Also:
- Constant Field Values
-
INFO_TOTAL_TASKS_EXECUTED
static final java.lang.String INFO_TOTAL_TASKS_EXECUTED
Filter for Total Number of Tasks Executed- See Also:
- Constant Field Values
-
INFO_EXECUTION_EVENTS
static final java.lang.String INFO_EXECUTION_EVENTS
Filter for Execution Events- See Also:
- Constant Field Values
-
INFO_TOTAL_RULES_NOT_FIRED
static final java.lang.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 java.lang.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 java.lang.String INFO_RULES_NOT_FIRED
Filter for List of Rules Not Fired- See Also:
- Constant Field Values
-
INFO_TASKS_NOT_EXECUTED
static final java.lang.String INFO_TASKS_NOT_EXECUTED
Filter for List of Tasks Not Executed- See Also:
- Constant Field Values
-
INFO_EXECUTION_DURATION
static final java.lang.String INFO_EXECUTION_DURATION
Filter for Execution Duration- See Also:
- Constant Field Values
-
INFO_RULES
static final java.lang.String INFO_RULES
Filter for List of All Rules- See Also:
- Constant Field Values
-
INFO_TASKS
static final java.lang.String INFO_TASKS
Filter for List of All Tasks- See Also:
- Constant Field Values
-
INFO_SYSTEM_PROPERTIES
static final java.lang.String INFO_SYSTEM_PROPERTIES
Filter for System Properties- See Also:
- Constant Field Values
-
WORKING_MEMORY_FILTER
static final java.lang.String WORKING_MEMORY_FILTER
Filter to set Working Memory filter- See Also:
- Constant Field Values
-
INFO_WORKING_MEMORY
static final java.lang.String INFO_WORKING_MEMORY
Filter for Working Memory- See Also:
- Constant Field Values
-
INFO_BOUND_OBJECT_BY_RULE
static final java.lang.String INFO_BOUND_OBJECT_BY_RULE
Filter for Bound Object by Rule- See Also:
- Constant Field Values
-
INFO_INET_ADDRESS
static final java.lang.String INFO_INET_ADDRESS
Filter for Inet Address- See Also:
- Constant Field Values
-
INFO_EXECUTION_DATE
static final java.lang.String INFO_EXECUTION_DATE
Filter for Execution Date- See Also:
- Constant Field Values
-
-
Method Detail
-
setInfoExecutionEvents
void setInfoExecutionEvents(java.lang.Boolean enabled)
Filter on the execution events.- Parameters:
enabled
- Set this parameter totrue
to activate this filter.
-
setWorkingMemoryFilter
void setWorkingMemoryFilter(java.lang.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 tonull
to remove the filter.
-
setInfoWorkingMemory
void setInfoWorkingMemory(java.lang.Boolean enabled)
Global filter on the working memory.- Parameters:
enabled
- Set this parameter totrue
to activate this filter.
-
setInfoSystemProperties
void setInfoSystemProperties(java.lang.Boolean enabled)
Global filter on the properties of the execution environment system.- Parameters:
enabled
- Set this parameter totrue
to activate this filter.
-
setInfoBoundObjectByRule
void setInfoBoundObjectByRule(java.lang.Boolean enabled)
Filter on the object bound by the fired rule before its execution.- Parameters:
enabled
- Set this parameter totrue
to activate this filter.
-
isInfoExecutionEvents
java.lang.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
java.lang.Boolean isInfoWorkingMemory()
Returns the trace filter on the working memory.- Returns:
true
if the execution trace contains the working memory.
-
isInfoSystemProperties
java.lang.Boolean isInfoSystemProperties()
Returns the trace filter on the working memory.- Returns:
true
if the execution trace contains the system properties.
-
getWorkingMemoryFilter
java.lang.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
java.lang.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(java.util.Map<java.lang.String,java.lang.String> properties)
Loads all the filters from the properties passed. This reinitializes all the previously set filters tofalse
. 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 theIlrTraceFilter
object. For example:INFO_TOTAL_RULES_FIRED=true -> setInfoNumRulesFired(true)
- Parameters:
properties
- aProperties
object that contains the filters.
-
toMap
java.util.Map<java.lang.String,java.lang.String> toMap()
Returns a map of all filters.- Returns:
- a map of all filters.
-
setFilter
void setFilter(java.lang.String filterName, java.lang.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(java.lang.Boolean enabled)
Filters on the number of rules fired.- Parameters:
enabled
- Set this parameter totrue
to filter on the number of rules fired.
-
setInfoTotalTasksExecuted
void setInfoTotalTasksExecuted(java.lang.Boolean enabled)
Filter on the number of tasks executed.- Parameters:
enabled
- Set this parameter totrue
to filter on the number of tasks executed.
-
setInfoTotalRulesNotFired
void setInfoTotalRulesNotFired(java.lang.Boolean enabled)
Filters on the number of rules that were not fired.- Parameters:
enabled
- Set this parameter totrue
to filter on the number of rules that were not fired.
-
setInfoTotalTasksNotExecuted
void setInfoTotalTasksNotExecuted(java.lang.Boolean enabled)
Filter on the number of tasks that were not executed.- Parameters:
enabled
- Set this parameter totrue
to filter on the number of tasks that were not executed.
-
setInfoRulesNotFired
void setInfoRulesNotFired(java.lang.Boolean enabled)
Filter on the rules that were not fired.- Parameters:
enabled
- Set this parameter totrue
to filter on the rules that were not fired.
-
setInfoTasksNotExecuted
void setInfoTasksNotExecuted(java.lang.Boolean enabled)
Filter on the tasks that were not executed.- Parameters:
enabled
- Set this parameter totrue
to filter on the tasks that were not executed.
-
setInfoExecutionDate
void setInfoExecutionDate(java.lang.Boolean enabled)
Filter on the execution date.- Parameters:
enabled
- Set this parameter totrue
to filter on the execution date.
-
setInfoExecutionDuration
void setInfoExecutionDuration(java.lang.Boolean enabled)
Filter on the execution duration.- Parameters:
enabled
- Set this parameter totrue
to filter on the execution duration.
-
setInfoInetAddress
void setInfoInetAddress(java.lang.Boolean enabled)
Filter on the Internet address.- Parameters:
enabled
- Set this parameter totrue
to filter on the Internet address.
-
isInfoRulesNotFired
java.lang.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
java.lang.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
java.lang.Boolean isInfoExecutionDate()
Checks the trace filter on the execution date.- Returns:
true
if the execution trace contains the execution date.
-
isInfoExecutionDuration
java.lang.Boolean isInfoExecutionDuration()
Checks the trace filter on the execution duration.- Returns:
true
if the execution trace contains the execution duration.
-
isInfoTotalRulesFired
java.lang.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
java.lang.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
java.lang.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
java.lang.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
java.lang.Boolean isInfoRules()
Tests whether the filter is activated forIlrExecutionTrace.getRules()
- Returns:
true
if the filter is activated for this method.
-
isInfoTasks
java.lang.Boolean isInfoTasks()
Tests whether the filter is activated forIlrExecutionTrace.getTasks()
.- Returns:
true
if the filter is activated for this method.
-
isInfoInetAddress
java.lang.Boolean isInfoInetAddress()
Tests whether the Internet address filter is activated.- Returns:
true
if the Internet address filter is activated
-
setInfoRules
void setInfoRules(java.lang.Boolean enabled)
Activates or deactivates the Rules filter.- Parameters:
enabled
- Set this parameter totrue
to activate the Rules filter.
-
setInfoTasks
void setInfoTasks(java.lang.Boolean enabled)
Activates or deactivates the Tasks filter.- Parameters:
enabled
- Set this parameter totrue
to activate the Tasks filter.
-
setInfoAllFilters
void setInfoAllFilters(java.lang.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 totrue
to enable all the filters.
-
-