0 Replies Latest reply on Sep 21, 2011 9:28 AM by sandeep kumar

    Problem with Human Task Completion

    sandeep kumar Newbie

      Hi All,

      I am facing one problem when completing a Human task. The problem arises when I use Spring drools integration. I am getting the ksession from spring bean. using that I am starting the process Instance. The process contains one human task. I am using SyncWSHumanTaskHandler and LocalTaskService. On call of task completion it throws exception as below

       

      java.lang.IllegalStateException: EntityManager is closed

          at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:66)

          at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:182)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

          at java.lang.reflect.Method.invoke(Unknown Source)

          at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)

          at $Proxy30.find(Unknown Source)

          at org.drools.persistence.jpa.JpaPersistenceContext.findWorkItemInfo(JpaPersistenceContext.java:41)

          at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:108)

          at org.jbpm.process.workitem.wsht.SyncWSHumanTaskHandler$TaskCompletedHandler.execute(SyncWSHumanTaskHandler.java:278)

          at org.jbpm.task.service.local.LocalTaskService$SimpleEventTransport.trigger(LocalTaskService.java:242)

          at org.jbpm.task.event.MessagingTaskEventListener.taskCompleted(MessagingTaskEventListener.java:73)

          at org.jbpm.task.event.TaskEventSupport.fireTaskCompleted(TaskEventSupport.java:47)

          at org.jbpm.task.service.TaskServiceSession.taskCompleteOperation(TaskServiceSession.java:420)

          at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:368)

          at org.jbpm.task.service.local.LocalTaskService.complete(LocalTaskService.java:73)