# How to get Callback/EventListener when process definition is getting deleted (and when getting suspended/re-activated)

**URL:** <https://forum.camunda.io/t/how-to-get-callback-eventlistener-when-process-definition-is-getting-deleted-and-when-getting-suspended-re-activated/54273>\
**Category:** Discussion & Questions\
**Created:** [August 16, 2024, 9:14am UTC](https://forum.camunda.io/t/how-to-get-callback-eventlistener-when-process-definition-is-getting-deleted-and-when-getting-suspended-re-activated/54273 "2024-08-16T09:14:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerler](https://forum.camunda.io/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@kerler](https://forum.camunda.io/u/kerler)\
**Post date:** [August 16, 2024, 9:14am UTC](https://forum.camunda.io/t/how-to-get-callback-eventlistener-when-process-definition-is-getting-deleted-and-when-getting-suspended-re-activated/54273/1 "2024-08-16T09:14:15Z")

</div>

Dear Sir,

For Camunda 7, when deleting a process definition, I want to have a call back and the call back can have parsing capability similar to BpmnParseListener. How shall I achieve this use case?

Similar, when a process definition is suspended (and when activated again), I want a call back.

---

<div class="post-metadata">

**Author:** ![Alex\_Voloshyn](https://forum.camunda.io/user_avatar/forum.camunda.io/alex_voloshyn/32/14765_2.png) [@Alex\_Voloshyn](https://forum.camunda.io/u/Alex_Voloshyn)\
**Post date:** [August 16, 2024, 4:12pm UTC](https://forum.camunda.io/t/how-to-get-callback-eventlistener-when-process-definition-is-getting-deleted-and-when-getting-suspended-re-activated/54273/2 "2024-08-16T16:12:44Z")

</div>

Hi @kerler  
What if you create a custom command interceptor that listens for the [DeleteProcessDefinitionsByIdsCmd](https://docs.camunda.org/javadoc/camunda-bpm-platform/7.21/org/camunda/bpm/engine/impl/cmd/DeleteProcessDefinitionsByIdsCmd.html) or [DeleteProcessDefinitionsByKeyCmd](https://docs.camunda.org/javadoc/camunda-bpm-platform/7.21/org/camunda/bpm/engine/impl/cmd/DeleteProcessDefinitionsByKeyCmd.html)? Just thinking out loud.

Regards,  
Alex
