flowable/flowable-engine · error · FlowableException

Cannot fail external jobs. There is no BPMN or CMMN engine…

Error message

Cannot fail external jobs. There is no BPMN or CMMN engine available

What it means

FlowableException thrown by createExternalWorkerJobFailureBuilder when both the BPMN managementService and CMMN cmmnManagementService are null while a worker tries to report a job failure. Failing an external job requires an engine to route the failure to. Symmetric to the acquire-side check but on the failure path.

Solutions

  1. Ensure a BPMN or CMMN engine is configured so its ManagementService is injected into the resource.
  2. Verify engine auto-configuration is enabled and the datasource is valid.
  3. Inspect startup logs to confirm the engine (and its services) initialized successfully.

Example fix

// before: no engine config in application.yml
// after
flowable:
  process:
    enabled: true
  cmmn:
    enabled: true
Defensive patterns

Strategy: fallback

Validate before calling

if (processEngine == null && cmmnEngine == null) { throw new IllegalStateException("Cannot report failures: no engine configured"); }

Try / catch

try { failureBuilder(jobId, workerId).failure(message); } catch (FlowableException e) { if (e.getMessage().contains("Cannot fail external jobs")) { alertOps("Engine misconfiguration"); } }

Prevention

When it happens

Trigger: POST to the external worker job failure endpoint (failureBuilder path) on a deployment where neither engine's ManagementService is wired into ExternalWorkerAcquireJobResource.

Common situations: REST module deployed standalone without engine beans; misconfigured Spring context excluding ProcessEngine/CmmnEngine services; engine startup failure.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/dc637ebcfded7fd4. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-external-job-rest/src/main/java/org/flowable/external/job/rest/service/api/acquire/ExternalWorkerAcquireJobResource.java:306

    }

    protected ExternalWorkerJobAcquireBuilder createExternalWorkerAcquireBuilder() {
        if (managementService != null) {
            return managementService.createExternalWorkerJobAcquireBuilder();
        } else if (cmmnManagementService != null) {
            return cmmnManagementService.createExternalWorkerJobAcquireBuilder();
        } else {
            throw new FlowableException("Cannot acquire external jobs. There is no BPMN or CMMN engine available");
        }
    }

    protected ExternalWorkerJobFailureBuilder createExternalWorkerJobFailureBuilder(String jobId, String workerId) {
        if (managementService != null) {
            return managementService.createExternalWorkerJobFailureBuilder(jobId, workerId);
        } else if (cmmnManagementService != null) {
            return cmmnManagementService.createExternalWorkerJobFailureBuilder(jobId, workerId);
        } else {
            throw new FlowableException("Cannot fail external jobs. There is no BPMN or CMMN engine available");
        }
    }
}

View on GitHub (pinned to d6d39ce1c6)