Incident Handler Customization with Async Task Execution

Hi,
I have a requirement, where we are calling external web service. If we have any failure response from web service we want to retry for 3 times. After all retries done we want to create a Task in external system and keep the process waiting. Once external task completes we want to continue with the process execution.

Now, sine OOB Camunda creates incident after configured retries. We customize the incident handler and instead of creating the incident, we trigger the “Signal” event which is cought by the process and throws the exception.

But, since we are in same transaction the process failes with error.

Please help me with better process design to handle the requirement.

Thanks in advance for help.
RiteshCRUAccessoryAutomation.bpmn (19.9 KB)

Hi Ritesh,

instead of an incident handler, you could also handle the failing request in the service task itself. If it fails more than 3 times then you can throw a BpmnError which can be caught by the process.
Alternatively, you can use the external task pattern if you don’t want to block the execution / job executor.

Best regards,
Philipp