Trigger only if a process is complete

Hi, Suppose i have a BPMN model with A,B,C steps. I want to trigger some code just after the process is completed. (i.e. after C is completed. ) . ( i know i can put a script just before the end-task, but is there a better way)

Hi

It’s confusing when you say CMMN and process completed (implies BPMN) - can you share a diagram of your model?

Cheers
Paul.

Oops sorry about that. I corrected it. I dont have diagram, just thinkof it as a linear BPMN model with 3 user task in between.

You can have an execution listener on the end event, if you want to always do it at the end of the process (or that specific end if there’s multiple end events). Or if it’s actually something you want to execute at the end of step C, you could have a task listener triggered when it completes.

The listener can trigger Java or an expression.

Cheers
Paul.