-
1. Re: Timer not firing - why ???
arnoldh Feb 12, 2008 8:11 PM (in response to francis1970)I have the same problem, and I use junit for testing. and I use :
final int SECONDS_TO_WAIT = 30000; //30 seconds
try {
Thread.sleep(SECONDS_TO_WAIT);
} catch (InterruptedException e) {
e.printStackTrace();
}
to simulate the waiting period. and the expected transition didn't happen. :( -
2. Re: Timer not firing - why ???
francis1970 Feb 13, 2008 4:17 AM (in response to francis1970)Yes, I have tried this too as last option :-)
Hope somebody can shed some light..... -
3. Re: Timer not firing - why ???
mryilauer Feb 14, 2008 10:43 AM (in response to francis1970)I am not saying that this is right, but I have a process with a timer, and it fires once, so I attach a handler to it that transitions back to the same node if the condition is not met, so then the timer gets set again.
-
4. Re: Timer not firing - why ???
tellierj Feb 15, 2008 2:24 AM (in response to francis1970)make sure that the JobExecutorThread is started
-
5. Re: Timer not firing - why ???
mryilauer Feb 19, 2008 8:05 AM (in response to francis1970)I'm sure not all of this is necessary, but I threw it all at it, and it worked. Whenever I trimmed anything, it didn't. This can't be right, since it seems to create a second timer, but I took care of that in the handler.
timer = new Timer(pi.getRootToken());
timer.setGraphElement(pi.getRootToken().getNode());
timer.setName("programmatic timer");
timer.setRepeat("10 seconds");
timer.setDueDate(new Date());
timer.execute(jbpmContext);
jbpmConfiguration.startJobExecutor();