<!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 bgcolor="#ffffff" text="#000000">
    please don't title your subjects with URGENT. i'm sure everyone's
    email here is urgent. See netiquette here:<br>
    <a class="moz-txt-link-freetext" href="http://www.jboss.org/drools/lists.html">http://www.jboss.org/drools/lists.html</a><br>
    <br>
    Mark<br>
    On 16/09/2010 08:55, Yaniv Itzhaki wrote:
    <blockquote
      cite="mid:AANLkTimCK6COt1zfn5z4_X745Db9=-eQiDovYGXZYvTY@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">Hi All,</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">&nbsp;</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">I have an urgent problem which I hope someone
            can explain it to me
            and how it can be solved.</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">&nbsp;</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">I created 2 rules "Update 1" and "Update 2",
            basically the rules are the same, get all the CaseLog
            objects according to
            "Category" and "Value" and update the Case, which holds a
            list of CaseLogs, with a new object.</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">&nbsp;</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">Note that in the update method I am updating
            the working memory by
            retracting the old log and inserting the new one.</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">&nbsp;</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">Now for the problem:</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;"><br>
            The problem is that on one hand, when I insert a new log
            line all rules without
            lock-on-active re-fire. On the other hand, rules with
            lock-on-active seem to disregard
            the addition of the new object and fire only on the lines
            that were present
            when their group was activated.</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">&nbsp;</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">Please see the rules below</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">&nbsp;</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">Thanks</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;
            color: black;">Yaniv</span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><b><span style="font-size: 10pt;
              font-family: &quot;Courier New&quot;; color: rgb(150, 0,
              0);">&nbsp;</span></b></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><b><span style="font-size: 10pt;
              font-family: &quot;Courier New&quot;; color: rgb(150, 0,
              0);">rule</span></b><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;"> </span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;; color: green;">"Update 1"</span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
              style="font-size: 10pt; font-family: &quot;Courier
              New&quot;; color: rgb(150, 0, 0);">salience</span></b><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;; color: black;"> 4</span><span style="font-size:
            10pt; font-family: &quot;Courier New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
              style="font-size: 10pt; font-family: &quot;Courier
              New&quot;; color: rgb(150, 0, 0);">ruleflow-group</span></b><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;; color: black;"> </span><span style="font-size:
            10pt; font-family: &quot;Courier New&quot;; color: green;">"group1"</span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
              style="font-size: 10pt; font-family: &quot;Courier
              New&quot;; color: rgb(150, 0, 0);">lock-on-active</span></b><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
              style="font-size: 10pt; font-family: &quot;Courier
              New&quot;; color: rgb(150, 0, 0);">when</span></b><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$case
            : Case()</span><span style="font-size: 10pt; font-family:
            &quot;Courier New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$myLog
            : CaseLog( myClass == "Category", </span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
myValue
            == </span><span style="font-size: 10pt; font-family:
            &quot;Courier New&quot;; color: green;">"1"</span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;; color: black;"> )</span><span style="font-size:
            10pt; font-family: &quot;Courier New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
              style="font-size: 10pt; font-family: &quot;Courier
              New&quot;; color: rgb(150, 0, 0);">then</span></b><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            System.out.println(</span><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: green;">"Logic:
            Update 1"</span><span style="font-size: 10pt; font-family:
            &quot;Courier New&quot;; color: black;">);</span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            $case.update($myLog,40.0,</span><b><span style="font-size:
              10pt; font-family: &quot;Courier New&quot;; color:
              rgb(150, 0, 0);">null</span></b><span style="font-size:
            10pt; font-family: &quot;Courier New&quot;; color: black;">);</span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><b><span style="font-size: 10pt;
              font-family: &quot;Courier New&quot;; color: rgb(150, 0,
              0);">end</span></b><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><b><span style="font-size: 10pt;
              font-family: &quot;Courier New&quot;; color: rgb(150, 0,
              0);">rule</span></b><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;"> </span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;; color: green;">"Update 2"</span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
              style="font-size: 10pt; font-family: &quot;Courier
              New&quot;; color: rgb(150, 0, 0);">salience</span></b><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;; color: black;"> 0</span><span style="font-size:
            10pt; font-family: &quot;Courier New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
              style="font-size: 10pt; font-family: &quot;Courier
              New&quot;; color: rgb(150, 0, 0);">ruleflow-group</span></b><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;; color: black;"> </span><span style="font-size:
            10pt; font-family: &quot;Courier New&quot;; color: green;">"group1"</span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
              style="font-size: 10pt; font-family: &quot;Courier
              New&quot;; color: rgb(150, 0, 0);">lock-on-active</span></b><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
              style="font-size: 10pt; font-family: &quot;Courier
              New&quot;; color: rgb(150, 0, 0);">when</span></b><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$case
            : Case()</span><span style="font-size: 10pt; font-family:
            &quot;Courier New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$myLog
            : CaseLog( myClass == "Category", </span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
myValue
            == </span><span style="font-size: 10pt; font-family:
            &quot;Courier New&quot;; color: green;">"1"</span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;; color: black;">, $score : myScore )</span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
              style="font-size: 10pt; font-family: &quot;Courier
              New&quot;; color: rgb(150, 0, 0);">then</span></b><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            System.out.println(</span><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: green;">"Logic:
            Update 2 "</span><span style="font-size: 10pt; font-family:
            &quot;Courier New&quot;; color: black;"> + $score + 5.0);</span><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><span style="font-size: 10pt;
            font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$case.update($myLog,$score
            + 5,</span><b><span style="font-size: 10pt; font-family:
              &quot;Courier New&quot;; color: rgb(150, 0, 0);">null</span></b><span
            style="font-size: 10pt; font-family: &quot;Courier
            New&quot;; color: black;">);</span><span style="font-size:
            10pt; font-family: &quot;Courier New&quot;;"></span></p>
        <p class="MsoNormal" style="text-align: left; direction: ltr;
          unicode-bidi: embed;"><b><span style="font-size: 10pt;
              font-family: &quot;Courier New&quot;; color: rgb(150, 0,
              0);">end</span></b></p>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>