<!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">
<br>
Hi,<br>
<br>
I don't know if it is the best solution since I am very new to Drools
but you could use a logical insert of a "Skip" fact. Something like:<br>
<br>
rule "A1"<br>
salience 100<br>
ruleflow-group "A"<br>
activation-group "A"<br>
when<br>
xxx1<br>
then<br>
yyy1<br>
<b> insertLogical(new Skip());<br>
</b>end<br>
<br>
rule "A2"<br>
salience 90<br>
ruleflow-group "A"<br>
activation-group "A"<br>
when<br>
<b> not Skip()<br>
</b> xxx2<br>
then<br>
yyy2<br>
end<br>
<br>
Bruno.<br>
<br>
Yaniv Itzhaki a écrit :
<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="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; 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=""> </span>salience 100</div>
<div><span style=""> </span>ruleflow-group "A"</div>
<div><span style=""> </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=""> </span>salience 90</div>
<div><span style=""> </span>ruleflow-group "A"</div>
<div><span style=""> </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="">
<hr size="4" width="90%">
_______________________________________________
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>