On 06/07/2012, Ladd <[email protected]> wrote: > I have a rule which runs every 2 seconds using > > *timer( int: 0ms 2s )* > > When I either disable > > *rule.setEnabled( new EnabledBoolean( false ) );* > > or remove the rule > > *pkg.removeRule( rule );* > > the timer continues to fire every 2 seconds. > > This is with version 5.4. > > I haven't been able to find the API for cancelling or stopping a timer. > Can > anyone point me in the right direction?
The usual technique is to have a Fact as part of the rule's LHS and retract this, so the LHS doesn't match any more. -W > > Thanks for the help!! > > - Ladd > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Remove-rule-but-timer-still-fires-tp4018509.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
