[rules-users] Remove rule but timer still fires

Wolfgang Laun wolfgang.laun at gmail.com
Sat Jul 7 02:21:58 EDT 2012


@developers: please comment

An existing/active rule with a timer produces an activation if the
conditions are met. This activation is now part of the Rete and
continues to be so until the LHS turns to false; the repeating timer
merely retriggers the execution of the consequence. Killing the rule
itself merely prohibits new activations.

Its debatable whether removing the rule should also retract pending
activations. This is not defined/documented for rules without timer
(at least I'm not aware of any such documentation), but surely all
kinds of rules should be treated alike.

-W


On 06/07/2012, Ladd <ladd at codemettle.com> wrote:
> I see that working as an alternative to enable/disable.
>
> But what's the recommended approach for totally removing a rule that runs
> on
> a timer?  After running pkg.removeRule( rule ) the rule seems to be deleted
> because pkg.getRules() comes back empty.  Yet the rule with the timer
> continues to fire every 2 seconds.
>
> Thanks,
>
> - Ladd
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Remove-rule-but-timer-still-fires-tp4018509p4018513.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list