Is there any listener for element delete?

i want to have a listener for my task element, when a task deleted trigger some functions.
is there any listener in eventBus for that or any other option?( i want task id for my functions)
like this:

    eventBus.on("element.delete", function (event) {
       console.log( , "element id")
       alert("element deleted");
       // do some function( 

this method works fine for me

var eventBus = modeler.get('eventBus');
eventBus.on("shape.remove", function (event) {
    if ("Task") >= 0) {
        console.log(event.element, "event")

You have ‘shape.delete’ and ‘elements.delete’

1 Like