<div dir="ltr">Thanks for the responses.<br>what i did was:<br><br>rule &quot;Rule-01&quot;<br>salience 100<br>activation-group &quot;defender&quot;<br>no-loop true<br>.....<br><br>rule &quot;Rule-02&quot;<br>
activation-group &quot;defender&quot;<br>
no-loop true<br>
.....<br>
<br>this way i assured the higher priorities rules run first (salience 100) and that only one rule overall will be used.<br><br>thanks.<br>Nadav.<br><br><br><br><div class="gmail_quote">2010/9/22 Leonardo Gomes <span dir="ltr">&lt;<a href="mailto:leonardo.f.gomes@gmail.com">leonardo.f.gomes@gmail.com</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;">I think that you can explore the options already suggested:<br><br>- guard condition<br>- agenda group<br>
<br>and also:<br><br>- no-loop, if you happen to have any rule looping around itself<br>- drools.halt( ) in the consequence, if you want to completely halt the execution when a given rule matches.<br>
<br>Cheers,<br>Leo.<br><br><br><br><div class="gmail_quote">2010/9/21 Esteban Aliverti <span dir="ltr">&lt;<a href="mailto:esteban.aliverti@gmail.com" target="_blank">esteban.aliverti@gmail.com</a>&gt;</span><div><div></div>
<div class="h5"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If what you need is to fire just a subset of all the activated rules, you could use agenda-group attribute instead of activation-group.<div><br></div><div>Best,<br clear="all"><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>



<br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>




<br><br><div class="gmail_quote">2010/9/20 Michael Anstis <span dir="ltr">&lt;<a href="mailto:michael.anstis@gmail.com" target="_blank">michael.anstis@gmail.com</a>&gt;</span><div><div></div><div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



You could consider using a &quot;guard condition&quot; e.g.<div><br></div><div>rule 1</div><div>    when</div><div>        not Solved()</div><div>        &lt;Your rule 1&gt;</div><div>    then</div><div>        insert new Solved();</div>




<div>        ....</div><div>    end</div><div><br></div><div><div>rule 2</div><div>    when</div><div>        not Solved()</div><div>        &lt;Your rule 2&gt;</div><div>    then</div><div>        insert new Solved();</div>




<div>        ....</div><div>    end</div></div><div><br></div><div><br></div><div>If you only want one rule per &quot;group&quot; then have the grouping as a member of the guard condition.</div><div><br></div><div>I&#39;m not sure if you can cause the processing of activations to abort.</div>




<div><br><div class="gmail_quote">2010/9/20 Nadav Hashimshony <span dir="ltr">&lt;<a href="mailto:nadavh@gmail.com" target="_blank">nadavh@gmail.com</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><div></div><div>
<div dir="ltr">Hi<br><br>Im using drools 5 with Guvnor 5<br>i set up 30 Technical rules and build a package to be used by my drools-sample application.<br><br>my probelm is as followed, some rule may conflict, i want to set up a rule order and if one rule is caught then i want the drools to stop and not continue to try other rules.<br>





<br>ive use salience but it hasnt really done the trick.<br><br>example:  <br>my rules:<br><br>rule &quot;Rule-01&quot;<br>salience 100<br>activation-group &quot;group1&quot;<br>...<br>System.Out.Println(&quot;caught rule 1&quot;)<br>





....<br><br>rule &quot;Rule-02&quot;<br>
salience 100<br>
activation-group &quot;group1&quot;<br>...<br>
System.Out.Println(&quot;caught rule 2&quot;)<br>
....<br>
<br>rule &quot;Rule-03&quot;<br>

activation-group &quot;group2&quot;<br>
...<br>
System.Out.Println(&quot;caught rule 3&quot;)<br>
....<br>
<br><br>rule &quot;Rule-04&quot;<br>


activation-group &quot;group2&quot;<br>...<br>
System.Out.Println(&quot;caught rule 4&quot;)<br>
....<br>
<br><br>

actual result: lets say all 4 rules are cuaght, what i will see is as followed<br><br>ACTIVATION CREATED rule:Rule-01 activationId:Rule-01 [1] declarations: <br>BEFORE ACTIVATION FIRED <br>caught rule 1<br>ACTIVATION CANCELLED rule:Rule-2<br>





<br>ACTIVATION CREATED rule:Rule-03 activationId:Rule-01 [1] declarations: <br>
BEFORE ACTIVATION FIRED <br>
caught rule 3<br>
ACTIVATION CANCELLED rule:Rule-3<br> 
<br><br>only one rule from each activation-group will be fired, and the first group with the higher salience will fire first.<br><br>what i would like is it one rule was caught to stop trying? is it possible?<br><br>Thanks, Nadav.<br>





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