In your case, best seems to be to use a return value restriction:
MyClass( $brotherDOB :
brotherDOB != null, yearBorn < (date.yearOfDate($
brotherDOB)-{years}) )
[]s
Edson
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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users