I want to attach com.services.AutherticateUser_WS class with my service Task.
<serviceTask id="sid-6A5A3583-D7C9-4188-81BC-58C6C16F681C" name="myService" activiti:class="com.services.AutherticateUser_WS"></serviceTask>
But I am getting the following error
Caused by: org.activiti.engine.ActivitiIllegalArgumentException: com.services.AutherticateUser_WS doesn't implement org.activiti.engine.delegate.JavaDelegate nor org.activiti.engine.impl.pvm.delegate.ActivityBehavior
Infact, my class implements this. Below is the code of my class.
package com.services;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
import org.activiti.engine.impl.pvm.delegate.ActivityBehavior;
import org.activiti.engine.impl.pvm.delegate.ActivityExecution;
public class AutherticateUser_WS implements JavaDelegate, ActivityBehavior {
@Override
public void execute(DelegateExecution execution) throws Exception {
// TODO Auto-generated method stub
System.out.println( " some thing is running ");
RuntimeService runtimeService = execution.getEngineServices().getRuntimeService();
runtimeService.startProcessInstanceByKey("process123");
String group = (String) execution.getVariable("group");
System.out.println(group);
}
@Override
public void execute(ActivityExecution execution) throws Exception {
// TODO Auto-generated method stub
System.out.println( "some thing is running ");
RuntimeService runtimeService = execution.getEngineServices().getRuntimeService();
runtimeService.startProcessInstanceByKey("process123");
}
}
Any idea to fix this error