You can have a fact that stores those values:
rule "Check Age"
when
Context($ageLimit : age)
Person(age > $ageLimit)
then
do something...
end
On Tue, May 24, 2011 at 6:33 PM, marunam <sutavis(a)gmail.com> wrote:
Hello,
I have a question about having dynamic LHS in drool rules. Below is what I
am looking for
rule "Check Age"
when
Person(age > 24)
then
do something...
end
What is the best way to keep the actual fact data dynamic(i.e. 24 in this
case) and how do I feed it do drools
This is very simple rule and the only fact value(hardcoded) that I have is
"24". I may have complex rules in which I could have many fact values for
different attributes. I am looking for a solution where I don't hard code
any value in the rule
Thank you for looking into this and your response
--
View this message in context:
http://drools.46999.n3.nabble.com/drools-dynamic-LHS-tp2980536p2980536.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users