Hi,<br>The attribute 'activation-group' might be what you are lookiing for:<br><a href="http://downloads.jboss.com/drools/docs/4.0.3.15993.GA/html/ch06s05.html#d0e3029">http://downloads.jboss.com/drools/docs/4.0.3.15993.GA/html/ch06s05.html#d0e3029
</a><br><br>Chris<br><br><div><span class="gmail_quote">2007/10/30, Dr. Gernot Starke <<a href="mailto:gs@gernotstarke.de">gs@gernotstarke.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Georgy,<br><br>one (simple) way to achieve this is to assert a "stop"-fact on the<br>right-hand-side<br>of the executing rule (e.g. by setting an appropriate attribute) AND<br>querying that attribute on the LHS of every rule.
<br><br>Example (pseudo-code)<br><br>rule 1<br> when (business-conditions...)<br> st: StopFact ( done == false )<br> then<br> st.setDone( true ); // make ALL other rules fail<br> // all other actions...
<br>end<br><br>IMHO this is expressive in a way that the "single-rule-only" approach<br>is clearly visible in all rules...<br><br>But: Don't forget to set the StopFact to "not-done" after evaluation...
<br><br>regards from Cologne,<br>Gernot<br><br><br>Am 30.10.2007 um 08:21 schrieb nechukin:<br><br>><br>> Hi,<br>><br>> I'm looking into the Drools engine for our application, and looks<br>> like it's
<br>> satisfies the reqirements. The only thing I haven't found still is a<br>> following conflict management model:<br>><br>> If rule_1 (with highest salience) is applicable, STOP applying another<br>> rules.
<br>><br>> So the essence is that only 1 or 0 rules should be applied for the<br>> particular entity, not 2 or more.<br>><br>> I'm sure this is supported by engine. Where to look? Tried to scan<br>> ConflictResolving section, but look like it is only about the rules
<br>> application order, not more...<br>><br>> Thanks,<br>> Georgy<br>> --<br>> View this message in context: <a href="http://www.nabble.com/Use-only-first-">http://www.nabble.com/Use-only-first-</a><br>
> matching-rule-tf4710521.html#a13464084<br>> Sent from the drools - user mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>>
<br><br>Dr. Gernot Starke<br>Doing IT Right<br><br>---<br>Willi-Lauf Allee 43, D-50858 Köln<br><a href="mailto:gs@gernotstarke.de">gs@gernotstarke.de</a>,<br> +49 (0) 177 - 728 2570<br><a href="http://www.gernotstarke.de">
http://www.gernotstarke.de</a><br>Blog: <a href="http://it-and-more.blogspot.com">http://it-and-more.blogspot.com</a><br>****************************************<br>Das freie Portal für Software-Architekten:<br><a href="http://www.arc42.de">
http://www.arc42.de</a><br><br><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">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br>