[jboss-user] [jBPM Users] - Re: How to use timers?
mputz
do-not-reply at jboss.com
Tue Nov 24 04:58:39 EST 2009
geez, guys, calm down again ;-)
"mauromol" wrote :
| I'm writing a test case, I am not running in a web application for now.
|
In that case, you still need persistence. With the DbSchedulerServiceFactory, timers are stored in the jBPM database and executed by the JobExecutor (which needs to be started, btw).
The easiest way to test timers is by extending the AbstractDbTestCase class. Have a look at the processJobs(long maxWait) method, which starts a JobExecutor and waits until jobs are processed:
http://anonsvn.jboss.org/repos/jbpm/jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java
There are a couple of test cases for timer execution related scenarios, such as this one, for example:
http://anonsvn.jboss.org/repos/jbpm/jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2036/JBPM2036Test.java
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267247#4267247
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267247
More information about the jboss-user
mailing list