[rules-users] compare attributes form similar type

kashif10 kash452 at yahoo.com
Fri Aug 16 18:10:31 EDT 2013


Actually I need to compare same type of facts in session with each other.

Lets say 10 Person object gets inserted into session.
I want to compare them with each other first. To find which one born first
in the measuring period (lets say in 2012)
After wards I need to compare attribute of that fact,like gender, name etc. 


Currently I am using eval to call on list of person facts to find the person
first born in period & afterwards 

$P : person (eval(PersonArray.bornIn($P, "1/1/2012" , "12/31/2012" ) ) ,  
gender == male)

I want to find a better way  as compare to use eval.



--
View this message in context: http://drools.46999.n3.nabble.com/compare-attributes-form-similar-type-tp4025586p4025592.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list