Hello,
Please help me to implement following rule in drool. I could not find a way
to iterate two collection using accumulate or collect in LHS.
public Male{
int age;
//other fields
}
public Female{
int age;
//other fields
}
public City{
private List<Male> maleList;
private List<Female> femaleList;
}
#Rule to get all Male whose age != any of female's
rule "Get Unlucky Male"
when
city : City()
maleList : ArrayList() from collect ( Male( his age = any of
Female's age from city.femaleList ) from city.maleList)
//consequence
end
--
View this message in context:
http://www.nabble.com/Iterating-two-collection-in-LHS-tp21796713p21796713...
Sent from the drools - user mailing list archive at
Nabble.com.