AnsweredAssumed Answered

Cannot load Java Program specified in a Service Task

Question asked by ct1 on Sep 20, 2011
Latest reply on Jan 9, 2014 by frederikheremans1
I am unable to use a Java program to implement a service task in Explorer.

I defined the class below to be the service class of a service task on a process.  When I deployed and attempted to run the process in Explorer, I saw the exception shown below.  The exception shows that the class was found.  Eclipse confirms that the JavaDelegate that was implemented was the org.activiti.engine.delegate.JavaDelegate.

package com.argo.mobcont;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
import org.activiti.engine.impl.javax.el.Expression;

public class CreditChecker implements JavaDelegate
   private Expression requestedAmountE;
   private Expression incomeAmountE;
   private boolean creditHistoryGood = false;
   public void execute(DelegateExecution execution)
      System.out.println("execution id " + execution.getId());
      System.out.println("In CreditChecker.execute().");

The bpmn20 file contained:

  <process id="CreditCheckProcess" name="CreditCheckProcess">
    <documentation>Place documentation for the 'CreditCheckProcess' process here.</documentation>
    <startEvent id="startevent1" name="Start"></startEvent>
    <serviceTask id="checkCreditHistory" name="Check credit history" activiti:class="com.argo.mobcont.CreditChecker"></serviceTask>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="checkCreditHistory"></sequenceFlow>


Caused by: org.activiti.engine.ActivitiException: com.argo.mobcont.CreditChecker
doesn't implement org.activiti.engine.delegate.JavaDelegate nor org.activiti.en
at org.activiti.engine.impl.bpmn.helper.ClassDelegate.getActivityBehavio