Deletion of Process Instance in WebUI or Resolving of Incident via API deletes all currently available Incidents

Hello Camunda Community,

I’m currently struggling with the following behavior:
In our production system in case we have collected some Incidents, let’s say overall 10 Incidents and now one of our admins resolves one of these by deleting the related process instance or deleting that single Incident via the REST API this will result in all currently available Incidents being deleted. This of course makes it very hard to work on the remaining Incidents as they are not visible anymore.

We currently run version 7.14 in production therefore I also tried it out with the newest docker image of version 7.15 and reproduced it with the following small bpmn. IncidentTest.bpmn (3.1 KB)

Here is also a GIF to illustrate the problem in a more visual way: camunda_process_instance_deletion_deletes_all_incidents

I hope anybody can explain me if this is either a bug or the expected behavior - in that case I’m open to any suggestion to handle such situations properly.

Thanks,
Patrik

Hi Patrik,

The default incident handler removes all incidents with the same configuration (which in the case of an actually failed job is the job’s id): https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/incident/DefaultIncidentHandler.java#L79-L94. Since your incidents all share the same value and you re-use the Failed Job incident type, this is what happens. I suggest you use a custom incident type and implement a custom incident handler instead.

Cheers,
Thorben

Thanks Thorben! We will look into that.