In your case, best seems to be to use a return value restriction:
MyClass( $brotherDOB : brotherDOB != null, yearBorn < (date.yearOfDate($
brotherDOB)-{years}) )
[]s
Edson
2007/8/22, Saleem Lakhani <Saleem.Lakhani(a)citizensfla.com>:
Hi,
What is the best way of writing such a rule in drools 4.0 without using
eval ? In the following rule 'date' is a global variable for my own dateUtil
class and {year} is the variable I will pass.
brotherDOB != null, $brotherDOB : brotherDOB
eval(boy.getYearBorn() < (date.yearOfDate($brotherDOB)-{years}))
Saleem Lakhani
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com