[rules-users] help in writing this rule logic
Mark Proctor
mproctor at codehaus.org
Tue Mar 31 23:47:57 EDT 2009
techy wrote:
> Hello,
> Please guide me to implement following rule.
> I would like to found out the city where absence of either Male or Female
> found for same age. I also need to have ref to those Men and Female of that
> city in collection to use it RHS. Also there will be max of one male &
> female for same age.
>
> Male{
> String name;
> int age;
> String city
> }
>
> Female{
> String name;
> int age;
> String city
> }
>
$city : City( name == "paris" )
not Person( age == 25, sex == "female", city == $city )
For the other Qs look into collect and accumulate.
Mark
> Thanks
>
More information about the rules-users
mailing list