[jboss-user] [jBPM Users] - Re: StaleObjectException in JBPM 4.0

mmusaji do-not-reply at jboss.com
Mon Aug 24 10:15:30 EDT 2009


Apologies Ronald, I was hoping for more of a discussion as opposed to a solution to my specific problem.

Here's the fork and join from my workflow.


  | <java class="org.workflow.FindProviders" g="276,7,80,40" method="execute" name="find providers">
  |      <transition name="" to="fork"/>
  |    </java>
  |      
  |    <fork g="298,85,80,40" name="fork">
  |       <transition g="-62,-18" name="validate red" to="validate red request"/>
  |       <transition g="-64,-18" name="validate exp" to="validate exp request"/>
  |       <transition g="-63,-17" name="validate sys" to="validate sys request"/> 
  |    </fork>
  |    
  |    <custom continue="async" name="validate red request" class="org.workflow.Validate1" exp="#{myFirstObj}">         
  |     <transition g="-27,-18" name="" to="join"/>
  |    </custom>
  |    
  |    <custom continue="async" name="validate exp request" class="org.workflow.Validate2" exp="#{mySecondObj}">         
  |     <transition g="-27,-18" name="" to="join"/>
  |    </custom>
  |    
  |    <custom continue="async" name="validate sys request" class="org.workflow.Validate3" exp="#{myThirdObj}">         
  |     <transition g="-27,-18" name="" to="join"/>
  |    </custom>   
  |    
  |    <join g="267,368,80,40" name="join">
  |       <transition name="check results" to="evaluate validation results" g="-47,-16"/>
  |    </join>
  | ...
  | 

Starting the process using JobExecutor config
<jbpm-configuration>
  | 
  |   <process-engine-context>
  |   
  |     <job-executor threads="5" idle="10" idle-max="0" lock-millis="0" />
  | 
  |   </process-engine-context>
  | 
  | </jbpm-configuration>

Using MySQL and everytime I run the forks run concurrently as expected. But then sometimes in between the forks or sometimes after I get this exception


  | org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.pvm.internal.model.ExecutionImpl#53]
  | 	at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1792)
  | 	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2435)
  | 	at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)
  | 	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)
  | 	at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
  | 	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
  | 	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
  | 	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
  | 	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
  | 	at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)
  | 	at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
  | 	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)
  | 	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
  | 	at org.jbpm.pvm.internal.hibernate.DbSessionImpl.deleteProcessDefinitionHistory(DbSessionImpl.java:165)
  | 	at org.jbpm.pvm.internal.cmd.DeleteDeploymentCmd.execute(DeleteDeploymentCmd.java:77)
  | 	at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
  | 	at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
  | 	at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
  | 	at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
  | 	at org.jbpm.pvm.internal.repository.RepositoryServiceImpl.deleteDeploymentCascade(RepositoryServiceImpl.java:70)
  | 	at biz.thelogicgroup.fraudswitch.workflow.FraudWorkflowTest.tearDown(FraudWorkflowTest.java:76)
  | 	at junit.framework.TestCase.runBare(TestCase.java:130)
  | 	at junit.framework.TestResult$1.protect(TestResult.java:106)
  | 	at junit.framework.TestResult.runProtected(TestResult.java:124)
  | 	at junit.framework.TestResult.run(TestResult.java:109)
  | 	at junit.framework.TestCase.run(TestCase.java:118)
  | 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
  | 	at junit.framework.TestSuite.run(TestSuite.java:203)
  | 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
  | 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
  | ### EXCEPTION ###########################################
  | ### EXCEPTION ###########################################
  | 

I read somewhere this is expected behaviour but this surely can't be right... can it?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251220#4251220

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251220



More information about the jboss-user mailing list