<!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">
Greg Barton wrote:
<blockquote cite="mid:59231.49056.qm@web81506.mail.mud.yahoo.com"
 type="cite">
  <pre wrap="">Heck, yeah, I'm up for it.  Rulesfest is over, so I'm bored. :P  
  </pre>
</blockquote>
heh, ok :)<br>
<br>
I'd start with the creation of a compile time bitmap mask of the field
changed. To do this you'll need to make it work for both the java and
the mvel dialect. For the java dialect you'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'm
not sure, you'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 cite="mid:59231.49056.qm@web81506.mail.mud.yahoo.com"
 type="cite">
  <pre wrap="">
--- On Tue, 11/4/08, Edson Tirelli <a class="moz-txt-link-rfc2396E" href="mailto:tirelli@post.com">&lt;tirelli@post.com&gt;</a> wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">From: Edson Tirelli <a class="moz-txt-link-rfc2396E" href="mailto:tirelli@post.com">&lt;tirelli@post.com&gt;</a>
Subject: Re: [rules-users] Chart notation, update, and infinite loops
To: <a class="moz-txt-link-abbreviated" href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>, "Rules Users List" <a class="moz-txt-link-rfc2396E" href="mailto:rules-users@lists.jboss.org">&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 class="moz-txt-link-rfc2396E" href="mailto:greg_barton@yahoo.com">&lt;greg_barton@yahoo.com&gt;</a>

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

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

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

   []s
   Edson

2008/11/4 Dan Seaver <a class="moz-txt-link-rfc2396E" href="mailto:dan.seaver@ge.com">&lt;dan.seaver@ge.com&gt;</a>

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

Accumulate plus no-loop works fine for the
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">specific
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">case of updating
        </pre>
        <blockquote type="cite">
          <pre wrap="">amounts, but I'd like to have something
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">generic
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">for more sophisticated
        </pre>
        <blockquote type="cite">
          <pre wrap="">logic
that would be implemented in the
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">"then"
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">clause.
        </pre>
        <blockquote type="cite">
          <pre wrap="">Maybe if there was something that looked
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">specifically
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">at each property of
        </pre>
        <blockquote type="cite">
          <pre wrap="">the update? In this case, the
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">"when" clause
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">is looking at the "name"
        </pre>
        <blockquote type="cite">
          <pre wrap="">property and the "then" clause is
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">updating
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">the "amount" property. As the
        </pre>
        <blockquote type="cite">
          <pre wrap="">"name" is not being changed, then
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">the update
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">wouldn't reactivate the rule.
        </pre>
        <blockquote type="cite">
          <pre wrap="">

Greg Barton wrote:
          </pre>
          <blockquote type="cite">
            <pre wrap="">If you have the control fact that
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">handles the
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">"applied == false"
        </pre>
        <blockquote type="cite">
          <pre wrap="">condition
          </pre>
          <blockquote type="cite">
            <pre wrap="">you wouldn't need to prevent
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">reactivation of
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">the rule.  It would be
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">handled by the condition.

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

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

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

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

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

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

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

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


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

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

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

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

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

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


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

                  </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap=""><a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
    </pre>
    <pre wrap=""><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 type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre wrap="">


                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre wrap="">_______________________________________________
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre wrap="">rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>

                </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap=""><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 type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre wrap="">
                </pre>
              </blockquote>
              <pre wrap="">--
View this message in context:

              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap=""><a class="moz-txt-link-freetext" href="http://www.nabble.com/Chart-notation%2C-update%2C-and-infinite-loops-tp20327483p20329780.html">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 wrap="">Sent from the drools - user mailing
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">list
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">archive at
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre wrap="">Nabble.com.


              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre wrap="">_______________________________________________
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre wrap="">rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>

              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap=""><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 type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">


            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">_______________________________________________
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>

            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap=""><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 type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">
            </pre>
          </blockquote>
          <pre wrap="">--
View this message in context:

          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap=""><a class="moz-txt-link-freetext" href="http://www.nabble.com/Chart-notation%2C-update%2C-and-infinite-loops-tp20327483p20334594.html">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 wrap="">Sent from the drools - user mailing list
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">archive at
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">Nabble.com.
        </pre>
        <blockquote type="cite">
          <pre wrap="">
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">_______________________________________________
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>

          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap=""><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 type="cite">
      <blockquote type="cite">
        <pre wrap="">

--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ <a class="moz-txt-link-abbreviated" href="http://www.jboss.com">www.jboss.com</a>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>

        </pre>
      </blockquote>
    </blockquote>
    <pre wrap=""><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 type="cite">
      <pre wrap="">

_______________________________________________
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>
    <pre wrap="">

-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ <a class="moz-txt-link-abbreviated" href="http://www.jboss.com">www.jboss.com</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->

      
_______________________________________________
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>
<br>
</body>
</html>