JBoss Community

Re: jBPM Process Persistence Issue

created by Vadim Melnik in jBPM - View the full discussion

Hello Thomas,

 

This might be problem related to JBPM5 persistence mechanism design, things like ProcessInstanecInfo, WorkItemInfo serialized automatically by JPA. On long transaction it's possible that JPA+Hibernate flushes objects from JBPM session to  DB and mark this object as pesisted. Then JBPM code still continue to modify objects (process info, workitem info, logs etc), but these updates don't affect JPA session, so applying to JPA this object is not modified anymore. This is caused by specific design/implementation for presistance in JBPM.

 

If this is case - as temporary solution provide own EntityManagerFactory implementation and for each created EntityManager set "EntityManager.setFlushMode(FlushModeType.COMMIT)". This will prevent intermediate flushes and delay all JBPM/JPA persistence to DB calls to transaction commit time. 

 

--

Thanks,

Vadim.

Reply to this message by going to Community

Start a new discussion in jBPM at Community