Try this:
rule "FindMismatchedBars"
when
f : Foo(fooId : id)
bars : ArrayList() from collect( Bar(id != fooId) )
then
System.out.println( "For " + f + " got " + bars );
end
And see attached project.
--- On Tue, 8/18/09, techy <techluver007(a)gmail.com> wrote:
From: techy <techluver007(a)gmail.com>
Subject: Re: [rules-users] Collect from
To: rules-users(a)lists.jboss.org
Date: Tuesday, August 18, 2009, 12:07 PM
Please someone help me on this.
techy wrote:
>
> I would like to collect All Foo() for which there is
no Bar() as given
> below.Please help me on this.
> Thanks.
>
> //psedo rule
> rule 'test'
> list : from collect( Foo(fooId: id) and not Bar(id
!=fooId))
> then
> //do conseq
> end
>
--
View this message in context:
http://www.nabble.com/Collect-from-tp25014904p25029332.html
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users