in ODM 9.0.0.1 (Dec 2024), we added a parameter to remove the details on rule properties when requesting the trace with infoRulesFired:
Original Message:
Sent: Thu February 13, 2025 06:16 AM
From: anubhav farkya
Subject: ODM - How to get all rules fired and return them on response of decision service
infoRulesFired will return rule properties as well which is making response clumsy , I just need the business name of all the rules in response.
Also can i do some thing in end of the rule flow to get the trace and explicitly set the rule names in my response object via any API.
------------------------------
anubhav farkya
Original Message:
Sent: Wed February 12, 2025 12:30 PM
From: Alain Robert
Subject: ODM - How to get all rules fired and return them on response of decision service
if using json the name of the property is infoRulesFired
if using XML the name of the property is rulesFired
You can see all the options from the RES Console if you do Retrieve HTDS Description File and select the option Decision Trace Information
The properties in JSON:
"__TraceFilter__": {
"infoRulesetProperties": false,
"infoOutputString": false,
"infoInputParameters": false,
"infoOutputParameters": false,
"none": false,
"infoExecutionEventsAsked": false,
"workingMemoryFilter": "string",
"infoBoundObjectByRule": false,
"infoExecutionDuration":false,
"infoExecutionDate": false,
"infoExecutionEvents": false,
"infoInetAddress": false,
"infoRules": false,
"infoRulesNotFired": false,
"infoSystemProperties": false,
"infoTasks": false,
"infoTasksNotExecuted": false,
"infoTotalRulesFired": false,
"infoTotalRulesNotFired": false,
"infoTotalTasksExecuted": false,
"infoTotalTasksNotExecuted": false,
"infoWorkingMemory": false,
"infoRulesFired": true,
"infoTasksExecuted": false,
"infoBoundObjectSerializationType": "ClassName"
}
in XML the properties are: (note that they are all optional you only need to define the one you want to be true)
<trac:decisionTraceFilter>
<trac:all>false</trac:all>
<trac:none>true</trac:none>
<trac:executionDuration>true</trac:executionDuration>
<trac:executionDate>true</trac:executionDate>
<trac:rulesetProperties>true</trac:rulesetProperties>
<trac:systemProperties>true</trac:systemProperties>
<trac:inetAddress>true</trac:inetAddress>
<trac:totalRulesFired>false</trac:totalRulesFired>
<trac:totalRulesNotFired>false</trac:totalRulesNotFired>
<trac:rules>false</trac:rules>
<trac:rulesFired>true</trac:rulesFired>
<trac:rulesNotFired>true</trac:rulesNotFired>
<trac:totalTasksExecuted>false</trac:totalTasksExecuted>
<trac:totalTasksNotExecuted>true</trac:totalTasksNotExecuted>
<trac:tasks>false</trac:tasks>
<trac:tasksExecuted>false</trac:tasksExecuted>
<trac:tasksNotExecuted>false</trac:tasksNotExecuted>
<trac:outputString>false</trac:outputString>
<trac:inputParameters>false</trac:inputParameters>
<trac:outputParameters>true</trac:outputParameters>
<trac:workingMemory>true</trac:workingMemory>
<trac:workingMemoryFilter>string</trac:workingMemoryFilter>
<trac:executionEvents>false</trac:executionEvents>
<trac:boundObjects>true</trac:boundObjects>
<trac:boundObjectsSerializationType>ClassName</trac:boundObjectsSerializationType>
</trac:decisionTraceFilter>
------------------------------
Alain Robert
Original Message:
Sent: Wed February 12, 2025 04:21 AM
From: anubhav farkya
Subject: ODM - How to get all rules fired and return them on response of decision service
Hi Alain ,
In rest request what should i pass so that i only get the name of the rules which got executed . it is taking infoRulesFired in request but not rulesFired . can you provide me sample request.
------------------------------
anubhav farkya
Original Message:
Sent: Fri April 08, 2022 04:53 PM
From: Alain Robert
Subject: ODM - How to get all rules fired and return them on response of decision service
Absolutely, enable decision trace in the request and you will get this information automatically nothing to implement in the Rules or the XOM
------------------------------
Alain Robert
Original Message:
Sent: Fri April 08, 2022 07:22 AM
From: Sandro Nora
Subject: ODM - How to get all rules fired and return them on response of decision service
Hi Alian,
Thanks for reply.
We are executing rules with HTDS.
Is there way to get execution traces at end of decision service execution ?
Our customer is using IrlContext to get list of all rules from ruleset then they fill that information (Rule Name, ID, executed or not ...) on BOM Object that is part of response.
The CRE API they are using is "context.getRuleset().ruleIterator;"
------------------------------
Sandro Nora
Original Message:
Sent: Thu April 07, 2022 05:58 PM
From: Alain Robert
Subject: ODM - How to get all rules fired and return them on response of decision service
Hello,
Are you executing rules with HTDS, in that case you can use the execution trace similarly to what is available for the classic rule engine.
https://www.ibm.com/docs/en/odm/8.10?topic=services-htds-decision-trace-filters
If not what API are you using?
------------------------------
Alain Robert
Original Message:
Sent: Thu April 07, 2022 04:47 PM
From: Sandro Nora
Subject: ODM - How to get all rules fired and return them on response of decision service
We are migrating from classic rule engine to decision engine. On CRE we have on response (Soap) of the services an section to list all executed rules. We are doing this for Audit and Troubleshooting.
However for decision engine we haven't found equivalent APIs to do that on server side (Inside of decision service)
Have somebody found an way to get all executed rules and return them on response of the Decision service ? Any code sample to do that ?
Appreciate the help. Thanks.
------------------------------
Sandro Nora
------------------------------