[jboss-user] [jBPM] - jBPM 4.3 starting a sub-process after a state node will fail

Tun Mang do-not-reply at jboss.com
Wed Mar 31 12:22:08 EDT 2010


Tun Mang [http://community.jboss.org/people/tunmang] replied to the discussion

"jBPM 4.3 starting a sub-process after a state node will fail"

To view the discussion, visit: http://community.jboss.org/message/534973#534973

--------------------------------------------------------------
Hi Maciej :

Thanks for your help. The event listener is just for my own transition visibility. After I removed all the event listeners in the process definition (as shown below), re-deploy, re-start the process instance. When the "token" reached the state node, I call executionService.signalExecutionById("SimSubProc.290001"), and it throws the same exceptions. 

I get the executionService by calling processEngine.getExecutionService(). Is there something I missed ?

The puzzle I cannot figure out is why if I remove the "check_id" state node and make the start node's transition directly go to the sub-process, everything goes fine.

Thanks a lot for your help again.

Tun Mang

=================================
<?xml version="1.0" encoding="UTF-8"?>
<process name="SimSubProc" xmlns=" http://jbpm.org/4.3/jpdl http://jbpm.org/4.3/jpdl">
  <start >  
    <transition to="check_id" ></transition>    
  </start>
 
  <state name="check_id"  >    
    <transition to="review" ></transition>      
  </state>
 
  <sub-process name="review" sub-process-key="SubProcTasks" >               
    <transition to="ok" ></transition>    
  </sub-process>
  
  <state name="ok" >    
    <transition to="end" ></transition>            
  </state>  
 
  <end name="end" ></end>  
</process>
 

===================================
09:03:17,937 INF | [CheckDbCmd] jBPM version info: library[4.3], schema[4.3]
Process Engine Identity Hash Code: 4781685
09:03:18,765 WRN | [JDBCExceptionReporter] SQL Error: 1452, SQLState: 23000
09:03:18,765 SEV | [JDBCExceptionReporter] Cannot add or update a child row: a foreign key constraint fails (`jbpm_4_3/jbpm4_execution`, CONSTRAINT `FK_EXEC_SUBPI` FOREIGN KEY (`SUBPROCINST_`) REFERENCES `jbpm4_execution` (`DBID_`))
### EXCEPTION ###########################################
09:03:18,765 SEV | [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: could not update: [org.jbpm.pvm.internal.model.ExecutionImpl#290001]
 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
 at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2425)
  ....
 at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
 at org.jbpm.pvm.internal.id.AcquireDbidBlockCmd.execute(AcquireDbidBlockCmd.java:35)
 at org.jbpm.pvm.internal.id.AcquireDbidBlockCmd.execute(AcquireDbidBlockCmd.java:10)
 at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
 ....
 at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.signalExecutionById(ExecutionServiceImpl.java:84) 
 ... 37 more
### EXCEPTION ###########################################
### EXCEPTION ###########################################
09:03:18,781 INF | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.SignalCmd at c017e9
org.jbpm.api.JbpmException: couldn't acquire block of ids
 at org.jbpm.pvm.internal.id.DatabaseDbidGenerator.getNextId(DatabaseDbidGenerator.java:65)
 at org.jbpm.pvm.internal.model.ExecutionImpl.save(ExecutionImpl.java:194)
 at org.jbpm.pvm.internal.model.ExecutionImpl.initializeProcessInstance(ExecutionImpl.java:187)
 at org.jbpm.pvm.internal.model.ProcessDefinitionImpl.createProcessInstance(ProcessDefinitionImpl.java:106)
 at org.jbpm.jpdl.internal.activity.SubProcessActivity.execute(SubProcessActivity.java:70)
 at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
 at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)
 at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:616)
 at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:417)
 at org.jbpm.pvm.internal.cmd.SignalCmd.execute(SignalCmd.java:61)
 at org.jbpm.pvm.internal.cmd.SignalCmd.execute(SignalCmd.java:35)
 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.executeInNewEnvironment(EnvironmentInterceptor.java:53)
 at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
 at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
 at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
 at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.signalExecutionById(ExecutionServiceImpl.java:84)
 ....
 

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/534973#534973]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100331/475da8e5/attachment.html 


More information about the jboss-user mailing list