[rules-users] Collect from
Greg Barton
greg_barton at yahoo.com
Tue Aug 18 23:50:25 EDT 2009
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 at gmail.com> wrote:
> From: techy <techluver007 at gmail.com>
> Subject: Re: [rules-users] Collect from
> To: rules-users at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DroolsCollectUnlike.tar.gz
Type: application/x-gzip
Size: 5374 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20090818/0c339b9d/attachment.gz
More information about the rules-users
mailing list