On Fri, Jul 25, 2008 at 1:04 PM, Claudio Rainoldi
<claudio.rainoldi(a)gmail.com> wrote:
Hi everyone,
i'm developing a java application using drools 4 for domotic control;
i ve implemented a listener on my working memory with the
method afterActivationFired(...) and activationCancelled(...) .
At startup of my app i've write the following lines:
listener = new FiredRulesListener();
workingMemory.addEventListener(listener);
Each time a rule is fired the method afterActivationFired(...) is called and
it is ok; but when the rule stop to be true the
method activationCancelled isn't never called.
Afaik, activationCancelled works like this:
The fact is added, a rule would match, the activation is scheduled.
However, another rule (probably with higher priority) matches, too,
and it modifies the fact in a way that would make the first rule not
match - thus, the activation is cancelled and the corresponding
listener method gets called.
Somebody correct me if I'm wrong, please ;)