flowable/flowable-engine · error · FlowableObjectNotFoundException

no processes deployed with key '" + processDefinitionKey + "

Error message

no processes deployed with key '" + processDefinitionKey + "'

What it means

Flowable throws FlowableObjectNotFoundException when starting/resolving a process by key and no deployed definition has that key. findDeployedLatestProcessDefinitionByKey queries the ACT_RE_PROCDEF table for the latest version of the key; a null result means no definition with that key has ever been (or is currently) deployed in this database.

Source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java:89

        // first try the cache
        ProcessDefinitionCacheEntry cacheEntry = processDefinitionCache.get(processDefinitionId);
        ProcessDefinition processDefinition = cacheEntry != null ? cacheEntry.getProcessDefinition() : null;

        if (processDefinition == null) {
            processDefinition = processDefinitionEntityManager.findById(processDefinitionId);
            if (processDefinition == null) {
                throw new FlowableObjectNotFoundException("no deployed process definition found with id '" + processDefinitionId + "'", ProcessDefinition.class);
            }
            processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();
        }
        return processDefinition;
    }

    public ProcessDefinition findDeployedLatestProcessDefinitionByKey(String processDefinitionKey) {
        ProcessDefinition processDefinition = processDefinitionEntityManager.findLatestProcessDefinitionByKey(processDefinitionKey);

        if (processDefinition == null) {
            throw new FlowableObjectNotFoundException("no processes deployed with key '" + processDefinitionKey + "'", ProcessDefinition.class);
        }
        processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();
        return processDefinition;
    }

    public ProcessDefinition findDeployedLatestProcessDefinitionByKeyAndTenantId(String processDefinitionKey, String tenantId) {
        ProcessDefinition processDefinition = processDefinitionEntityManager.findLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, tenantId);
        if (processDefinition == null) {
            throw new FlowableObjectNotFoundException("no processes deployed with key '" + processDefinitionKey + "' for tenant identifier '" + tenantId + "'", ProcessDefinition.class);
        }
        processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();
        return processDefinition;
    }

    public ProcessDefinition findDeployedProcessDefinitionByKeyAndVersionAndTenantId(String processDefinitionKey, Integer processDefinitionVersion, String tenantId) {
        ProcessDefinition processDefinition = (ProcessDefinitionEntity) processDefinitionEntityManager
                .findProcessDefinitionByKeyAndVersionAndTenantId(processDefinitionKey, processDefinitionVersion, tenantId);
        if (processDefinition == null) {

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Confirm the key matches the <process id="..."> attribute in the BPMN XML (not the file name)
  2. List deployed keys: repositoryService.createProcessDefinitionQuery().list() and compare
  3. Ensure deployment runs (Spring boot auto-deployment, or explicit createDeployment().deploy())
  4. Check the engine connects to the database where the definition was deployed

Example fix

// before
runtimeService.startProcessInstanceByKey("OrderProcess");
// after
// BPMN: <process id="orderProcess" ...>
runtimeService.startProcessInstanceByKey("orderProcess");
Defensive patterns

Strategy: validation

Validate before calling

if (repositoryService.createProcessDefinitionQuery()
        .processDefinitionKey(key).count() == 0) {
    repositoryService.createDeployment().addClasspathResource("processes/" + key + ".bpmn20.xml").deploy();
}

Prevention

When it happens

Trigger: runtimeService.startProcessInstanceByKey("orderProcess") where "orderProcess" is misspelled, auto-deployment of the resources directory was disabled, or the BPMN file's <process id="..."> differs from the key used in code.

Common situations: Renamed the process id in the BPMN XML but kept the old key in code; fresh database without running the deployment step; spring-boot auto-deploy picking up a different resources folder; test DB reset between runs.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/693382790df3be2e. Report an issue: GitHub.