> 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 
[email protected] 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
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to