flowable/flowable-engine · error · FlowableException

Cannot unacquire BPMN job. There is no BPMN engine available

Error message

Cannot unacquire BPMN job. There is no BPMN engine available

What it means

FlowableException thrown by unaquireJob when the job belongs to the BPMN scope but the BPMN engine's managementService is null. The job was found (likely via CMMN query or the job exists), but the engine service needed to actually release the lock is not available. Indicates a partial/miswired engine configuration.

Solutions

  1. Enable/configure the BPMN engine so managementService is available.
  2. If intentionally BPMN-less, clean up stale BPMN external worker jobs from the database.
  3. Verify the correct REST module wiring includes the ProcessEngine services.

Example fix

// before
flowable:
  process:
    enabled: false
// after
flowable:
  process:
    enabled: true
Defensive patterns

Strategy: fallback

Validate before calling

boolean canUnacquireBpmn = processEngine != null; // verify before exposing the endpoint to BPMN jobs

Try / catch

try { unaquireJob(jobId, request); } catch (FlowableException e) { if (e.getMessage().contains("no BPMN engine")) { alertOps("BPMN engine not configured"); } else { throw e; } }

Prevention

When it happens

Trigger: POST /external-worker-job/unacquire/jobs/{jobId} for a job with scopeType BPMN on a deployment where ProcessEngine managementService is not injected into ExternalWorkerUnacquireJobResource.

Common situations: CMMN-only deployment encountering a leftover BPMN job; Spring config disabling the process engine while old BPMN jobs remain in the shared database.

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/53bdcdb3891f1737. Report an issue: GitHub.

Appendix: source

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

            throw new FlowableIllegalArgumentException("worker id is required");
        }

        ExternalWorkerJob job = getExternalWorkerJobById(jobId);

        if (!workerId.equals(job.getLockOwner())) {
            throw new FlowableForbiddenException(workerId + " does not hold a lock on the requested job");
        }

        if (job.getProcessInstanceId() != null) {
            if (managementService != null) {
                if (restApiInterceptor != null) {
                    restApiInterceptor.unacquireExternalWorkerJob(job, request);
                }

                managementService.unacquireExternalWorkerJob(jobId, workerId);
                
            } else {
                throw new FlowableException("Cannot unacquire BPMN job. There is no BPMN engine available");
            }
        } else if (ScopeTypes.CMMN.equals(job.getScopeType())) {
            if (cmmnManagementService != null) {
                if (restApiInterceptor != null) {
                    restApiInterceptor.unacquireExternalWorkerJob(job, request);
                }

                cmmnManagementService.unacquireExternalWorkerJob(jobId, workerId);
                
            } else {
                throw new FlowableException("Cannot unacquire CMMN job. There is no CMMN engine available");
            }
            
        } else {
            throw new FlowableIllegalArgumentException(
                    "Can only unacquire BPMN or CMMN external job. Job with id '" + jobId + "' is from scope '" + job.getScopeType() + "'");
        }

View on GitHub (pinned to d6d39ce1c6)