I am using the Business Rules service on Bluemix, and it does not seem to use the Decision Warehouse. Is there another way to trace the rule firing?
问题:
回答1:
As you noticed, the Decision Warehouse is not a feature within the Business Rules service. Also, rule traces are disabled.
You can add trace filter tags to the payload request. Use the REST form (&trace=true
) to view the trace filter tags:
https://brsv2-instanceID.domain/DecisionService/run.jsp?path=/ruleApp/1.0/ruleset/1.0&trace=true
(You can get the values for instanceID, domain, ruleApp, ruleset and the corresponding versions from the “URL” in the Ruleset Details page.)
If you work with XML, choose the XML option, in which case the generated payload will contain filter tags such as:
<!--Optional:-->
<trac:all>false</trac:all>
<!--Optional:-->
<trac:none>true</trac:none>
<!--Optional:-->
<trac:executionDuration>true</trac:executionDuration>
<!--Optional:-->
<trac:executionDate>true</trac:executionDate>
If you work with JSON, choose the JSON option instead. The generated payload will contain filter entries, for example:
"_TraceFilter_":{ "infoRulesetProperties":true, "infoOutputString":false, "infoInputParameters":false, "infoOutputParameters":true, ...
Add these tags/entries with the appropriate filter enabled in the execution request. The payload response will contain the requested traces.
Another way is to enable the Decision trace information when getting the WSDL or WADL. See the documentation at “Decision trace information” in the IBM ODM documentation at "IBM Operational Decision Manager 8.7.0>Operational Decision Manager 8.7> Decision Server Rules>Rule Execution Server console online help>Viewing and managing transparent decision services>Viewing or downloading an HTDS description file", Step 6 and collect the execution information on the client side.