<!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">
    Not sure exactly what you mean with the "etc". in "no global flags
    etc" but you could use a declared control fact, for example:<br>
    <br>
    declare CF<br>
    &nbsp;&nbsp;&nbsp; ruleName : String<br>
    end<br>
    <br>
    rule "A1"<br>
    &nbsp;&nbsp;&nbsp; salience 100<br>
    &nbsp;&nbsp;&nbsp; when<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; xxx1<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; not CF( ruleName == "A1"&nbsp; )<br>
    &nbsp;&nbsp;&nbsp; then <br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; yyy1<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CF cf = new CF();<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cf.setRuleName("A2");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; insert(cf);&nbsp;&nbsp;&nbsp; <br>
    end<br>
    <br>
    rule "A2"<br>
    &nbsp;&nbsp;&nbsp; salience 90<br>
    &nbsp;&nbsp;&nbsp; when<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; xxx2<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; not CF( ruleName == "A2"&nbsp; )<br>
    &nbsp;&nbsp;&nbsp; then <br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; yyy2<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CF cf = new CF();<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cf.setRuleName("A1");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; insert(cf);<br>
    end<br>
    On 12/16/10 10:44 AM, Yaniv Itzhaki wrote:
    <blockquote
      cite="mid:AANLkTi=p7HFhzVH_XS8t1BTchPfVqzARvc3ivdUOdf35@mail.gmail.com"
      type="cite">
      <div dir="ltr">any ideas anyone?<br>
        <br>
        <div class="gmail_quote">On Thu, Dec 16, 2010 at 12:36 PM, Yaniv
          Itzhaki <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:iyaniv@gmail.com">iyaniv@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            <div dir="ltr">Hi,
              <div><br>
              </div>
              <div>I have a group of rules with salience which I would
                like that only the first activated rule will fire.</div>
              <div><br>
              </div>
              <div>I cant use the activation-group attribute because
                each rule can fire number of times, and i want only this
                rule to be fired in that group:</div>
              <div><br>
              </div>
              <div>
                <div>rule "A1"</div>
                <div><span style="white-space: pre-wrap;"> </span>salience
                  100</div>
                <div><span style="white-space: pre-wrap;"> </span>ruleflow-group
                  "A"</div>
                <div><span style="white-space: pre-wrap;"> </span>activation-group
                  "A"</div>
              </div>
              <div>when</div>
              <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;xxx1</div>
              <div>then</div>
              <div>&nbsp;&nbsp; &nbsp; &nbsp; yyy1</div>
              <div>end</div>
              <div><br>
              </div>
              <div>
                <div>
                  <div>rule "A2"</div>
                  <div><span style="white-space: pre-wrap;"> </span>salience
                    90</div>
                  <div><span style="white-space: pre-wrap;"> </span>ruleflow-group
                    "A"</div>
                  <div>
                    <span style="white-space: pre-wrap;"> </span>activation-group
                    "A"</div>
                </div>
                <div>when</div>
                <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;xxx2</div>
                <div>then</div>
                <div>&nbsp;&nbsp; &nbsp; &nbsp; yyy2</div>
                <div>end</div>
              </div>
              <div><br>
              </div>
              <div>
                If Rule A1 run (activated number of times), rule A2
                should not run.</div>
              <div><br>
              </div>
              <div>Is there a way to do that? (no global flags etc.)</div>
              <div><br>
              </div>
              <div>Thanks</div>
              <div>Yaniv</div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>