Global event listner not running

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.

Are you using pre-packaged Camunda Platform distributions?

To use the global process application Event Listeners, you need to activate the corresponding Process Engine Plugin:

<process-engine name="default">
  ...
  <plugins>
    <plugin>
      <class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
    </plugin>
  </plugins>
</process-engine>

Note that this plugin is activated by default in the pre-packaged Camunda Platform distributions.

Thank you for your response.
We used the download from here: Camunda herunterladen - Camunda (Tomcat Zip). Additionally, we checked that the plugin is activated.

We tested some different ways of deploying the bpmn file.
During the test, the recognized the following:

  1. If the .bpmn is inside the .war with the
@ProcessApplication("CamundaCommunicationApplication")
public class CamundaCommunicationApplication extends ServletProcessApplication {

class, we get the events.
2) If the .bpmn file is in an additonally war, it is deployed, but we do not get events.
3) If we upload the .bpmn file over the rest API, we do not get events.

We think we have a configuration problem within the camunda engine.

Does anybody have a hint, what we have to change to get it running?