IBM Support

Obtaining debug information during Decision Warehouse trace capture

Question & Answer


Question

How can I obtain debug information when the trace is saved to the Decision Warehouse ?

Cause

To minimize the impact of Decision Warehouse (DW) monitoring on the processing of ruleset executions, possible failures to save the trace to the database may remain silent (no stack trace in the logs of the application server).

Answer

If an issue arises during DW trace persistence at runtime, the related messages and stack traces are only available programmatically through the following API: ilog.rules.res.session.IlrSessionResponse.getWarnings()
So it is possible for an error to remain silent if the warnings above are not explicitly logged by the application.

It is however possible to customize the DW trace and log additional debug information even when the application does not explicitly log the above mentioned warnings. The attached sample uses the java.util.logging API to append to the ilog.rules.support.debugtrace.DebugTraceDAO logger the following:
  • at SEVERE level any exception that occurred while attempting to persist the trace to the database
  • at INFO level a summary of the trace with ruleset path information and a list of execution events
  • at FINEST level the list of session response warnings and the full execution trace XML (beware this can be a very large amount of information going to the log, possibly several megabytes)

By default only INFO level and above messages (including SEVERE) are typically visible in the application server logs. So the first two set of information above should be visible, while the FINEST level should require specific configuration of the Java logging to be visible.

Instructions

Bundle the attached jrules-debugtrace.jar sample in the Rule Execution Server (RES) application that is performing ruleset executions:
  • If you are using JRules Hosted Transparent Decision Service (HTDS), in jrules-res-htds-<appserver>.ear/jrules-res-htds-<appserver>.war/WEB-INF/lib
  • If you are using JRules Scenario Service Provider (SSP) in jrules-ssp-<appserver>.ear/jrules-ssp-server.war/WEB-INF/lib
  • If you are executing rules from your application, the sample should be packaged alongside the RES session library that your application already bundles


jrules-debugtrace.jarjrules-debugtrace.jar
If you are interested in learning about the implementation of this DW trace you can use the following eclipse project :

jrules-debugtrace-src.zipjrules-debugtrace-src.zip

[{"Product":{"code":"SS6MXF","label":"WebSphere ILOG Decision Validation Services"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.1.1;7.1;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSQP76","label":"IBM Operational Decision Manager"},"ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.1;8.10.0;8.10.1;8.10.2;8.10.3;8.10.4;8.5.0;8.5.1;8.6.0;8.7.0;8.7.1;8.8.0;8.8.1;8.9.0;8.9.1;8.9.2","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
19 May 2020

UID

swg21433278