I'm new to activiti. I have a created a stand-alone java application with simple process like[ Start->ServiceTask->End ]. Below are the files are using in sample application, Main.java, MyJavaDelegate.java & bpmn files. When running this application i'm getting below exception:
Exception: [Validation set: 'activiti-executable-process' | Problem: 'activiti-servicetask-missing-implementation'] : One of the attributes 'class', 'delegateExpression', 'type', 'operation', or 'expression' is mandatory on serviceTask. - [Extra info : processDefinitionId = helloWorld | id = myServiceTask | ] ( line: 10, column: 92) ————-
I thought, i should register JavaDelegate class instance with ActivitiRuntimeEngine. Please suggest?
Below are the files: ——————————————————————————– Main.java ——————————————————————————– public class Main { public static void main(String[] args) throws ClassNotFoundException { try { // Create the Activiti engine in-memory on H2 database ProcessEngineConfiguration engineConfig = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration(); ProcessEngine processEngine = engineConfig.buildProcessEngine();
——————————————————————————– MyJavaDelegate.java . This files was placed in 'org.sample.delegates' package. ——————————————————————————– public class MyJavaDelegate implements JavaDelegate { @Override public void execute(DelegateExecution execution) throws Exception { System.out.println("Service task called…"); } }
Hi, You can start investigating it with a breakpoint in : ServiceTaskValidator.java on the method: <code> protected void verifyImplementation(Process process, ServiceTask serviceTask, List<ValidationError> errors) </code>