Can I add an execution listener for 'cancel process' button?

Hi I’m modeling a simple flow in Flowable:

What I want to do is, when a user clicks ‘cancel process’ button from Flowable UI, I want to notify some external service that this process is canceled. So is there a way I can add an execution listener to this ‘cancel’ behavior?

I’m thinking about adding one execution listener to the normal ‘end event’ in the flow picture above, but still, I need to depend on some variable /signal to know the end event is triggered because of ‘canceled’, how can I get this variable/signal?

Also looked at ‘Boundary cancel event’, seems to be a good approach, but I don’t know how to use it in my case.

please suggest, thanks a lot!

Hi,
Cancel process is an external event. So it is not covered by process model. What you can do is to attach a listener to https://flowable.org/docs/userguide/index.html#eventDispatcherEventTypes PROCESS_CANCELLED event.

Regards
Martin

Thank you @martin.grofcik that will work!

Best,
Candice