First, let me say that I am going to create a new fork and join node that works asynch. I was going to just create a new fork node, but after discussing the issue with my coworkers, we are going to add a new join that is aware of asynch tokens. This is the most elegant solution to this problem. It eliminates the need for extra states...
Elaborating on: "parallel1 and parallel2 are designed to go into wait states. I then signal their respective tokens which causes parallel1b and parallel2b to run. each waits 30 seconds before continuing, so I have time to signal the tokens." I think when we say "goes into a wait state", it can be confusing. That simply means that I have a state node and I don't cause a signal to occur, leaving the token in that state node. parallel1 and parallel2 are state nodes that execute code in the node-enter event to simply Thread.sleep(30000) then fall out, leaving the nodes in a wait state. I have a jetty server (http://jetty.mortbay.org/jetty/) that listens for certain URL requests. I have a request to signal a token. I use this URL to signal each token, causing the tokens to run in their own threads. Since parallel1 and parallel2 are signalled, the processes move respectively into parallel1b and parallel2b which Thread.sleep(30000) and then signal themselves to continue. Say what you will, but I think jBPM needs asynch classes. We need it for our batch processing. I know that firing off threads in a J2EE environment is a no-no, but jBPM will not always be running in a J2EE environment and asynch behavior is desireable and as this discussion thread shows, it is hard to achieve properly... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3911762#3911762 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3911762 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user