Please do not use this list for simple questions - it is reserved for discussion Drools development itself.<br><br>(1) Did you inform the Drools engine about incrementing <font size="-1">nbFactRisque?<br>(2) There is no such thing as &quot;alphabetic mode&quot; for rule execution.<br>
(3) Why do you use eval when you can test the fact field?<br><br>Indication: Drools Expert manual, three times per day ;-)<br>-W<br></font><br><br><div class="gmail_quote">On 1 March 2011 09:17, Nico ROEDERER <span dir="ltr">&lt;<a href="mailto:ino.nicolas@gmail.com">ino.nicolas@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

  

    
  
  <div text="#000000" bgcolor="#ffffff">
    <font size="-1">Hi,<br>
      <br>
      I&#39;ve got an other problem with an eval function. <br>
      I will try to discribe the path to the error.<br>
      <br>
      I&#39;ve got a repository where some people can put rules with .drl
      extension.<br>
      My program is listing this repository and execute every rule in
      this repository.<br>
      <br>
      At the begining, I&#39;ve got a &#39;PatientDto&#39; who have a property :<br>
      int nbFactRisque;<br>
      (with getters and setters)<br>
      <br>
      Some rules increments this number.<br>
      <br>
      In the last rule (the rules are executed in alphabetic mode) I&#39;m
      testing this number like this :<br>
      <br>
      rule &quot;RisqueNormal&quot;<br>
          when<br>
              $patient : PatientDto()<br>
              eval( $patient.getNbFactRisque() == 0)<br>
          then <br>
              $patient.addDonnees( Constants.CLE_RISQUEPATIENT,
      Constants.RISQUE_NORMAL );<br>
              System.out.println(&quot;RisqueNormal vérifié.&quot; +
      $patient.getNbFactRisque() + &quot;Facteurs.&quot;);<br>
      end<br>
      <br>
      Here&#39;s my problem :<br>
      The &#39;Then&#39; traitement is always executed so the eval always think
      that </font><font size="-1">$patient.getNbFactRisque() is equal
      to 0.<br>
      But the system.out.println() show me that </font><font size="-1">
      $patient.getNbFactRisque()  = 2 !<br>
      <br>
    </font><font size="-1">Here&#39;s the output : &quot;RisqueNormal
      vérifié.2Facteurs.&quot;. <br>
      <br>
      Perhaps I did something wrong ? Can someone help me ?<br>
      Thank you.<br>
    </font>
  </div>

<br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>