<br>&nbsp;&nbsp; :) Excellent!! That&#39;s the spirit!<br><br>&nbsp;&nbsp; For the java grammar, I can get you started. For MVEL talk to Mike.<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/11/5 Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</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 bgcolor="#ffffff" text="#000000"><div class="Ih2E3d">
Greg Barton wrote:
<blockquote type="cite">
  <pre>Heck, yeah, I&#39;m up for it.  Rulesfest is over, so I&#39;m bored. :P  
  </pre>
</blockquote></div>
heh, ok :)<br>
<br>
I&#39;d start with the creation of a compile time bitmap mask of the field
changed. To do this you&#39;ll need to make it work for both the java and
the mvel dialect. For the java dialect you&#39;ll have to hook into the
antlr grammar and identify setters - nested setters we can ignore for
now - and a bitmap mask can be made from that. On the MVEL dialect I&#39;m
not sure, you&#39;ll need to speak to the MVEL author (see Mike Brock in
CC) on how to get that information.<br>
<br>
While you are there, you may want to capture the assert, retract info
as this can then be used by the verification guys for subsumption - I
know this was a blocker for them.<br>
<br>
Mark<br>
<blockquote type="cite"><div><div></div><div class="Wj3C7c">
  <pre>--- On Tue, 11/4/08, Edson Tirelli <a href="mailto:tirelli@post.com" target="_blank">&lt;tirelli@post.com&gt;</a> wrote:

  </pre>
  <blockquote type="cite">
    <pre>From: Edson Tirelli <a href="mailto:tirelli@post.com" target="_blank">&lt;tirelli@post.com&gt;</a>
Subject: Re: [rules-users] Chart notation, update, and infinite loops
To: <a href="mailto:greg_barton@yahoo.com" target="_blank">greg_barton@yahoo.com</a>, &quot;Rules Users List&quot; <a href="mailto:rules-users@lists.jboss.org" target="_blank">&lt;rules-users@lists.jboss.org&gt;</a>
Date: Tuesday, November 4, 2008, 7:54 PM
That is an excellent project, but it is deep in the core
engine. Great
opportunity to learn all about ReteOO and drools internals,
but will require
some research from your side... we know the general
solution, but you may
still find some obstacles that need to be removed as you
go.

   If you are willing to take the challenge, lets move the
discussion to
drools-dev and we can guide you.

   []s
   Edson

2008/11/4 Greg Barton <a href="mailto:greg_barton@yahoo.com" target="_blank">&lt;greg_barton@yahoo.com&gt;</a>

    </pre>
    <blockquote type="cite">
      <pre>I thought drools had this.  If you point me in the
      </pre>
    </blockquote>
    <pre>right direction (and you
    </pre>
    <blockquote type="cite">
      <pre>have the time) I&#39;d be happy to work on that.

