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>