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 <<a href="mailto:ron.difrango@gmail.com">ron.difrango@gmail.com</a>> 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. 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 <<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com
</a>> 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> Ronald,<br><br> you are doing:<br><br>ArrayList( size == 0 )<br>
<br> Am I missing anything?<br><br> []s<br> Edson<br><br><div><span class="gmail_quote">2008/1/11, Ronald R. DiFrango <<a href="mailto:ron.difrango@gmail.com" target="_blank">
ron.difrango@gmail.com</a>>:</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 "Invalid RR Line"<br> salience 100<br> <br> when<br> rrDetailLine : DetailLine(detailKeyRecNo:keyRecNo != null, lineNumber != null )
<br> rrHeader : ArrayList( size == 0 ) from collect(RrHeader( keyRecNo != detailKeyRecNo ))<br> then<br> // logger.debug("Invalid RR Line: " + rrHeader.size());<br> logger.debug("Invalid RR Line: " +
rrDetailLine.getKeyRecNo());<br> logger.debug("Invalid RR Line: " + rrDetailLine.getLineNumber());<br> drools.halt();<br>end<br><br>What I am seeing is that if I only have 1 RrHeader in working memory this rule fails. Th reason I know that there is an RrHeader object is that I change the rule to the following:
<br><br>rule "Invalid RR Line"<br> salience 100<br> <br> when<br> rrDetailLine : DetailLine(detailKeyRecNo:keyRecNo != null, lineNumber != null ) <br> rrHeader : RrHeader( keyRecNo != detailKeyRecNo )
<br> then<br> // logger.debug("Invalid RR Line: " + rrHeader.size());<br> logger.debug("Invalid RR Line: " + rrDetailLine.getKeyRecNo());<br> logger.debug("Invalid RR Line: " +
rrDetailLine.getLineNumber());<br> 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> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646
<br> 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>