flowable/flowable-engine · error · FlowableException

Cannot query external jobs. There is no BPMN or CMMN engine

Error message

Cannot query external jobs. There is no BPMN or CMMN engine available

What it means

Thrown by ExternalWorkerJobBaseResource.createExternalWorkerJobQuery when neither the BPMN ManagementService nor the CMMN ManagementService is injected into the REST module. External worker jobs live in one of the two engines, so without any engine bean there is no way to build an ExternalWorkerJobQuery. This is a server-side configuration problem, not a client mistake.

Source

Thrown at modules/flowable-external-job-rest/src/main/java/org/flowable/external/job/rest/service/api/ExternalWorkerJobBaseResource.java:38

import org.flowable.job.api.ExternalWorkerJobQuery;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author Filip Hrisafov
 */
public class ExternalWorkerJobBaseResource {

    protected ManagementService managementService;
    protected CmmnManagementService cmmnManagementService;
    protected ExternalWorkerJobRestApiInterceptor restApiInterceptor;

    protected ExternalWorkerJobQuery createExternalWorkerJobQuery() {
        if (managementService != null) {
            return managementService.createExternalWorkerJobQuery();
        } else if (cmmnManagementService != null) {
            return cmmnManagementService.createExternalWorkerJobQuery();
        } else {
            throw new FlowableException("Cannot query external jobs. There is no BPMN or CMMN engine available");
        }
    }

    protected ExternalWorkerJob getExternalWorkerJobById(String jobId) {
        ExternalWorkerJob job = createExternalWorkerJobQuery().jobId(jobId).singleResult();
        if (job == null) {
            throw new FlowableObjectNotFoundException("Could not find external worker job with id '" + jobId + "'.", ExternalWorkerJob.class);
        }

        if (restApiInterceptor != null) {
            restApiInterceptor.accessExternalWorkerJobById(job);
        }

        return job;
    }

    @Autowired(required = false)
    public void setManagementService(ManagementService managementService) {

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Configure and inject a BPMN engine (ProcessEngine / Spring ProcessEngineAutoConfiguration) so managementService is non-null.
  2. Alternatively configure a CMMN engine so cmmnManagementService is non-null.
  3. Verify the external-job REST app is deployed alongside an engine, not as a bare standalone WAR/jar.
  4. Check Spring bean configuration/profiles that may be excluding the engine auto-configurations.

Example fix

// before: external-job REST app with no engine beans -> both services null
// after (Spring Boot)
@SpringBootApplication
public class ExternalJobApp {}
// pulls in ProcessEngineAutoConfiguration, injecting managementService
// or explicitly:
@Bean
public ManagementService managementService(ProcessEngine processEngine) {
    return processEngine.getManagementService();
}
Defensive patterns

Strategy: validation

Validate before calling

// deployment-time check: at least one engine is wired
assert managementService != null || cmmnManagementService != null
    : "external-job REST module requires a BPMN or CMMN engine";

Try / catch

try {
    restTemplate.getForEntity("/external-worker/jobs", ...);
} catch (HttpServerErrorException e) {
    log.error("External job REST app has no engine configured", e);
}

Prevention

When it happens

Trigger: Calling any external worker job REST query endpoint (e.g. GET /external-worker/jobs or GET /external-worker/jobs/{jobId}) when the flowable-external-job-rest module is deployed with both managementService and cmmnManagementService left null (no BPMN engine and no CMMN engine configured).

Common situations: Standalone deployment of the external-job REST app without wiring engine beans; Spring configuration that excludes both ProcessEngine and CmmnEngine auto-configuration; copying only the REST module into a custom service without providing engine dependencies; intentional engine-less usage of the REST endpoints.

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/71ce0074857c6922. Report an issue: GitHub.