Avatar of kerzner
kerzner
Flag for United States of America asked on

Drools - how to pass parameters in "when" clause?

Hi experts,

I am trying to pass parameters in "when", something like

when
            $c: Cart($d.memberLevel != null &&
                  $c.alreadyApplied("my_disc") == false
                  )
and it does not want to compile on the last line. So if it is not a simple bean property, but it is depending on something, how do I express this?

Thank you.
AlgorithmsJavaApplication Servers

Avatar of undefined
Last Comment
kerzner

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
ksivananth

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
kerzner

ASKER
Yes, the combination of eval and function did the trick, thank you.
Your help has saved me hundreds of hours of internet surfing.
fblack61