Posts

Showing posts with the label Camunda external task handleFailure

Camunda 7 External Task Retry Not Working – Fix

Camunda 7 External Task Retry Not Working – Root Cause & Fix (Production Guide) External Tasks are widely used in Camunda 7 to decouple business logic from the process engine. However, a very common production issue teams face is: ❌ External Task retries are not working as expected. In this blog, we’ll cover why retries fail , real root causes , and how to fix them safely in production . 1️⃣ How External Task Retry Works in Camunda 7 In Camunda 7, retries are controlled by: retries count lockDuration lockExpirationTime Failure handling logic in the worker A retry happens only when the worker explicitly reports failure . 2️⃣ Most Common Reasons Retries Don’t Work ❌ 1. handleFailure() Not Called Correctly Wrong implementation (very common): try { // business logic } catch (Exception e) { throw e; // ❌ This does NOT trigger retry } Correct implementation: externalTaskService.handleFailure( externalTask, "Processing failed...