Hi @filiphr ,
Thanks for your response.
Yes, I’m able to get the process details with the code that you have shared but I don’t get the information from process that I was looking for.
I will try to briefly explain my use case.
User wants to be notified if a process is canceled and he wants a screen where he can configure related fields as well. Something like this
There is an option to use the
Event Listeners field in the stencil with id
BPMNDiagram. But for now, I am using
end event since the user also wants a configurable screen like above.
So, when a user tries to cancel the process, I get the execution listener details from the
Process, trigger cancel notification and set an empty arraylist in its
executionListeners field. Also, I set an empty ArrayList to
executionListeners field of
Process when a process is completed, so that cancel notification is not sent when a process is completed. I do this when
PROCESS_COMPLETED is dispatched.
The logic that you have shared fetches me the details if the process instance is not completed. But for a completed process instance, I get an empty list there.
I’m assuming the reason is that I cleared
executionListeners field in
To meet this, as of now I’m extracting execution listeners from
Is there a better way to do this?