[rules-users] Using from

Aziz Boxwala boxwala at yahoo.com
Thu Jul 17 14:26:15 EDT 2008


I have the following class structure. 

Class GrandFather {
  List<Father> fathers;
  public List<Father> getFathers() {return fathers;}
}

Class Father {
   int age;
  List<Son> sons;
  public int getAge() {return age;}
  public List<Son> getSons() {return sons;}
}

Class Son {
 int age;
  public int getAge() {return age;}
}

I'd like to write a rule that finds all the Fathers who have age > 45 and have Sons where the son's age is greater than 5. But I can't figure out how to use "from" to iterate over father first and then over son.

Any help will be greatly appreciated.

Thanks,
--Aziz


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080717/88c5ca06/attachment.html 


More information about the rules-users mailing list