Hello,
we are trying to get the global event listener running.
We tried to use this tutorial: Process Application Event Listeners | docs.camunda.org
The problem is that the method “getTaskListener” and “getExecutionListener” is never called.
But the Class is loaded because of the logging in the constructor.
As an example event, we start a new Process with
POST http://localhost:8080/engine-rest/process-definition/key/myOwnProvess/start.
For deployment create a new .war from the Code and copy it to server\apache-tomcat-9.0.43\webapps\
Does anybody know what we are doing wrong?
We use:
- Camunda Open Source Edition: 7.15.0
- Tomcat 9.0.43
Here is the Code:
package de.iisys.sysint.hicumes.camunda.extension;
import org.camunda.bpm.application.ProcessApplication;
import org.camunda.bpm.application.impl.ServletProcessApplication;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.DelegateTask;
import org.camunda.bpm.engine.delegate.ExecutionListener;
import org.camunda.bpm.engine.delegate.TaskListener;
@ProcessApplication("CamundaCommunicationApplication")
public class CamundaCommunicationApplication extends ServletProcessApplication {
public CamundaCommunicationApplication() {
System.out.println("starting CamundaCommunicationApplication");
}
public TaskListener getTaskListener() {
System.out.println("getTaskListener");
return new TaskListener() {
@Override
public void notify(DelegateTask delegateTask) {
System.out.println("TaskListener Event");
}
};
}
public ExecutionListener getExecutionListener() {
System.out.println("getExecutionListener");
return new ExecutionListener() {
@Override
public void notify(DelegateExecution execution) throws Exception {
System.out.println("ExecutionListener Event");
}
};
}
}
Thank you for your help.