flowable/flowable-engine · error · FlowableException

Cannot complete CMMN job. There is no CMMN engine available

Error message

Cannot complete CMMN job. There is no CMMN engine available

What it means

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.

Source

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

                }

                managementService.createExternalWorkerCompletionBuilder(job.getId(), workerId)
                        .variables(extractVariables(request.getVariables()))
                        .complete();
            } else {
                throw new FlowableException("Cannot complete BPMN job. There is no BPMN engine available");
            }
        } else if (ScopeTypes.CMMN.equals(job.getScopeType())) {
            if (cmmnManagementService != null) {
                if (restApiInterceptor != null) {
                    restApiInterceptor.completeExternalWorkerJob(job, request);
                }

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

        return ResponseEntity.noContent().build();
    }

    @ApiOperation(value = "Complete an External Worker Job with a BPMN Error", code = 204, tags = { "Acquire and Execute" })
    @ApiResponses({
            @ApiResponse(code = 204, message = "Indicates the job was successfully completed."),
            @ApiResponse(code = 400, message = "Indicates the request was invalid."),
            @ApiResponse(code = 403, message = "Indicates the user does not have the rights complete the job."),
            @ApiResponse(code = 404, message = "Indicates the job does not exist."),
    })
    @PostMapping(value = "/acquire/jobs/{jobId}/bpmnError", produces = "application/json")
    public ResponseEntity<?> bpmnErrorJob(@PathVariable String jobId, @RequestBody ExternalWorkerJobErrorRequest request) {

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Wire the CMMN engine so cmmnManagementService is injected into the resource.
  2. Enable CMMN engine auto-configuration in the REST app.
  3. Add the flowable-cmmn-engine dependency if missing.
  4. Route CMMN job completion to a REST instance with the CMMN engine configured.

Example fix

// before: only BPMN engine configured -> cmmnManagementService null
@Bean
public ProcessEngine processEngine(...) { ... }
// after: also configure CMMN
@Bean
public CmmnEngine cmmnEngine(CmmnEngineConfiguration cfg) { return cfg.buildCmmnEngine(); }
Defensive patterns

Strategy: validation

Validate before calling

// deployment-time assertion
assert cmmnManagementService != null : "CMMN managementService required to complete CMMN external jobs";

Try / catch

try {
    restClient.complete(jobId, request);
} catch (HttpServerErrorException.InternalServerError e) {
    log.error("REST app lacks CMMN engine for this job", e);
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

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/696b168104e058e5. Report an issue: GitHub.