Thanks to both of you for the quick response!<br><br>Howard<br><br><div class="gmail_quote">2009/3/20 Edson Tirelli <span dir="ltr"><<a href="mailto:tirelli@post.com">tirelli@post.com</a>></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> Wolfgang is right in its suggestion.<br><br> Just to explain what the problem is, in previous versions of drools, forall() could not be used with an embedded from. It is fixed in trunk. <br><br> []s<br> Edson<br>
<br><div class="gmail_quote">2009/3/20 Wolfgang Laun <span dir="ltr"><<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>></span><div><div></div><div class="h5"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You don't need forall to solve your problem. The following rule prints all<br>patient names which don't have problem 4711; omitting the 'not' prints<br>those suffering from Colognitis.<br><br>rule lookJoe<br>
when<br> $patient: Patient()<br> not ( Problem( code == "4711" ) from $patient.problemList )<br> then<br> System.out.println( $patient.getName() );<br>end<br><br>'not' implies quantification (or exhaustive search over the domain).<br>
Without 'not' also searches all Problem entries of the current Patient<br>so it would fire again if the patient has a problem stored more than<br>once.<br>
<br>-W<br>
<br>
<br></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
</font><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>
<br></blockquote></div><br>