[jBPM Users] - Unable to complete task
by TejJBPM
JBPM 4.2
I am unable to complete a task. It throws a hiberanate exception. Any pointers??
I found a JIRA with a similar issue but I am not giving Async as an attribute in the start node but still get the same error
https://jira.jboss.org/jira/browse/JBPM-2535?page=com.atlassian.jira.plug...
JPDL
<?xml version="1.0" encoding="UTF-8"?>
|
| <process key="moves" name="moves" xmlns="http://jbpm.org/4/jpdl">
| <start g="372,12,49,73" name="start1">
| <transition to="Request_New_Move"/>
| </start>
| <task form="request_move.xsl" g="312,72,169,52" name="Request_New_Move">
| <transition g="-43,-5" name="submit" to="Line_Manager_review"/>
| </task>
| <task assignee="${reqLoginName}" form="linemanagerreview" g="312,288,169,52" name="Line_Manager_review">
| <notification>
| <to users="${task.assignee}"/>
| <cc addresses="${lmEmail}"/>
| <subject>${task.name}</subject>
| <text>
| <![CDATA[Hi ${task.assignee},
| Task "${task.name}" has been assigned to you.
| ${task.description}
| Sent by JBoss jBPM
| ]]>
| </text>
| </notification>
| <transition g="-57,-4" name="approve" to="Send_approval_email"/>
| <transition g="18,-5" name="reject" to="Send_rejection_email"/>
| </task>
| <end g="384,480,48,48" name="end1"/>
| <mail g="240,408,133,40" name="Send_approval_email">
| <to addresses="somebody(a)office.com"/>
| <subject>Your move request is approved!</subject>
| <text>Employee name ${employeeName} and request details ${requestDetails}</text>
| <transition to="end1"/>
| </mail>
| <mail g="432,408,133,37" name="Send_rejection_email">
| <to addresses="somebody(a)office.com"/>
| <subject>Your move request is rejected!</subject>
| <text>Employee name ${employeeName} and request details ${requestDetails}</text>
| <transition to="end1"/>
| </mail>
| </process>
Error
org.hibernate.NonUniqueResultException: query did not return a unique result: 2
| at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:844)
| at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:835)
| at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findTaskByExecution(DbSessionImpl.java:386)
| at org.jbpm.jpdl.internal.activity.MailListener.notify(MailListener.java:50)
| at org.jbpm.pvm.internal.model.op.ExecuteEventListener.perform(ExecuteEventListener.java:81)
| at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:655)
| at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:615)
| at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:416)
| at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:402)
| 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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
| at org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_5.signal(ExecutionImpl_$$_javassist_5.java)
| at org.jbpm.pvm.internal.task.TaskImpl.complete(TaskImpl.java:194)
| at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:60)
| at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:32)
| at org.jbpm.pvm.internal.cmd.CompositeCmd.execute(CompositeCmd.java:43)
| at org.jbpm.pvm.internal.cmd.CompositeCmd.execute(CompositeCmd.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.TaskServiceImpl.completeTask(TaskServiceImpl.java:105)
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267694#4267694
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267694
15 years