<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">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@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;">
You don&#39;t need forall to solve your problem. The following rule prints all<br>patient names which don&#39;t have problem 4711; omitting the &#39;not&#39; prints<br>those suffering from Colognitis.<br><br>rule lookJoe<br>

    when<br>        $patient: Patient()<br>        not ( Problem( code == &quot;4711&quot; ) from $patient.problemList )<br>    then<br>        System.out.println( $patient.getName() );<br>end<br><br>&#39;not&#39; implies quantification (or exhaustive search over the domain).<br>


Without &#39;not&#39; 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><div class="gmail_quote">2009/3/20 howard goldberg <span dir="ltr">&lt;<a href="mailto:goldberg.howard@gmail.com" target="_blank">goldberg.howard@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;">
<div><div></div><div class="h5">
Trying to check whether a patient has a particular problem on their problem list:<br><br>    when<br><br>        $patient : Patient()<br>        forall ( Problem( code != &quot;195967001&quot;) from $patient.problemList)<br>


<br>but I get the following parsing error--<br><br>[29,41]: [ERR 101] Line 29:41 mismatched input &#39;FROM&#39; expecting &#39;)&#39; in rule &quot;Dumb no asthma Rule&quot;<br>[29,66]: [ERR 101] Line 29:66 mismatched input &#39;)&#39; expecting &#39;(&#39; in rule &quot;Dumb no asthma Rule&quot; in pattern $patient.problemList<br>


<br>What is the correct way to check for this condition?<br><br>Thanks,<br><font color="#888888">Howard<br>        <br>
</font><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>_______________________________________________<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><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">www.jboss.com</a><br>