JBoss Community

jBPM 4.3, multiple threads handled sub-process caused its parent process throwing exceptions

created by Tun Mang in jBPM - View the full discussion

Hi :

 

I have a jpdl with fork as shown below :

 

  -->(fork-node)-->(sub-process-node-A)-->(join-node)

                -->(sub-process-node-B)-->

 

The sub-process-node-A and sub-process-node-B refer a same and very simple sub-process jpdl (which has only 3 nodes: start, state and end). But there is one thread to call the signal process function per sub-process (i.e. there are totally 2 threads running to handle the externl jobs).

 

When the thread calls the signal process function to end its corresponding sub-process, it's all OK:

         

....         

21:50:36 DEBUG [....EndHandler]: (AP) parent process: (PVODDelivery.2660001)

21:50:36 DEBUG [....EndHandler]: (AP)   execution id: (ConformAsset.2660164)

....

21:50:36 DEBUG [....EndHandler]: (AP) parent process: (PVODDelivery.2660001)

21:50:36 DEBUG [....EndHandler]: (AP)   execution id: (ConformAsset.2660078)

....

 

But right after the ending of the sub-process, jbpm always throws the following exceptions:

 

21:50:37,164 INF | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.SignalCmd@64f06ab7

org.hibernate.StaleObjectStateException:

Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.pvm.internal.model.ExecutionImpl#2660001]

          at org.hibernate.dialect.lock.SelectLockingStrategy.lock(SelectLockingStrategy.java:102)

          at org.hibernate.persister.entity.AbstractEntityPersister.lock(AbstractEntityPersister.java:1361)

          at org.hibernate.event.def.AbstractLockUpgradeEventListener.upgradeLock(AbstractLockUpgradeEventListener.java:108)

          at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:87)

          at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:611)

          at org.hibernate.impl.SessionImpl.lock(SessionImpl.java:603)

          at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:68)

          at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:49)

          at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)

          at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:678)

          at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:638)

          at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:439)

          at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:421)

    ....

   

Is there a way to fix this issue via "jbpm.default.cfg.xml" or "jbpm.hibernate.cfg.xml" ?

 

Thanks a lot for you time and help in advance.

Reply to this message by going to Community

Start a new discussion in jBPM at Community