I have an existing code with the following b2x code to retrieve rule property using classic rule engine (CRE) :
String val = new String();
if (instance.getRule().properties.get(propName) != null)
val = (String) instance.getRule().properties.get(propName).getValue();
return val;
When migrating to DE I get below error :
GBREM0010E: Cannot migrate invocation of method ilog.rules.factory.IlrPropertyList.Entry.getValue(), no corresponding method found in type java.lang.Object model.b2x
How can I do the same using DE ?
Answer by odmfp (10450) | Nov 17, 2015 at 11:26 AM
You need to use below b2xa code in ARL :
java.lang.String val = new java.lang.String();
if (com.ibm.rules.engine.ruledef.runtime.RuleInstance.this != null)
val = (java.lang.String) com.ibm.rules.engine.ruledef.runtime.RuleInstance.this.getRule().getProperties().get(propName);
return val;
Below documentation may help :
Accessing engine and related artifacts from ARL mapping code (decision engine only)
How to get a instance of a class using decision engine 1 Answer
Why am I getting B2X parse error in my BOM after converting my rule project to Decision Engine? 1 Answer
Changes to my b2x irl code are not reflected to the arl when switching from CRE to DE build mode 1 Answer
When I am converting my Rule project from CRE to DE, I am getting the below error in .b2xa file 0 Answers