{"record":{"id":"696b168104e058e5","repo":"flowable/flowable-engine","slug":"cannot-complete-cmmn-job-there-is-no-cmmn-engine","errorCode":null,"errorMessage":"Cannot complete CMMN job. There is no CMMN engine available","messagePattern":"Cannot complete CMMN job\\. There is no 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":135,"sourceCode":"                }\n\n                managementService.createExternalWorkerCompletionBuilder(job.getId(), workerId)\n                        .variables(extractVariables(request.getVariables()))\n                        .complete();\n            } else {\n                throw new FlowableException(\"Cannot complete BPMN job. There is no BPMN engine available\");\n            }\n        } else if (ScopeTypes.CMMN.equals(job.getScopeType())) {\n            if (cmmnManagementService != null) {\n                if (restApiInterceptor != null) {\n                    restApiInterceptor.completeExternalWorkerJob(job, request);\n                }\n\n                cmmnManagementService.createCmmnExternalWorkerTransitionBuilder(job.getId(), workerId)\n                        .variables(extractVariables(request.getVariables()))\n                        .complete();\n            } else {\n                throw new FlowableException(\"Cannot complete CMMN job. There is no CMMN engine available\");\n            }\n        } else {\n            throw new FlowableIllegalArgumentException(\n                    \"Can only complete BPMN or CMMN external job. Job with id '\" + jobId + \"' is from scope '\" + job.getScopeType() + \"'\");\n        }\n\n        return ResponseEntity.noContent().build();\n    }\n\n    @ApiOperation(value = \"Complete an External Worker Job with a BPMN Error\", code = 204, tags = { \"Acquire and Execute\" })\n    @ApiResponses({\n            @ApiResponse(code = 204, message = \"Indicates the job was successfully completed.\"),\n            @ApiResponse(code = 400, message = \"Indicates the request was invalid.\"),\n            @ApiResponse(code = 403, message = \"Indicates the user does not have the rights complete the job.\"),\n            @ApiResponse(code = 404, message = \"Indicates the job does not exist.\"),\n    })\n    @PostMapping(value = \"/acquire/jobs/{jobId}/bpmnError\", produces = \"application/json\")\n    public ResponseEntity<?> bpmnErrorJob(@PathVariable String jobId, @RequestBody ExternalWorkerJobErrorRequest request) {","sourceCodeStart":117,"sourceCodeEnd":153,"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#L117-L153","documentation":"FlowableException thrown in completeJob when the job belongs to a CMMN case instance but cmmnManagementService is null, so createCmmnExternalWorkerTransitionBuilder cannot be created. The CMMN engine must be wired into the REST module to complete CMMN-scoped jobs. Results in HTTP 500.","triggerScenarios":"Completing an external worker job whose scopeType is CMMN while only the BPMN engine (or no engine) is injected into the external-job REST module.","commonSituations":"REST app configured with only ProcessEngine; CMMN dependency (flowable-cmmn-engine / spring config) excluded; profile flag disabling CMMN engine creation while CMMN jobs still exist in the shared database.","solutions":["Wire the CMMN engine so cmmnManagementService is injected into the resource.","Enable CMMN engine auto-configuration in the REST app.","Add the flowable-cmmn-engine dependency if missing.","Route CMMN job completion to a REST instance with the CMMN engine configured."],"exampleFix":"// before: only BPMN engine configured -> cmmnManagementService null\n@Bean\npublic ProcessEngine processEngine(...) { ... }\n// after: also configure CMMN\n@Bean\npublic CmmnEngine cmmnEngine(CmmnEngineConfiguration cfg) { return cfg.buildCmmnEngine(); }","handlingStrategy":"validation","validationCode":"// deployment-time assertion\nassert cmmnManagementService != null : \"CMMN managementService required to complete CMMN external jobs\";","typeGuard":null,"tryCatchPattern":"try {\n    restClient.complete(jobId, request);\n} catch (HttpServerErrorException.InternalServerError e) {\n    log.error(\"REST app lacks CMMN engine for this job\", e);\n}","preventionTips":["Enable CMMN engine auto-configuration in the external-job REST app.","Include flowable-cmmn-engine dependency when CMMN cases use external worker tasks.","Health-check a CMMN job completion path at deploy time."],"tags":["rest","cmmn","configuration","external-worker"],"backgroundTag":"missing-dependency","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}