JBoss Community

Re: jBPM 5.2 with Custom transactions.

created by suprit chaudhary in jBPM - View the full discussion

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