You probably need to use the timer instance id, not the timer id (as
this one is only used to differentiate between timers if you have more
than one timer defined on the same node and you want to link different
actions to each of these timers). So could it be as simple as using
ti.getId() instead of ti.getTimerId() ?
Kris
Quoting tom238(a)gmx.at:
Hi there!
I'm using Drools 5.1.SNAPSHOT.
I want to disable some timer nodes in my ruleflow, so that they will
not trigger anymore. therefore I tried the following code:
Collection<TimerInstance> tcoll =
drools.getWorkingMemory().getTimerManager().getTimers();
for (TimerInstance ti : tcoll)
{
drools.getWorkingMemory().getTimerManager().cancelTimer(ti.getTimerId());
}
OK, so far so good. The code above doesn't work, because
ti.getTimerId() always returns 0. Anyone an idea why this value is 0?
As I've seen in the sources this field is set to an value > 0. this
value is then incremented when you add another timerinstance.
Thanks in advance! hope anyone can help.
tom
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla
Firefox 3.5 -
sicherer, schneller und einfacher!
http://portal.gmx.net/de/go/chbrowser
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users