on 2019 Jul 11 7:42 AM
Created new rule engine, and published new rule on that engine, when any rule that satisfy the condition gets executed. while executing action for that rule, it try to fetch RuleEngineResultRAO from ruleActionContext. and it returns null.
Since i am new to rule engine not sure where RuleActionContext is Created. Although other facts(RAOs) are available in ruleActionContext but RuleEngineResultRAO.
No error while executing same rule on promotionEngine.
Thanks in advance for any help :)
Request clarification before answering.
: There is a issue with your rule generator, please check generateRuleContentRule() of DroolsTargetCodeGenerator where we set these values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi , RuleActionContext will be set in RAOAction class.
you have to Insert Resultant Rao in RuleActionContext(Rao object where promotion result value is available).
You can take refrence of OOB available RAOAction. I am adding an example from RuleAddCouponRAOAction for your refrence.
Here if you see AddCouponRAO is the resultant RAO object which has coupon id, to recieve this value in Action Strategy you need to set this in RuleActionContext. refer line number 60
However if the RAO is already available in Facts you just need to update with updated changes. refer line number 59 for this.
Please let me know if you need any help in this regard.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi , Thanks a lot for your response,
But i am facing a different issue here, I am trying to fetch RuleEngineResultRao from ruleActionContext (Line no. 56) and getting null in the response.
This is something related to rule publication because when i looked into generated DRL of the rule, RuleEngineResultRao was missing from Variables. Have a look on DRL:

NOTE: i have created a new rule module and publishing rules on that only instead of Promotion module.
Thanks,
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.