[rules-users] cannot retrieve timerId from timerInstance - Bug?

tom238 at gmx.at tom238 at gmx.at
Mon Oct 12 08:42:28 EDT 2009


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



More information about the rules-users mailing list