[jboss-user] [jBPM] - Re: When does Session.startProcess() return?

Mauricio Salatino do-not-reply at jboss.com
Sun Feb 6 16:43:20 EST 2011


Mauricio Salatino [http://community.jboss.org/people/salaboy21] created the discussion

"Re: When does Session.startProcess() return?"

To view the discussion, visit: http://community.jboss.org/message/585767#585767

--------------------------------------------------------------
Hi Brain,
I think that I can explain how a startProcess() method works. 
Ifyou define in your processes nodes that are all executed synchronously,the startProcess() method will execute all the sync activities usingthe same thread that you use to call the startProcess method. It willreturn after all your sync tasks were executed. 

Whenyou have async tasks the process will run until the first one andreturn there.So, answering your question 2 and 3, the startProcess()method will return if your workitems are async. Human Tasks workItemsare async by nature, humans are async. If the code inside your customworkitem is sync, that code will be executed in the same thread thatthe startProcess() method was executed.

Ifyou are using rules (question 1) the businessRuleTask will execute ifit find at least one rule activation. and if the engine is in reactivemode (fireUntilHalt) the activation will be automatically executed andyour process will continue.

Trying to answer your last paragraph, you need to know that it depends on the approach that you use:
But,If you have async tasks, when each of that tasks is completed you willend up having a different thread that will continue the process.

Greetings
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/585767#585767]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110206/0f69b68c/attachment.html 


More information about the jboss-user mailing list