[jboss-user] [jBPM] - Re: jBPM 5.2 with Custom transactions.

suprit chaudhary do-not-reply at jboss.com
Thu Sep 13 06:41:52 EDT 2012

suprit chaudhary [https://community.jboss.org/people/supritchaudhary] created the discussion

"Re: jBPM 5.2 with Custom transactions."

To view the discussion, visit: https://community.jboss.org/message/759369#759369

If you have service task in workflow, they all will run in same thread context, which have started the process.
In the very first service task call "userTransaction.begin();" and in the the last service task call "userTransaction.commit();"
Remeber to call flush() followed by persist() to avoid transaction errors. 
Sample Code:
     "entityManager.persist(someObject); entityManager.flush();"

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120913/69214957/attachment-0001.html 

More information about the jboss-user mailing list