--- On Tue, 11/4/08, Edson Tirelli
      </pre>
    </blockquote>
    <pre><a href="mailto:tirelli@post.com" target="_blank">&lt;tirelli@post.com&gt;</a> wrote:
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>From: Edson Tirelli <a href="mailto:tirelli@post.com" target="_blank">&lt;tirelli@post.com&gt;</a>
Subject: Re: [rules-users] Chart notation,
        </pre>
      </blockquote>
    </blockquote>
    <pre>update, and infinite loops
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>To: &quot;Rules Users List&quot;
        </pre>
      </blockquote>
    </blockquote>
    <pre><a href="mailto:rules-users@lists.jboss.org" target="_blank">&lt;rules-users@lists.jboss.org&gt;</a>
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>Date: Tuesday, November 4, 2008, 7:06 PM
Dan,

   This is a feature that is in our to-do list.
        </pre>
      </blockquote>
    </blockquote>
    <pre>Jess calls
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>it &quot;slot specific
updates&quot;. We did not had the time yet to
        </pre>
      </blockquote>
    </blockquote>
    <pre>implement it
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>though. :(

   []s
   Edson

2008/11/4 Dan Seaver <a href="mailto:dan.seaver@ge.com" target="_blank">&lt;dan.seaver@ge.com&gt;</a>

        </pre>
        <blockquote type="cite">
          <pre>Your understanding is very close to what
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>I&#39;m
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>looking for. I don&#39;t mind
        </pre>
        <blockquote type="cite">
          <pre>having
multiple rule activations in other areas of
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>the
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>ruleset when the Fact is
        </pre>
        <blockquote type="cite">
          <pre>updated, I just don&#39;t want the current
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>rule, the
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>one with the update
        </pre>
        <blockquote type="cite">
          <pre>statement, to be reactivated.

Accumulate plus no-loop works fine for the
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>specific
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>case of updating
        </pre>
        <blockquote type="cite">
          <pre>amounts, but I&#39;d like to have something
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>generic
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>for more sophisticated
        </pre>
        <blockquote type="cite">
          <pre>logic
that would be implemented in the
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>&quot;then&quot;
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>clause.
        </pre>
        <blockquote type="cite">
          <pre>Maybe if there was something that looked
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>specifically
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>at each property of
        </pre>
        <blockquote type="cite">
          <pre>the update? In this case, the
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>&quot;when&quot; clause
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>is looking at the &quot;name&quot;
        </pre>
        <blockquote type="cite">
          <pre>property and the &quot;then&quot; clause is
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>updating
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>the &quot;amount&quot; property. As the
        </pre>
        <blockquote type="cite">
          <pre>&quot;name&quot; is not being changed, then
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>the update
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>wouldn&#39;t reactivate the rule.
        </pre>
        <blockquote type="cite">
          <pre>Greg Barton wrote:
          </pre>
          <blockquote type="cite">
            <pre>If you have the control fact that
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>handles the
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>&quot;applied == false&quot;
        </pre>
        <blockquote type="cite">
          <pre>condition
          </pre>
          <blockquote type="cite">
            <pre>you wouldn&#39;t need to prevent
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>reactivation of
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>the rule.  It would be
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>handled by the condition.

I&#39;m thinking Edson&#39;s accumulate
            </pre>
          </blockquote>
        </blockquote>
        <pre>suggestion would be best, at this point.
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>If I understand correctly, what you
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>want is this:
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>1) One rule Fact/Charge activation per
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>Charge
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>instance, with no
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>reactivation when the Fact is updated.
2) Other Fact dependent rule
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>activations when the
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>Fact is updated.
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>The problem with making (1) happen is
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>that
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>you&#39;d still have the matched
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>Fact being updated once per Charge,
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>which could
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>lead to reactivation of
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>the rules in (2) multiple times, which
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>you may
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>not want.  If you use
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>accumulate in the Fact/Charge rule,
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>plus no-loop
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>to prevent reactivation,
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>you get the best of both worlds: single
            </pre>
          </blockquote>
        </blockquote>
        <pre>activation of the Fact/Charge
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>rule, with a single update to notify
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>other rules
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>that the Fact has
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>changed.

I think what you&#39;re after is some
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>kind of
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>&quot;modify group,&quot; where multiple
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>calls to modify are counted as just
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>one, and
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>rules are notified when the
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>group is closed out.  I&#39;m not sure
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>how that
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>would be implemented, because
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>how do you know when the modifications
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>are
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>finished?  A low priority
        </pre>
        <blockquote type="cite">
          <pre>rule,
          </pre>
          <blockquote type="cite">
            <pre>possibly?  Anyway, it doesn&#39;t exist
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>in
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>drools, afaik.
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>You could do that kind of thing with an
            </pre>
          </blockquote>
        </blockquote>
        <pre>additional rule that tests for
        </pre>
        <blockquote type="cite">
          <pre>the
          </pre>
          <blockquote type="cite">
            <pre>nonexistence of an unprocessed Charge,
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>then does
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>the update.  Adding in
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>the control fact for tracking Charges:

