JBoss Community

When does Session.startProcess() return?

created by Brian Wallis in jBPM - View the full discussion

I'm launching a new workflow calling StatefulKnowledgeSession.startProcess() and am wondering about the threading model. When will this return

 

1) if the first node in the workflow is a rules node and will have to wait for a fact to be inserted into the session

 

2) if the first node in the workflow is WorkItem node of my own coding, ie: is my code executed by the same thread that called startProcess()

 

3) if the first node in the workflow is a HumanTask node.

 

The reason I ask is that I don't know if I need to create a new thread before calling startProcess() or not. And if I do need a thread, how would this be recreated when I want to resume all the workflow sessions after a shutdown? If you can point me at some documentation about the threading and transaction model for jBPM5 I would be very grateful.

 

thanks,

Reply to this message by going to Community

Start a new discussion in jBPM at Community