javaloggingibm-odm

(ILOG) IBM ODM 8.5 Logging a name of the rule in execution time


I want to create a log such as System.out.println("RuleName : "+ruleName); in IBM ODM rule engine.

So these are what i did;

1- Create BOM virtual methods which are static and get parameter of instance which is the object of ilog.rules.engine.IlrRuleInstance.

instance ilog.rules.engine.IlrRuleInstance

2- Create BOM to XOM mapping by the following

System.out.println("Log icinde");
String ruleName = "";
if (instance != null )
    ruleName = instance.getRuleName();
else
    System.out.println("instance null!");
if (ruleName != null) {
    System.out.println("RuleName: "+ ruleName);
}
return;

3- Call it in rule flow as an initial or final action.

utility.logla(ruleInstance);

But when i execute the flow my log doesnt work instance is null and ruleName also is null;

How should i configure and set logging feature by using bom. Could you give me an example of it?

Thanks.


Solution

  • So you could use Decision Warehouse that is part of the execution server to trace each execution. This can include which rules have been fired during the execution, but depends on what filters you apply.

    Here is the documentation on DW and how to set it up: http://pic.dhe.ibm.com/infocenter/dmanager/v8r5/topic/com.ibm.wodm.dserver.rules.res.managing/topics/con_res_dw_overview.html