flowable/flowable-engine · error · FlowableException
Cannot complete BPMN job. There is no BPMN engine available
Error message
Cannot complete BPMN job. There is no BPMN engine available
What it means
FlowableException thrown in completeJob when the job belongs to a BPMN process instance but the BPMN managementService is null, so createExternalWorkerCompletionBuilder cannot be invoked. The REST module needs the BPMN engine wired to complete BPMN-scoped external 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:123
}
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.completeExternalWorkerJob(job, request);
}
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() + "'");
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Wire the BPMN engine so managementService is injected into ExternalWorkerAcquireJobResource.
- Enable the ProcessEngine auto-configuration in the REST app's Spring context.
- Add the flowable-engine dependency if it was excluded.
- Route BPMN job completion to a REST instance that has the BPMN engine configured.
Example fix
// before: only CMMN engine configured -> managementService null
@Bean
public CmmnEngine cmmnEngine() { ... }
// after
@Bean
public ProcessEngine processEngine(ProcessEngineConfiguration cfg) { return cfg.buildProcessEngine(); }
// managementService now available for BPMN job completion Defensive patterns
Strategy: validation
Validate before calling
// deployment-time assertion assert managementService != null : "BPMN managementService required to complete BPMN external jobs";
Try / catch
try {
restClient.complete(jobId, request);
} catch (HttpServerErrorException.InternalServerError e) {
log.error("REST app lacks BPMN engine for this job", e);
} Prevention
- Enable ProcessEngine auto-configuration in the external-job REST app.
- Include flowable-engine dependency wherever external job completion is served.
- Health-check a BPMN job completion path at deploy time.
When it happens
Trigger: Completing an external worker job whose scopeType is BPMN while only the CMMN engine (or no engine) is injected into the external-job REST module.
Common situations: Deployment that only wires CmmnEngineConfiguration into the REST app yet also serves BPMN-created external jobs; engine beans conditionally disabled by profile; standalone external-job REST app missing process engine dependency.
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
- Cannot query external jobs. There is no BPMN or CMMN engine
- Cannot complete CMMN job. There is no CMMN engine available
- Can only complete BPMN external job with a BPMN error. Job w
- Can only terminate CMMN external job. Job with id '${jobId}'
- no topic expression configured for
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/4680095cf27b90d3.
Report an issue: GitHub.