<br>   Remember that &quot;collect&quot; is a simplified form of &quot;accumulate&quot;. So when you can&#39;t achieve what you want with collect, first thing you should look for is accumulate.<br><br>$list : List() from accumulate( <br>
        $foo : Foo( ) and not Bar( id == $<a href="http://foo.id">foo.id</a> ),<br>        collectList( $foo ) )<br><br>   Please note that I changed your example making the constraint in Bar use &quot;==&quot; instead of &quot;!=&quot; because I think that is what you want. But if it is not, just use whatever expression you want.<br>
<br>   Also be aware that collect/accumulate are heavy CEs. Nesting multiple patterns inside accumulate is even heavier, so use it wisely.<br><br>   Hope it helps,<br>       Edson<br> <br><br><div class="gmail_quote">2009/8/18 techy <span dir="ltr">&lt;<a href="mailto:techluver007@gmail.com">techluver007@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Please someone help me on this.<br>
<div class="im"><br>
techy wrote:<br>
&gt;<br>
&gt; I would like to collect All Foo() for which there is no Bar() as given<br>
&gt; below.Please help me on this.<br>
&gt; Thanks.<br>
&gt;<br>
&gt; //psedo rule<br>
&gt; rule &#39;test&#39;<br>
&gt; list : from collect( Foo(fooId: id) and not Bar(id !=fooId))<br>
&gt; then<br>
&gt; //do conseq<br>
&gt; end<br>
&gt;<br>
<br>
--<br>
</div>View this message in context: <a href="http://www.nabble.com/Collect-from-tp25014904p25029332.html" target="_blank">http://www.nabble.com/Collect-from-tp25014904p25029332.html</a><br>
<div><div></div><div class="h5">Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>