[jboss-user] [jBPM] - createProcessInstance + startProcessInstance does not update processinstanceinfo state

Affan Dar do-not-reply at jboss.com
Tue Feb 21 21:23:08 EST 2012

Affan Dar [https://community.jboss.org/people/affandar] created the discussion

"createProcessInstance + startProcessInstance does not update processinstanceinfo state"

To view the discussion, visit: https://community.jboss.org/message/718535#718535

I am seeing a strange issue in my jbpm 5 + hibernate + mysql configuration. 

A test process 'com.sample.bpmn' consists of the following: start -> myactivityhandler -> somescript -> end
myactivityhandler is an async activity handler and hence 'execute' returns without calling completeWorkItem.

Now after execution of the following snippet:


I look at the ProcessInstanceInfo for the process and I see that the instance state is rightful set to ACTIVE since the process is actually active and just hit its first savepoint after the myactivityhandler.

However if I break the startprocess down to the following:

ProcessInstance pi = ksession.createProcessInstance("com.sample.bpmn", null);

After execution of the above two, I expect the state would be the same as the previous snippet i.e. process instance state == ACTIVE but in reality it is set to PENDING. Also when I trace the SQL that hibernate is sending to MySQL I don't see any UPDATE going to the ProcessInstanceInfo table. This is a problem since now I can't complete the myactivityhandler workitem to continue the process.. and it needs to be started again.

Any clue why the above two scenarios are behaving differently?

Fwiw, if I configure the system to use the in-memory H2 then everything works fine and dandy.


Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120221/abb1e21b/attachment-0001.html 

More information about the jboss-user mailing list