Setting the InfoRulesFiredPropertiesFilter parameter
When running a ruleset, if the rulesFired option of the decisionTraceFilter is applied, the InfoRulesFiredPropertiesFilter parameter can be used to filter the properties of the ruleInformation for the run rules.
When using the decision service to run a ruleset, you can set the rulesFired property of the decision trace filter to true in the payload:
XML payload:
<trac:decisionTraceFilter>
<trac:rulesFired>true</trac:rulesFired>
</trac:decisionTraceFilter>
JSON payload:
"__TraceFilter__": {
"infoRulesFired": true
}As a result, the output includes information about the fired rules. The following is an example
of the output for the rulesFired information:
...
<rulesFired>
<ruleInformation>
<name>eligibility.minimum_credit_score</name>
<businessName>eligibility.minimum credit score</businessName>
<properties>
<property name="ruleExecutionShortName">minimum_credit_score</property>
<property name="ilog.rules.package">eligibility</property>
<property name="ruleExecutionName">eligibility.minimum_credit_score</property>
<property name="ilog.rules.group">eligibility.minimum credit score</property>
<property name="packageExecutionName">eligibility</property>
<property name="status">new</property>
</properties>
</ruleInformation>
</rulesFired>
...To filter the properties of the ruleInformation element, you can use the
parameter InfoRulesFiredPropertiesFilter = true. The following shows the output
when this filter is applied, with the property section of the ruleInformation
filtered out:
...
<rulesFired>
<ruleInformation>
<name>eligibility.minimum_credit_score</name>
<businessName>eligibility.minimum credit score</businessName>
<properties/>
</ruleInformation>
</rulesFired>
...Setting InfoRulesFiredPropertiesFilter
The parameter InfoRulesFiredPropertiesFilter can be set in the following locations:
- Web.xml of the decision service (HTDS) as a context parameter
- The default value is false:
<context-param> <param-name>InfoRulesFiredPropertiesFilter</param-name> <param-value>false</param-value> </context-param> - Query of the decision service
- Example:
http://localhost:9081/DecisionService/rest/miniloan/1.0/miniloan/1.0?InfoRulesFiredPropertiesFilter=true - Headers of the decision service
- Example:
postMethod.setHeader("InfoRulesFiredPropertiesFilter", "true"); - Parameter values
- The InfoRulesFiredPropertiesFilter parameter can be set to either true or
false, depending on whether you want to include or filter the properties of the
ruleInformation.The result of applying the InfoRulesFiredPropertiesFilter in the query, headers, and web.xml is as follows:
Query Headers web.xml Properties filtered out true true false false not used true true not used false false not used not used true true not used not used false false