Hi,
You do not need to create the engine you can use a reference in a b2x code:
if (com.ibm.rules.engine.runtime.RunningEngineWithWorkingMemory.this instanceof com.ibm.rules.engine.ruleflow.runtime.RunningRuleflowEngine) {
com.ibm.rules.engine.ruleflow.runtime.RunningRuleflowEngine engine = (com.ibm.rules.engine.ruleflow.runtime.RunningRuleflowEngine)com.ibm.rules.engine.runtime.RunningEngineWithWorkingMemory.this;
engine.addObserver(myobserver);
You will find a full sample of integration in the Decisions Developer repository on github: https://github.com/DecisionsDev/decision-engine-observer-sample
------------------------------
Alain Robert
------------------------------
Original Message:
Sent: Wed January 17, 2024 06:51 PM
From: Anishia Casmir Thomas
Subject: IBM ODM 8.12 Rule Logging
I'm new to ODM 8.12, would like to know how I can do the rule logging in ODM 8.12. For using EngineObserver, do I need to create engine? Can I not access the existing one and get the rule instances to do some logging for rule execution start , end etc.Thanks!
------------------------------
Anishia Casmir Thomas
------------------------------