I also realize although the logic is all backwards the using the forall works as the following:<br><br>DetailLine(detailKeyRecNo:keyRecNo != null, lineNumber != null )<br>forall( RrHeader( keyRecNo != detailKeyRecNo ) )<br>
<br>Not sure which one is better performing or not though.<br><br><div class="gmail_quote">On Jan 14, 2008 11:37 AM, Ronald R. DiFrango &lt;<a href="mailto:ron.difrango@gmail.com">ron.difrango@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Edson,<br><br>Dulp...you just made me realize what the issue is.&nbsp; Stupid Developer!<br><br>Thanks!
<br><br>Ron<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Jan 11, 2008 2:04 PM, Edson Tirelli &lt;<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com
</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>&nbsp;&nbsp; Ronald,<br><br>&nbsp;&nbsp; you are doing:<br><br>ArrayList( size == 0 )<br>

<br>&nbsp;&nbsp; Am I missing anything?<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2008/1/11, Ronald R. DiFrango &lt;<a href="mailto:ron.difrango@gmail.com" target="_blank">
ron.difrango@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>All,<br><br>I have the following rule which uses the collect function:
<br><br>rule &quot;Invalid RR Line&quot;<br>&nbsp;&nbsp;&nbsp; salience 100<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rrDetailLine : DetailLine(detailKeyRecNo:keyRecNo != null, lineNumber != null ) 
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rrHeader : ArrayList( size == 0 ) from collect(RrHeader( keyRecNo != detailKeyRecNo ))<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // logger.debug(&quot;Invalid RR Line: &quot; + rrHeader.size());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; logger.debug(&quot;Invalid RR Line: &quot; + 
rrDetailLine.getKeyRecNo());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; logger.debug(&quot;Invalid RR Line: &quot; + rrDetailLine.getLineNumber());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; drools.halt();<br>end<br><br>What I am seeing is that if I only have 1 RrHeader in working memory this rule fails.&nbsp; Th reason I know that there is an RrHeader object is that I change the rule to the following:
<br><br>rule &quot;Invalid RR Line&quot;<br>&nbsp;&nbsp;&nbsp; salience 100<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rrDetailLine : DetailLine(detailKeyRecNo:keyRecNo != null, lineNumber != null ) <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rrHeader : RrHeader( keyRecNo != detailKeyRecNo )
<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // logger.debug(&quot;Invalid RR Line: &quot; + rrHeader.size());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; logger.debug(&quot;Invalid RR Line: &quot; + rrDetailLine.getKeyRecNo());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; logger.debug(&quot;Invalid RR Line: &quot; + 
rrDetailLine.getLineNumber());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; drools.halt();<br><br>end<br><br>And it worked just fine.<br><br>Thoughts?<br><br>Ron<br>
<br></div></div>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">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><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;JBoss Drools Core Development<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646
<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a>
</blockquote></div><br>
</div></div></blockquote></div><br>