flowable/flowable-engine · error · FlowableObjectNotFoundException

no deployed process definition found with id '" +…

Error message

no deployed process definition found with id '" + processDefinitionId + "'

What it means

Flowable throws FlowableObjectNotFoundException when a process definition id is well-formed but no deployed definition with that id exists. The cache is checked first, then the database via ProcessDefinitionEntityManager.findById; if both miss, this error is thrown. It means the definition was deleted, never deployed, or the id is wrong.

Solutions

  1. Verify the id exists: repositoryService.createProcessDefinitionQuery().processDefinitionId(id).singleResult()
  2. Re-deploy the process definition (repositoryService.createDeployment().addClasspathResource(...).deploy())
  3. Check you are connected to the database/schema where the definition was deployed
  4. If the definition was cascade-deleted, redeploy and restart the affected instances

Example fix

// before
runtimeService.startProcessInstanceById("myProcess:1:4");
// after
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
    .processDefinitionId("myProcess:1:4").singleResult();
if (pd == null) {
    repositoryService.createDeployment().addClasspathResource("processes/myProcess.bpmn20.xml").deploy();
}
runtimeService.startProcessInstanceById("myProcess:1:4");
Defensive patterns

Strategy: try-catch

Validate before calling

ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
    .processDefinitionId(id).singleResult();
if (pd == null) { /* redeploy or fail fast */ }

Try / catch

try {
    ProcessDefinition pd = repositoryService.getProcessDefinition(id);
} catch (FlowableObjectNotFoundException e) {
    // redeploy the definition or fall back to a lookup by key
}

Prevention

When it happens

Trigger: repositoryService.getProcessDefinition("pid-123") or runtimeService.startProcessInstanceById("pid-123") where "pid-123" was never deployed, points to another database/schema, or the deployment was removed (possibly via cascade delete).

Common situations: Hardcoded ids copied from another environment; cascade delete of deployments removed the definition while running instances still reference it; pointing at a wrong database or tenant schema; restarting against a fresh in-memory H2 database without redeploying.

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

Appendix: source

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

    public void deploy(DeploymentEntity deployment, Map<String, Object> deploymentSettings) {
        for (EngineDeployer deployer : deployers) {
            deployer.deploy(deployment, deploymentSettings);
        }
    }

    public ProcessDefinition findDeployedProcessDefinitionById(String processDefinitionId) {
        if (processDefinitionId == null) {
            throw new FlowableIllegalArgumentException("Invalid process definition id : null");
        }

        // 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);

View on GitHub (pinned to d6d39ce1c6)