on 2023 Aug 14 2:50 PM
I want to create a new promotion condition which will be of boolean type. But when I tried to write a translator for the same, I am getting some exception. Below is my code:
final String userRaoVariable = context.generateVariable(UserRAO.class);
final RuleIrAttributeCondition irTenderCondition = new RuleIrAttributeCondition();
irTenderCondition.setVariable(userRaoVariable);
irTenderCondition.setAttribute("loyaltyPromo");
irTenderCondition.setOperator(RuleIrAttributeOperator.EQUAL);
irTenderCondition.setValue(loyaltyPromo);
return irTenderCondition;
"loyaltyPromo": is the new condition for my promotion.
And this is the exception that I am getting
Unable to Analyse Expression loyaltyPromo == Boolean.TRUE:
[Error: unable to resolve method using strict-mode: de.hybris.platform.ruleengineservices.rao.UserRAO.loyaltyPromo()]
[Near : {... loyaltyPromo == Boolean.TRUE ....}]
Any idea, how to write condition translator for boolean condition type?
Request clarification before answering.
User | Count |
---|---|
18 | |
3 | |
2 | |
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.