<!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>
ruleName : String<br>
end<br>
<br>
rule "A1"<br>
salience 100<br>
when<br>
xxx1<br>
not CF( ruleName == "A1" )<br>
then <br>
yyy1<br>
CF cf = new CF();<br>
cf.setRuleName("A2");<br>
insert(cf); <br>
end<br>
<br>
rule "A2"<br>
salience 90<br>
when<br>
xxx2<br>
not CF( ruleName == "A2" )<br>
then <br>
yyy2<br>
CF cf = new CF();<br>
cf.setRuleName("A1");<br>
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"><<a moz-do-not-send="true"
href="mailto:iyaniv@gmail.com">iyaniv@gmail.com</a>></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> xxx1</div>
<div>then</div>
<div> 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> xxx2</div>
<div>then</div>
<div> 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>