13 Replies Latest reply on Sep 30, 2011 9:03 AM by bob flip

    Is there any standard implementation for a local-JVM Task Service

    Sam D. Newbie

      I tried to adapt the the WSHumanTaskHandler to a LocalHumanTaskHandler. But when executing taskSession.taskOperation(Operation.Complete, task.getId(), "krisv", null, null, null), it throws following exception:

       

      java.lang.NullPointerException

          at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:43)

          at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)

          at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:61)

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)

          at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:47)

          at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:162)

          at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:143)

          at org.jbpm.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:239)

          at org.jbpm.workflow.instance.node.HumanTaskNodeInstance.triggerCompleted(HumanTaskNodeInstance.java:90)

          at org.jbpm.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:301)

          at org.jbpm.workflow.instance.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:277)

          at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:333)

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

          at org.jbpm.examples.evaluation.LocalHumanTaskHandler$TaskEventHandler.taskCompleted(LocalHumanTaskHandler.java:330)

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

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

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

          at org.jbpm.examples.evaluation.PersistentProcessExample.main(PersistentProcessExample.java:97)

       

      Attached you can find my LocalHumanTaskHandler.java and PersistentProcessExample.java (main).

      FYI, when I use instead of a JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env ) a kbase.newStatefulKnowledgeSession() (non-JPA), it works fine.