How can I trace rules in the Business Rules service on Bluemix?

℡╲_俬逩灬. 提交于 2019-12-18 09:54:08

问题


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.



来源:https://stackoverflow.com/questions/29639786/how-can-i-trace-rules-in-the-business-rules-service-on-bluemix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!