cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

"RuleConditionTranslator" what does exactly and when it will be execute?

Former Member
0 Likes
853

Hi Experts,

I am doing Promotion Engine Trail from below link

https://help.hybris.com/6.7.0/hcd/39b59b51c229400099d8ee0d0a79cdf5.html. But I couldn't understand about "RuleConditionTranslator". What does exactly RuleConditionTranslator and when it will be execute?

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hi Nagarjuna,

Take a look here: https://help.hybris.com/6.7.0/hcd/30433bc8033646fba7869b1385b314d6.html In this optional part of the trail a simple 'Drools rule' is made.

Drools rules have different syntax than plain Java. Take a look here: https://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch05.html for more information. Some parts of the rules can be however written in Java. It depends on the specified dialect('mvel' and 'java') is possible.

To clarify a bit more here is the drools rule structure:

 rule "name"
     attributes
     when
         LHS
     then
         RHS
 end

I am not sure what exactly you have problem with so can't be more specific.

Best Regards,
Bartosz

Former Member
0 Likes

Hi Nagarjuna,

RuleConditionTranslator is responsible for converting a rule condition to the intermediate representation.

It is used by the RuleConditionDefinition to create the condition definition that can be used in the Rule Builder. As the RuleConditionTranslator is a Spring bean it will be created as a Singleton instance at startup. Next it is hooked to to a RuleConditionDefinition and is executed when the specified condition is validated.

Best regards,

Former Member
0 Likes

Thank you,

Could you help me understanding the Drools script.I have done promotion engine trail with help of above link,But couldn't understand generated drools script.

Drools script