We have a service task which is set with async before and a retry option. The delegate code (Java) for the service calls an external API and if a 4xx status code is returned, we would like to stop it from keep retrying (set the counter to zero?), end the entire flow and immediately create an incident.
Is there a way to do that?
Ah, now I remember. There is a process engine setting that does this (what to do in the case of an uncaught BpmnError). You should NOT have the boundary event, then an incident will be created.