0 Replies Latest reply on Jan 18, 2016 11:18 AM by Nabila Belhaj

    Service Task invoking java class method jbpm6 eclipse: work item handler created but could not found !!

    Nabila Belhaj Newbie

      Hi, I am really exhausted, can somebody help me out please?

       

      I am struggling with my project for 2 weeks now! I am trying to create a single service task in BPMN2 modeler in eclipse kepler. I import a java class and its method into the process. the method creates a file.txt and takes as parameter the file name. I need to create a process that invokes a java method and gets as variable the file name. (I don't want to create a custom task) I looked everywhere in the forum but I did not find something similar, all I get is how to create a custom task.

      1. I created the process
      2. created the WorkItemHandler
      3. mapped the parameter with the variable (= the file name)

       

      When I run my code I get : Could not find work item handler for Service Task. Here is the error stack:

       

      Exception in thread "main" org.jbpm.workflow.instance.WorkflowRuntimeException: [ServiceTestProcess:2 441 - FileCreation:1] -- Could not find work item handler for Service Task

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

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:354)

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

        at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:66)

        at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:43)

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

        at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)

        at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:226)

        at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:363)

        at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:187)

        at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:169)

        at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:161)

        at org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:1850)

        at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:121)

        at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:40)

        at org.drools.core.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)

        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)

        at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:509)

        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)

        at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:73)

        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)

        at org.drools.persistence.jta.TransactionLockInterceptor.execute(TransactionLockInterceptor.java:60)

        at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:353)

        at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:230)

        at com.sample.ServiceTest.main(ServiceTest.java:42)

      Caused by: org.drools.core.WorkItemHandlerNotFoundException: Could not find work item handler for Service Task

        at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.throwWorkItemNotFoundException(JPAWorkItemManager.java:61)

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

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

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

        ... 24 more