This is certainly a bug, as it is definitely not what one expects from
the description of property reactive.
Existing activations that do not mention the modified property should
not be affected.
I have created a similar test case, and it fails the same way.
It seems that "property reactive" is broken in 5.5.0 and should not be used.
On 14/12/2012, m11 <mchanian(a)hotmail.com> wrote:
I have come across a problem of unexpected cancels on activations
property reactive facts. The problem occurs if two or more rules have the
same criteria. I have uploaded all the files and a unit test to show this
using a very simple bare bones example:
Running ModifyTest.java produces the following logs:
0 [main] DEBUG com.demo.rules.session.RulesLogger - Activation created
1 [main] DEBUG com.demo.rules.session.RulesLogger - Activation created
2 [main] DEBUG com.demo.rules.session.RulesLogger - Before Activation
fired calculate x
4 [main] DEBUG com.demo.rules.session.RulesLogger - Activation
cancelled calculate y
6 [main] DEBUG com.demo.rules.session.RulesLogger - After Activation
fired [Activation rule=calculate x, act#=1, salience=0, tuple=[fact
0:2:42753698:30752:3:DEFAULT:SampleBean [x=10, y=null, id=1]]
The activations have been created as expected but an activation on a rule
cancelled unexpectedily as indicated by log statement 4. Why is this?
If all the rules have a different criteria then all works fine. If i dont
use property reactive facts then it works. It looks like this is a bug, can
someone confirm this ?
We have some edge case scenarios in our rules where it is possible for some
rules to end up with the same criteria. We dont want to force the business
analysts to have to merge the rules as we have a very large number of
and it will be very hard for them to track the criteria for each rule.
If it is not a bug can someone please provide the rational reason why it is
sensible to have the activation cancelled.
View this message in context:
Sent from the Drools: User forum mailing list archive at Nabble.com
rules-users mailing list