It is a 2.1 feature, but for whatever reason, it just didn't work (from my 
experience).  I was told this was supposed to be fixed in 2.5, as they realized 
what the problem was.

________________________________

From: Michael Neale [mailto:[EMAIL PROTECTED]
Sent: Thu 12/29/2005 6:00 PM
To: [email protected]
Subject: [spam]::Re: [drools-user] Exclusion of rules



use xor-group attribute. When a rule fires that has a xor-group name set,
then non of the other rules with the same group will fire.

I *think* this is a 2.1 feature (been a while !).



On 12/30/05, Sinha, Amitesh <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>
>
> I hope holiday season is bringing a lot of happiness for all of us.
>
>
>
> I am wondering if there is a way to implement the following. If Rule1 is
> satisfied, Rule 2 should not be evaluated.
>
>
>
> e.g., In the example below if the "GreaterThan10" rule is satisfied,
> "GreaterThan5" rule should not be applied.  The reason being I want to
> return the consequence from the first rule satisfying the condition.
>
>
>
> <rule-set name="RuleSet1"
>
>     xmlns="http://drools.org/rules";
>
>     xmlns:java="http://drools.org/semantics/java";
>
>     xmlns:xs="http://www.w3.org/2001/XMLSchema-instance";
>
>     xs:schemaLocation="http://drools.org/rules rules.xsd
>
>
> http://drools.org/semantics/java java.xsd">
>
>
>
>
>
>     <import>java.lang.String</import>
>
>
>
>     <rule name="GreaterThan10" salience="100">
>
>         <parameter identifier="number">
>
>             <class>String</class>
>
>         </parameter>
>
>         <java:condition>Integer.parseInt(number) &gt; 10
> </java:condition>
>
>         <java:consequence> System.out.println("Greater than 10 rule
> satisfied"); </java:consequence>
>
>     </rule>
>
>
>
>
>
>     <rule name="GreaterThan5" salience="50">
>
>         <parameter identifier="number">
>
>             <class>String</class>
>
>         </parameter>
>
>         <java:condition>Integer.parseInt(number) &gt; 5
> </java:condition>
>
>         <java:consequence> System.out.println("Greater than 5 rule
> satisfied"); </java:consequence>
>
>     </rule>
>
>
>
> </rule-set>
>
>
>
> Thanks in advance.
>
>
>
> Amitesh Sinha
>
>
>
> Technical Architect
>
> Telecom Business Unit
>
> Patni Computer Systems
>
> [EMAIL PROTECTED]
>
>
>
>
>


Reply via email to