[jBPM Users] - Violation of unique constraint with two splits (JBPM-2553)
by Alkero
Tow split steps with two identical transition names cause a violation of unique constraint in JBPM4_EXECUTION table.
Process Definition:
<?xml version="1.0" encoding="UTF-8"?>
| <process key="test" name="test" xmlns="http://jbpm.org/4.0/jpdl">
| <start g="82,38,41,27" name="start1">
| <transition g="-43,-18" name="to fork1" to="fork1"/>
| </start>
| <fork g="79,112,25,20" name="fork1">
| <transition name="to task1" to="task1" g="-44,-18"/>
| <transition name="to task2" to="task2" g="-44,-18"/>
| </fork>
| <fork g="88,263,65,27" name="fork2">
| <transition name="to task1" to="task4" g="-44,-18"/>
| <transition name="to task3" to="task3" g="-44,-18"/>
| </fork>
| <task assignee="test" name="task1" g="75,189,60,42">
| <transition name="to fork2" to="fork2" g="-43,-18"/>
| </task>
| <task name="task2" g="163,117,61,31"/>
| <task name="task3" g="189,268,59,37"/>
| <task name="task4" g="93,340,52,40"/>
| </process>
|
Test code:
| ProcessEngine processEngine = Configuration.getProcessEngine();
| RepositoryService repositoryService = (RepositoryService) processEngine.get(RepositoryService.class);
| String deploymentId = repositoryService
| .createDeployment()
| .addResourceFromClasspath("test.jpdl.xml")
| .deploy();
| Execution execution = processEngine.getExecutionService().startProcessInstanceByKey("test");
| Task task = (Task)processEngine.getTaskService().findPersonalTasks("test").get(0);
| processEngine.getTaskService().completeTask(task.getId(),"to fork2");
|
Exception:
| Caused by: java.sql.SQLException: Violation of unique constraint $$: duplicate value(s) for column(s) $$: SYS_CT_970 in statement [update JBPM4_EXECUTION set DBVERSION_=?, ACTIVITYNAME_=?, PROCDEFID_=?, HASVARS_=?, NAME_=?, KEY_=?, ID_=?, STATE_=?, SUSPHISTSTATE_=?, PRIORITY_=?, HISACTINST_=?, PARENT_=?, INSTANCE_=?, SUPEREXEC_=?, SUBPROCINST_=? 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.update(AbstractEntityPersister.java:2435)
| ... 39 more
|
The related jira issue was closed by Ronald but I don't understand why the process definition is indicated as invalid...?
http://jira.jboss.org/jira/browse/JBPM-2553
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257282#4257282
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257282
14 years, 9 months
[jBPM Users] - Re: Implementing Escalation in jBPM 4.1
by sebastian.s
Full Stacktrace ..
| ### EXCEPTION ###########################################
| 11:00:39,186 INF | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.CompleteTaskCmd@1c01ba9
| org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.jbpm.pvm.internal.model.ExecutionImpl#2]
| at org.hibernate.impl.SessionFactoryImpl$2.handleEntityNotFound(SessionFactoryImpl.java:409)
| at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:108)
| at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:97)
| at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:140)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
| at org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_4.getHistoryActivityInstanceDbid(ExecutionImpl_$$_javassist_4.java)
| at org.jbpm.pvm.internal.history.events.TaskComplete.process(TaskComplete.java:49)
| at org.jbpm.pvm.internal.history.HistorySessionImpl.process(HistorySessionImpl.java:31)
| at org.jbpm.pvm.internal.history.HistoryEvent.fire(HistoryEvent.java:61)
| at org.jbpm.pvm.internal.task.TaskImpl.historyTaskComplete(TaskImpl.java:305)
| at org.jbpm.pvm.internal.task.TaskImpl.complete(TaskImpl.java:190)
| at org.jbpm.pvm.internal.task.TaskImpl.complete(TaskImpl.java:186)
| at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:58)
| at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:32)
| 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:46)
| at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
| at org.jbpm.pvm.internal.svc.TaskServiceImpl.completeTask(TaskServiceImpl.java:88)
| at org.jbpm.examples.userescalation.EscalationTest.testTaskEscalaton(EscalationTest.java:70)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at junit.framework.TestCase.runTest(TestCase.java:164)
| at org.jbpm.test.BaseJbpmTestCase.runTest(BaseJbpmTestCase.java:80)
| 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:120)
| at junit.framework.TestSuite.runTest(TestSuite.java:230)
| at junit.framework.TestSuite.run(TestSuite.java:225)
| 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:467)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
| ### EXCEPTION ###########################################
| 11:00:39,186 SEV | [BaseJbpmTestCase]
| ### EXCEPTION ###########################################
| 11:00:39,186 SEV | [BaseJbpmTestCase] TEST THROWS EXCEPTION: No row with the given identifier exists: [org.jbpm.pvm.internal.model.ExecutionImpl#2]
| org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.jbpm.pvm.internal.model.ExecutionImpl#2]
| at org.hibernate.impl.SessionFactoryImpl$2.handleEntityNotFound(SessionFactoryImpl.java:409)
| at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:108)
| at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:97)
| at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:140)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
| at org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_4.getHistoryActivityInstanceDbid(ExecutionImpl_$$_javassist_4.java)
| at org.jbpm.pvm.internal.history.events.TaskComplete.process(TaskComplete.java:49)
| at org.jbpm.pvm.internal.history.HistorySessionImpl.process(HistorySessionImpl.java:31)
| at org.jbpm.pvm.internal.history.HistoryEvent.fire(HistoryEvent.java:61)
| at org.jbpm.pvm.internal.task.TaskImpl.historyTaskComplete(TaskImpl.java:305)
| at org.jbpm.pvm.internal.task.TaskImpl.complete(TaskImpl.java:190)
| at org.jbpm.pvm.internal.task.TaskImpl.complete(TaskImpl.java:186)
| at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:58)
| at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:32)
| 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:46)
| at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
| at org.jbpm.pvm.internal.svc.TaskServiceImpl.completeTask(TaskServiceImpl.java:88)
| at org.jbpm.examples.userescalation.EscalationTest.testTaskEscalaton(EscalationTest.java:70)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at junit.framework.TestCase.runTest(TestCase.java:164)
| at org.jbpm.test.BaseJbpmTestCase.runTest(BaseJbpmTestCase.java:80)
| 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:120)
| at junit.framework.TestSuite.runTest(TestSuite.java:230)
| at junit.framework.TestSuite.run(TestSuite.java:225)
| 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:467)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
| ### EXCEPTION ###########################################
| 11:00:39,186 SEV | [BaseJbpmTestCase]
| 11:00:39,217 FIN | [DbSessionImpl] deleting history process instance escalation.1
| 11:00:39,248 FIN | [DbSessionImpl] deleting process instance escalation.1
| 11:00:39,264 FIN | [DeleteDeploymentCmd] deleting deployment 1
| 11:00:39,311 FIN | [BaseJbpmTestCase] === ending testTaskEscalaton =============================
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257272#4257272
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257272
14 years, 9 months
[jBPM Users] - Re: NullPointerException using identityService
by Krohm
"cjmanju123" wrote : Sorry here it is again, I had removed the following entry from the jbpm.cfg.xml.
|
| <import resource="jbpm.identity.cfg.xml" />
I have the same error when trying to create Users / Groups through the IdentityService in JBPM 4.1 :
java.lang.NullPointerException
| at org.jbpm.pvm.internal.identity.cmd.CreateGroupCmd.execute(CreateGroupCmd.java:48)
| at org.jbpm.pvm.internal.identity.cmd.CreateGroupCmd.execute(CreateGroupCmd.java:32)
| 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:46)
| at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
| at org.jbpm.pvm.internal.svc.IdentityServiceImpl.createGroup(IdentityServiceImpl.java:70)
I have investigated it a bit, and it seems some classes are somehow "Missing" in the JBPM4.1 I am working with.
These classes are (from what I have tried from now) :
org.jbpm.pvm.internal.identity.cmd.CreateGroupCmd
org.jbpm.pvm.internal.identity.cmd.CreateUserCmd
I was expecting it to be with the other classes of the same package and downloadable with the following maven dependency :
<dependency>
| <groupId>org.jbpm.jbpm4</groupId>
| <artifactId>jbpm-pvm</artifactId>
| <version>4.0</version>
| </dependency>
Do I have missed something ?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257258#4257258
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257258
14 years, 9 months
[jBPM Users] - Issues About JobExecutor in Jbpm 3.3.0GA
by draculawong
Hi,
I had a few questions about job executor and jbpmcontext,
1.Do we need to close jbpmContext every time after we used it?Like:
public myMethod(){
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| .....
| jbpmContext.close();
| }
2.In jbpm.cfg.xml,if I set jobExecutor singleton="false" ,what will happen?
<bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor" singleton="true">
3.In the jbpm source code ,there is a class DbMessageService.java,below is source code of this class,Could any one tell me why use "synchronized" here?
public void close() {
| if ( (hasProducedJobs)
| && (jobExecutor!=null)
| ) {
| log.debug("messages were produced, job executor will be signalled");
| synchronized(jobExecutor) {
| jobExecutor.notify();
| }
| }
| }
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257257#4257257
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257257
14 years, 9 months