Good question, not sure it is documented properly at the moment, I think it is 
the extends keyword, but you can't easily use it anyway as you want the inverse 
of the other rule (regex doesn't match) rather than the regex does match.

Thomas

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Java Bean
Sent: 06 December 2011 16:35
To: Rules Users List
Subject: Re: [rules-users] Salience & activation-group


Or do the check for both parts in both rules , or use inheritance, but the 
easiest way would probably be to just have it return null if the number isn't 
valid - at least if you are just doing in comparisons.

How do I use inheritance in Drools ?

________________________________
From: "Swindells, Thomas" <tswinde...@nds.com<mailto:tswinde...@nds.com>>
To: Rules Users List 
<rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>>
Sent: Tuesday, December 6, 2011 11:15 AM
Subject: Re: [rules-users] Salience & activation-group


> Thanks for your quick response, but I am still confused.
>
> An activation-group assures that only one rule in the group will fire (an XOR
> group)
>
> Salience controls the order of evaluation
No salience controls the order of the activations firing.
There is no ordering of evaluating rules because rules aren't evaluated.
Instead the rules clauses are transposed into a RETE graph which evaluates each 
clause as the necessary data is available.
If two rules share a clause then they may share a node in the RETE graph.

> The regular expression test has the higher salience and will trigger if it is 
> a bad
> number ... so why is the other rule even being tested?
The RETE graph is evaluated as deeply as possible in order to produce the 
current list of possible activations.
The activations are then sorted by salience and filtered by agenda-group. The 
top of the list is taken and fired.
If any other pending activations have the same activation-group those pending 
activations are then removed.
(It's a lot more complicated than that as you have things such as lock on 
active, no-loop, etc but it hopefully
makes it make a little more sense.

>
> In the mean time I will re-write the underWritingClassAsInt method to deal
> with a bad number ... but this seems wrong to me.
Or do the check for both parts in both rules , or use inheritance, but the 
easiest way would probably be to just have it return null if the number isn't 
valid - at least if you are just doing in comparisons.

Thomas


**************************************************************************************
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com<mailto:postmas...@nds.com> and delete it from your system as 
well as any copies. The content of e-mails as well as traffic data may be 
monitored by NDS for employment and security purposes. To protect the 
environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to