rule &quot;Update Amount&quot;
   when
      amountFact : Fact(name ==
            </pre>
          </blockquote>
        </blockquote>
        <pre>&quot;Amount&quot;)
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>      $charge : Charge()
      chargeTracker :
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>ChargeTracker(charge ==
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>$charge, applied == false)
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>   then
      Double amount =
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>amountFact.getAmount();
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>      Double chargeAmount =
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>charge.getAmount();
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>      amountFact.setAmount(amount +
            </pre>
          </blockquote>
        </blockquote>
        <pre>chargeAmount);
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>      chargeTracker.setApplied(true);
      update(charge);
end

rule &quot;Close Facts After Charges
            </pre>
          </blockquote>
        </blockquote>
        <pre>Applied&quot;
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>   no-loop false
   when
      amountFact : Fact(name ==
            </pre>
          </blockquote>
        </blockquote>
        <pre>&quot;Amount&quot;)
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>      not ChargeTracker(applied ==
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>false)
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>   then
      update(amountFact);
end

You&#39;d probablt also have to prevent
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>the
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>&quot;Close Facts&quot; rule from firing
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>when there&#39;s just no ChargeTrackers
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>in
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>working memory, too.
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>Give that a try.

--- On Tue, 11/4/08, Dan Seaver
            </pre>
          </blockquote>
        </blockquote>
        <pre><a href="mailto:dan.seaver@ge.com" target="_blank">&lt;dan.seaver@ge.com&gt;</a> wrote:
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>From: Dan Seaver
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre><a href="mailto:dan.seaver@ge.com" target="_blank">&lt;dan.seaver@ge.com&gt;</a>
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>Subject: Re: [rules-users] Chart
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>notation,
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>update, and infinite loops
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>To: <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
Date: Tuesday, November 4, 2008,
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>1:55 PM
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>Greg,
1) Yes, in this case I&#39;m
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>looking for the
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>cartesian
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>join.
2) No, I can&#39;t add a property
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>to Charge
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>as it&#39;s
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>part of our corp Object
Model.

However, I could create a third
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>object that
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>manages whether
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>the Charge has
been processed which works just
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>fine. Unless
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>there is a
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>simpler strategy /
technique, I&#39;ll go with that.

Do you know of any way to keep the
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>rule from
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>being put back
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>on the agenda
when amountFact is updated? I want
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>other
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>rules to know that
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>it&#39;s been
updated, just not the rule that
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>made the
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>change.
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>Dan


Greg Barton wrote:
              </pre>
              <blockquote type="cite">
                <pre>1) Do you want to apply all
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>Charges in
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>working memory
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>to all &quot;Amount&quot;
              </pre>
              <blockquote type="cite">
                <pre>Facts?  I ask because the rule
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>is a
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>cartesian join
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>(i.e. no relation
              </pre>
              <blockquote type="cite">
                <pre>between matched objects) and
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>that
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>sometimes performs
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>in ways users don&#39;t
              </pre>
              <blockquote type="cite">
                <pre>expect. (i.e. all combinations
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>of
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>objects that match
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>the conditions are
              </pre>
              <blockquote type="cite">
                <pre>affected by the rule)
2) Can you add a property to
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>the Charge
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>object?  Then
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>you could use a
              </pre>
              <blockquote type="cite">
                <pre>boolean named
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>&quot;applied&quot; to
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>prevent future
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>matches.
              </pre>
              <blockquote type="cite">
                <pre>Rule &quot;Update Amount&quot;
   when
      amountFact : Fact(name
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>==
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>&quot;Amount&quot;)
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre>      charge : Charge(applied
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>== false)
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre>   then
      Double amount =
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre>amountFact.getAmount();
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre>      Double chargeAmount =
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre>charge.getAmount();
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre>     
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>amountFact.setAmount(amount +
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>chargeAmount);
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre>      update(amountFact);
      charge.setApplied(true);
      update(charge);
end

