Hi there,
The BPMN process supports start and end event type for execution listener of process now in Camunda.
https://docs.camunda.org/manual/7.8/reference/bpmn20/custom-extensions/extension-elements/#executionlistener
Why doesn’t it support suspend and activate event type?
Is there an easy way to add a suspend listener? then when we suspend/activate a process instance in cockpit, something could be invoked in an execution listener.
thank you so much
samuelwang
1 Like
Hi @samuelwang,
currently, there is no way to get notified when an instance is suspended. Can you please describe your use case?
Best regards,
Philipp
Hi @Philipp_Ossler
We use Camunda in applications for insurances, a claim case is a process instance, the claim cases can be suspended when a fraud is detected temporarily, it means the process instances are suspended. when the process instance is suspended, we hope a suspend/activate listener which can send message to other process instance or other business system is invoked.
Now we can’t configure suspend/activate listener in BPMN file.
Best regards,
Samuel
Hi Samuel,
Could you model ‘suspend’ at the process model level rather than the runtime level? What I mean is consider use of an interrupting (or non-interrupting) event sub-process. Hence if fraud is detected, generate a fraud event which will trigger the sub-process…
regards
Rob
Hi @Webcyberrob
The semantics is different between suspend/activate and event subprocess, the former means we can’t move to another node in the process instance, the latter means we go to a special node in the process instance.
In my case, I hope a listener is injected into a process instance, so when I invoke REST API - “/process-instance/{id}/suspended” or when I click suspend button in cockpit, the listener can be invoked by the engine.
Best Regards
Samuel
Hi Samuel,
WHat you say is true, however I tend to model business constructs in BPMN and I consider suspend/activate to be technical, operational concepts. Thus, I would treat fraudulent activity as a business construct. Hence I would probably use an interrupting event sub-process rather than suspend.
Of course this is just the way I would tend to model it, the choice is ultimately yours…
regards
Rob
1 Like
Hi @Webcyberrob,
Thank you for your exlaination. I will try to model bussiness as your idea later.
However, I still hope execution listener for suspend and activiate event is supported by the engine one day, just as the listener for start and end event of a process instance.
Best Regards
Samuel