[jboss-user] [jBPM Users] - Re: workflow design about wait states
jbarrez
do-not-reply at jboss.com
Tue Sep 15 11:19:36 EDT 2009
The issue here is that you have multiple threads, the JUnit thread and the JobExecutor thread(s).
The process is started in the JUnit thread until the custom activities in the fork are encountered. Jobs are created and put in the database.
These jobs will be picked up by the JobExecutor threads somewhere in the future. However, the JUnit thread is still running and reaches the end of the method call. The JUnit framework will now kill its ThreadRunner, which also kills all spawned processes (Jobexecutor threads).
The join activity can never ensure here that all threads have finished, for the simple reason that the join is potentially never even reached (if the JUnit thread finished quickly).
If you want to control your unit test, you must disable the job executor in your config and fire the jobs yourself.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4255329#4255329
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4255329
More information about the jboss-user
mailing list