Retry an incident by business key

Hi Camunda Team,

Is it possible to retry an incident by business key?

Context: I have api POST that receive some information, incluindg an id that I use as business key, in some step of my flow an incident can be created.

My question is: When someone make a POST again with the same Id that was used to start the process before, I want to verify if already exists a flow with this ID and if exists an incident linked to this id, if true, I want retry this incident again.

I would like to use the Java code if its possible :smiley:

Yes, it is possible. Just use the query API to find a failed job in the process with the known business key. If you find such job, you can retry it (increase the number of remaining retries). Otherwise you’d start a new process instance. You’ll have to put this logic into the REST access point.

Hello,

Do you know some link, documentation to do this?