This is also a textbook case of where 'from' should work, from what I've seen - although I don't think that's been released yet.  Someone else could tell you more.

On 11/10/06, Steven Williams <[EMAIL PROTECTED]> wrote:
Hi Weily,

one way I think would work is

//explode party contracts
when
    p : Party(c : contracts)
then
    for(Iterator it = c.iterator();it.hasNext();) {
        assert(it.next());
    }
end

when
    c : Contract(ct : contractType -> (ct.getName().equals("mobile")))
    p : Party(contracts contains c)
then
    ....


On 11/10/06, weily li <[EMAIL PROTECTED]> wrote:
Here is such scenario.
First I create a party instance, which has a Set attribute. The set contains all avariable contact mechnism for the party.
Here is the Bean class:
 
public class Party{
 private Set contracts;
}

public   class Contact {
 private ContactType contactType;
 private String contactValue;

}

public   class ContactType {
 private String name;
 private String comments;
}
 
 
Now at rule, I want to select these Parties whose contact type support mobile phone..
Could you share such a sample ?
 
Thanks
Best Regards
Weily
 



--
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
[EMAIL PROTECTED]
www.objectconsulting.com.au

consulting | development | training | support
our experience makes the difference



--
Geoffrey Wiseman

Reply via email to