{"record":{"id":"9294a371f05e9518","repo":"flowable/flowable-engine","slug":"cannot-acquire-external-jobs-there-is-no-bpmn-or","errorCode":null,"errorMessage":"Cannot acquire external jobs. There is no BPMN or CMMN engine available","messagePattern":"Cannot acquire external jobs\\. There is no BPMN or CMMN engine available","errorType":"exception","errorClass":"FlowableException","httpStatus":500,"severity":"error","filePath":"modules/flowable-external-job-rest/src/main/java/org/flowable/external/job/rest/service/api/acquire/ExternalWorkerAcquireJobResource.java","lineNumber":296,"sourceCode":"                    throw new FlowableIllegalArgumentException(\"Variable name is required.\");\n                }\n\n                variables.put(restVariable.getName(), restResponseFactory.getVariableValue(restVariable));\n            }\n\n            return variables;\n        }\n\n        return Collections.emptyMap();\n    }\n\n    protected ExternalWorkerJobAcquireBuilder createExternalWorkerAcquireBuilder() {\n        if (managementService != null) {\n            return managementService.createExternalWorkerJobAcquireBuilder();\n        } else if (cmmnManagementService != null) {\n            return cmmnManagementService.createExternalWorkerJobAcquireBuilder();\n        } else {\n            throw new FlowableException(\"Cannot acquire external jobs. There is no BPMN or CMMN engine available\");\n        }\n    }\n\n    protected ExternalWorkerJobFailureBuilder createExternalWorkerJobFailureBuilder(String jobId, String workerId) {\n        if (managementService != null) {\n            return managementService.createExternalWorkerJobFailureBuilder(jobId, workerId);\n        } else if (cmmnManagementService != null) {\n            return cmmnManagementService.createExternalWorkerJobFailureBuilder(jobId, workerId);\n        } else {\n            throw new FlowableException(\"Cannot fail external jobs. There is no BPMN or CMMN engine available\");\n        }\n    }\n}\n","sourceCodeStart":278,"sourceCodeEnd":310,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-external-job-rest/src/main/java/org/flowable/external/job/rest/service/api/acquire/ExternalWorkerAcquireJobResource.java#L278-L310","documentation":"FlowableException thrown by createExternalWorkerAcquireBuilder when neither the BPMN ProcessEngine's managementService nor the CMMN engine's cmmnManagementService is injected into the REST resource. External worker job acquisition requires at least one configured engine. Without a engine binding there is nothing to acquire jobs from.","triggerScenarios":"POST /external-worker-job/acquire (acquireBuilder path) on a REST app where the BPMN and CMMN engines are both absent or their ManagementService beans failed to wire into ExternalWorkerAcquireJobResource.","commonSituations":"Deploying only the external-job REST module without process/cmmn engine configuration; Spring configuration that excludes the ProcessEngine auto-configuration; engine bootstrap failure at startup leaving services null.","solutions":["Configure and start a BPMN (or CMMN) engine so its ManagementService bean is available to the REST resource.","Verify Spring/auto-configuration includes the flowable engine configuration (flowable.process/cmmn.enabled and datasource).","Check startup logs for engine initialization failures that left managementService null."],"exampleFix":"// application.yml before\nflowable:\n  process:\n    enabled: false\n// after\nflowable:\n  process:\n    enabled: true","handlingStrategy":"fallback","validationCode":"boolean enginesAvailable = processEngine != null || cmmnEngine != null; // check at startup\nif (!enginesAvailable) throw new IllegalStateException(\"No engine configured for external worker REST API\");","typeGuard":null,"tryCatchPattern":"try { acquireJobs(request); } catch (FlowableException e) { if (e.getMessage().contains(\"no BPMN or CMMN engine\")) { alertOps(\"Engine misconfiguration\"); } else { throw e; } }","preventionTips":["Enable BPMN or CMMN engine auto-configuration in the REST deployment","Smoke-test job acquisition at application startup","Monitor engine bean wiring in integration tests"],"tags":["configuration","engine","external-worker","rest-api"],"backgroundTag":"missing-dependency","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}