<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    <font size="-1">Here's one exemple of incrementation :<br>
      IN drl file :<br>
      rule "FacteurRisqueHomme"<br>
      &nbsp;&nbsp;&nbsp; when<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $patient : PatientDto()<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; eval( $patient.getValue( Constants.RULE_KEY_SEXE ).equals(
      Constants.SEXE_HOMME )<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &amp;&amp; $patient.getDoubleValue(
      Constants.RULE_KEY_AGE ) &gt;
      $patient.getDoubleProperties("valeur.age.homme")&nbsp; )<br>
      &nbsp;&nbsp;&nbsp; then <br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <b>$patient.incNbFactRisque();</b><br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("FacteurRisqueHomme v&eacute;rifi&eacute;");<br>
      end<br>
      <br>
      In PatientDto :<br>
      &nbsp;&nbsp; /**<br>
      &nbsp;&nbsp;&nbsp; * Permet l'incr&eacute;mentation du nombre de risque (depuis une
      r&egrave;gle drools)<br>
      &nbsp;&nbsp;&nbsp; */<br>
      &nbsp;&nbsp; public void incNbFactRisque() {<br>
      &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nbFactRisque++;<br>
      &nbsp;&nbsp; }<br>
      <br>
    </font><br>
    <br>
    Le 01/03/2011 10:47, Wolfgang Laun a &eacute;crit&nbsp;:
    <blockquote
      cite="mid:AANLkTi=FsnciLcd15W7aYewxeO+1yFGvT8sFok=2kSCF@mail.gmail.com"
      type="cite">The correct list is <a moz-do-not-send="true"
        href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
      <br>
      <br>
      <div class="gmail_quote">On 1 March 2011 10:15, Nico ROEDERER <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            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">(1)
              -&gt; yes because when I print the value, the value is
              correct ( = 2 ). Not the eval.<br>
            </font></div>
        </blockquote>
        <div><br>
          Show us the rule where you increment.<br>
          &nbsp;</div>
        <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"> (2)
              -&gt; yes, true. My list is in alphabtic mode...<br>
            </font></div>
        </blockquote>
        <div><br>
          This does not matter for the order those rules will fire.<br>
          <br>
          &nbsp;</div>
        <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"> (3)
              -&gt; Every test I make made the wrong result <br>
            </font></div>
        </blockquote>
        <div><br>
          Obvious - the problem is somewhere else, not in the test.<br>
          <br>
          -W<br>
          <br>
        </div>
      </div>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
    </blockquote>
  </body>
</html>