I am having problems using the Global Execution Listener.
We are using Spring boot and have a Spring managed ProcessApplication (annotated with @Component) that extends from SpringBootProcessApplication
.
The afterPropertiesSet()
method is called correctly, but the getExecutionListener()
is never called.
I tracked it down till the point that in the class ProcessApplicationEventListenerDelegate
it is unable to find the Target Process Application, it’s because ProcessApplicationManager.registrationsByDeploymentId
is empty.
How should the ProcessApplication be registered? (doesn’t that occur automatically in the above Spring config?)
I registered the ProcessApplication in our ProcessApplication.afterPropertiesSet() like this:
processEngine.getManagementService().registerProcessApplication("1", getReference());
In the above call I hardcoded the deploymentId (1), as I noticed it was used to find the the Target Process Application that comes from the DeploymentId.
In this way, the global Execution Listener is fired, but I am confused what the correct way is to use it? And how to correctly register the Process Application such that the listener is used?
Where can I find some example of using it?