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/535419#535419
--------------------------------------------------------------
Hi Maciej :
Because of your working attachment, so I think it is worth of debugging it in my
environment this time.
So now I run the following command:
%> WfeUtility -start SimSubProc
In my database, now I have a new data row :
DBID_ ... ACTIVITYNAME_ ... ID_ ... SUBPROCINST_
50001 check_id SimSubProc.50001
Now I run the following command:
%> WfeUtility -signal SimSubProc.50001
Now it dumps the following exceptions :
10:24:27,736 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_`))
10:24:27,736 SEV | [AbstractFlushingEventListener] Could not synchronize database
state with session
org.hibernate.exception.ConstraintViolationException: could not update:
[org.jbpm.pvm.internal.model.ExecutionImpl#50001]
After debug and comment out only one line in "AcquireDbidBlockCmd.java" as shown
below :
"org.jbpm.pvm.internal.id.AcquireDbidBlockCmd" :
....
session.update(property);
// session.flush(); // <-- only comment out here
return nextId;
....
Now re-run the command "WfeUtility -signal SimSubProc.50001", it works all fine
and in my database is :
DBID_ ... ACTIVITYNAME_ ... ID_ ... SUBPROCINST_
50001 check_id SimSubProc.50001 60001
60001 get-approval SubProcTasks.60001
So the results of the data rows indicates the exceptions (thrown by session.flush()) are
somehow related to when the "SUBPROCINST_" field of data row "50001"
wants to refer to ID "60001".
So I wonder :
(1) There are some patches of fixes for jBPM 4.3 required, but I don't have them in my
jBPM ? (did you ever patch your jBPM 4.3 ?)
(2) My jbpm.default.cfg.xml has something wrong ? (then how come other 99% of user cases
works, only this one does not.)
Thanks a lot for your help. :)
Tun Mang
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/535419#535419]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]