[
https://jira.jboss.org/jira/browse/JBPM-2387?page=com.atlassian.jira.plug...
]
Alfie Kirkpatrick commented on JBPM-2387:
-----------------------------------------
I added a test to the ConcurrentEndTest in trunk and it passed fine. Patch below in case
it's useful.
The error about ClassNotFoundException was caused because I still had <mapping
resource="jbpm.jpdl.hbm.xml" /> from CR1 in my jbpm.hibernate.cfg.xml.
Perhaps this could be encapsulated a little more to shield from hbm/schema changes.
Index: modules/test-db/src/test/java/org/jbpm/test/execution/ConcurrentEndTest.java
===================================================================
--- modules/test-db/src/test/java/org/jbpm/test/execution/ConcurrentEndTest.java (revision
5251)
+++ modules/test-db/src/test/java/org/jbpm/test/execution/ConcurrentEndTest.java (working
copy)
@@ -21,8 +21,12 @@
*/
package org.jbpm.test.execution;
+import java.util.Map;
+
import org.jbpm.api.Execution;
import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.activity.ActivityExecution;
+import org.jbpm.api.activity.ExternalActivityBehaviour;
import org.jbpm.test.JbpmTestCase;
@@ -68,4 +72,31 @@
ProcessInstance processInstance =
executionService.startProcessInstanceByKey("ConcurrentEnd");
assertEquals(Execution.STATE_ENDED, processInstance.getState());
}
+
+ public void testConcurrentEndScenario3() {
+ deployJpdlXmlString(
+ "<process name='ConcurrentEnd'>" +
+ " <start>" +
+ " <transition to='f' />" +
+ " </start>" +
+ " <fork name='f'>" +
+ " <transition to='a' />" +
+ " <transition to='b' />" +
+ " </fork>" +
+ " <custom name='a'
class='org.jbpm.test.activities.PassThroughActivity'>" +
+ " <transition to='join' />" +
+ " </custom>" +
+ " <custom name='b'
class='org.jbpm.test.activities.PassThroughActivity'>" +
+ " <transition to='join' />" +
+ " </custom>" +
+ " <join name='join'>" +
+ " <transition to='end' />" +
+ " </join>" +
+ " <end name='end' />" +
+ "</process>"
+ );
+
+ ProcessInstance processInstance =
executionService.startProcessInstanceByKey("ConcurrentEnd");
+ assertEquals(Execution.STATE_ENDED, processInstance.getState());
+ }
}
integrity constraint violation in process that runs end to end with
no wait
---------------------------------------------------------------------------
Key: JBPM-2387
URL:
https://jira.jboss.org/jira/browse/JBPM-2387
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.0.CR1
Reporter: Alfie Kirkpatrick
Assignee: Tom Baeyens
Attachments: end2end.jpdl.xml, jbpm-issue.zip
I am developing a process that, depending on various decisions, can potentially run from
start to finish without any wait. In this scenario I get the following exception:
org.hibernate.exception.ConstraintViolationException: could not delete:
[org.jbpm.jpdl.internal.model.JpdlExecution#1]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2569)
at
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2725)
at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)
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:172)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at
org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:54)
at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:106)
at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:65)
at
org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:61)
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.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:65)
at com.ioko.jbpm.JbpmTest.testEnd2End(JbpmTest.java:29)
Caused by: java.sql.SQLException: Integrity constraint violation FK_EXEC_PARENT table:
JBPM4_EXECUTION in statement [delete from JBPM4_EXECUTION where DBID_=? and DBVERSION_=?]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
at
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2551)
... 38 more
This is a serious problem for my process. Attached is a maven project that reproduces the
problem. You should just be able to run mvn test to see the error.
The problem seems to be with the fork/join. If I take that out it runs ok. I tried to
workaround this issue by introducing a state with short timeout towards the start of the
process but then I get a different error. I can reproduce this fairly easily if it would
be of help in diagnosis.
I make a lot of use of custom nodes. Could a workaround be to use state with handlers
instead of custom nodes?
ps. I tried to read the filing bug guidelines but the site is under maintenance. I feel
this is a fairly clear cut issue and have provided test case so hope I haven't broken
any rules!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira