[jboss-user] [jBPM] - Questions about transactions in jBPM 4.3

HuiSheng Xu do-not-reply at jboss.com
Sat Jun 12 22:53:46 EDT 2010


HuiSheng Xu [http://community.jboss.org/people/rebody] replied to the discussion

"Questions about transactions in jBPM 4.3"

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

--------------------------------------------------------------
Hi Rachel,

jBPM 4 simply use one thread to execute all of automatic activities in an execution.  If the execution arrival a wait activity, like State, Task or SubProcess, the execution will turn to wait state and operation will return, the related transaction will commit.

And the Async Message is a way to return the operation result immediately,  it won't wait for the all of operations of an execution.  It is useful for time cost operations.  For example, If you want to generate some reports in an activity, and this operation will take lots of time,  then you could use continue="async", and processEngine will tell end user that the reports are generating, they could continue to do other jobs.  So it needn't let user wait for all of jobs completed.  They could get the return message information directly.

In jBPM 4, the async message is handled by the JobExecutor.  You can think it just like a Thread.  It will go on query the database, if there are some jobs, it will take the job, and execute them.  Because the JobExecutor will start individual transaction to handle these jobs.  So we said that the transaction that async messages executed is different from the user request.

Hope it will helpful.

--------------------------------------------------------------

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

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/20100612/efcbd38a/attachment.html 


More information about the jboss-user mailing list