[rules-users] Help! Activations firing out of salience order

Swindells, Thomas TSwindells at nds.com
Tue Oct 18 04:14:55 EDT 2011


In our project we have been experiencing a large number of intermittent unit test failures when we are testing our rules (on drools 5.1.1).
After a lot of debugging, examining our rules for logic errors, experimenting and generally scratching our head trying to work out what is wrong, we have noticed that sometimes (but very intermittently) activations are firing in the wrong order.

In our rulebase we have two rules, Rule A salience 80 and Rule B salience 70. Whilst debugging we made Rule A and B are identical other than rule B having some additional constraints on the end.
Dumping out the agenda events we have observed the following actions occurring:
BEFORE_FIRED rule X
CREATED_ACTIVATION Rule A
CREATED_ACTIVATION Rule B
AFTER_FIRED rule X

... (no references to either rule/activation)

BEFORE_FIRED Rule B
CANCELLED Rule A
AFTER_FIRED Rule B

How can Rule B be firing before Rule A when both activations exist?
Does anybody know of any bugs in 5.1.1 that may be causing this?
We have a branch of code on 5.3 and that also has had intermittent unit test failures, we've not had chance to examine whether this is the same pattern or just a different logic issue.

Please help,

Thomas



________________________________

**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at 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
**************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20111018/176ef3b2/attachment.html 


More information about the rules-users mailing list