If a charge could be applied
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>to multiple
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>Facts you
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>could maintain an
              </pre>
              <blockquote type="cite">
                <pre>&quot;appliedTo&quot; list of
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>Facts in
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>the Charge, and
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>check that instead of a
              </pre>
              <blockquote type="cite">
                <pre>simple boolean.

--- On Tue, 11/4/08, Dan
                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>Seaver
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre><a href="mailto:dan.seaver@ge.com" target="_blank">&lt;dan.seaver@ge.com&gt;</a> wrote:
              </pre>
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>From: Dan Seaver
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre><a href="mailto:dan.seaver@ge.com" target="_blank">&lt;dan.seaver@ge.com&gt;</a>
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>Subject: [rules-users]
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>Chart
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>notation, update, and
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>infinite loops
              </pre>
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>To:
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>Date: Tuesday, November 4,
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>2008,
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>11:50 AM
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>I&#39;m trying to find a
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>good
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>technique for
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>updating
              </pre>
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>specific facts in working
memory. What I&#39;m
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>currently doing
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>is something
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>like
              </pre>
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>this:

Rule &quot;Update
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>Amount&quot;
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>   when
      amountFact :
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>Fact(name ==
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>&quot;Amount&quot;)
              </pre>
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>      charge : Charge()
   then
      Double amount =
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre>amountFact.getAmount();
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>      Double chargeAmount
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>=
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>charge.getAmount();
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>     
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>amountFact.setAmount(amount +
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>chargeAmount);
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>      update(amountFact);
end

The update statement
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>causes an
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>infinite loop.
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>I tried using no-loop,
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>which works
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>if there is 1
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>charge,
              </pre>
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>but not if there
are more than one.

Any help with solutions or
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre>strategies would be
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>much
              </pre>
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>appreciated.
--
View this message in
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>context:
    </pre>
    <pre><a href="http://www.nabble.com/Chart-notation%2C-update%2C-and-infinite-loops-tp20327483p20327483.html" target="_blank">http://www.nabble.com/Chart-notation%2C-update%2C-and-infinite-loops-tp20327483p20327483.html</a>
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>Sent from the drools -
                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>user mailing
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>list archive
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>at
              </pre>
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>Nabble.com.


                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre>_______________________________________________
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>rules-users mailing list

                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
    </pre>
    <pre><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre>                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre>_______________________________________________
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre>rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>

                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre>                </pre>
              </blockquote>
              <pre>--
View this message in context:

              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre><a href="http://www.nabble.com/Chart-notation%2C-update%2C-and-infinite-loops-tp20327483p20329780.html" target="_blank">http://www.nabble.com/Chart-notation%2C-update%2C-and-infinite-loops-tp20327483p20329780.html</a>
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>Sent from the drools - user mailing
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>list
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>archive at
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>Nabble.com.


              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre>_______________________________________________
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>

              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>_______________________________________________
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>

            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>            </pre>
          </blockquote>
          <pre>--
View this message in context:

          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre><a href="http://www.nabble.com/Chart-notation%2C-update%2C-and-infinite-loops-tp20327483p20334594.html" target="_blank">http://www.nabble.com/Chart-notation%2C-update%2C-and-infinite-loops-tp20327483p20334594.html</a>
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>Sent from the drools - user mailing list
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>archive at
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>Nabble.com.
        </pre>
        <blockquote type="cite">
          <pre>          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre>_______________________________________________
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>

          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a>
_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>

        </pre>
      </blockquote>
    </blockquote>
    <pre><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
    </pre>
    <blockquote type="cite">
      <pre>_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>

      </pre>
    </blockquote>
    <pre>-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a>
    </pre>
  </blockquote>
  </div></div><pre>      
_______________________________________________
rules-dev mailing list
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>


  </pre>
</blockquote>
<br>
</div>

</blockquote></div><br><br clear="all"><br>-- <br> &nbsp;Edson Tirelli<br> &nbsp;JBoss Drools Core Development<br> &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>