{"record":{"id":"693382790df3be2e","repo":"flowable/flowable-engine","slug":"no-processes-deployed-with-key-processdefinit","errorCode":null,"errorMessage":"no processes deployed with key '\" + processDefinitionKey + \"'","messagePattern":"no processes deployed with key '\" \\+ processDefinitionKey \\+ \"'","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java","lineNumber":89,"sourceCode":"        // first try the cache\n        ProcessDefinitionCacheEntry cacheEntry = processDefinitionCache.get(processDefinitionId);\n        ProcessDefinition processDefinition = cacheEntry != null ? cacheEntry.getProcessDefinition() : null;\n\n        if (processDefinition == null) {\n            processDefinition = processDefinitionEntityManager.findById(processDefinitionId);\n            if (processDefinition == null) {\n                throw new FlowableObjectNotFoundException(\"no deployed process definition found with id '\" + processDefinitionId + \"'\", ProcessDefinition.class);\n            }\n            processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();\n        }\n        return processDefinition;\n    }\n\n    public ProcessDefinition findDeployedLatestProcessDefinitionByKey(String processDefinitionKey) {\n        ProcessDefinition processDefinition = processDefinitionEntityManager.findLatestProcessDefinitionByKey(processDefinitionKey);\n\n        if (processDefinition == null) {\n            throw new FlowableObjectNotFoundException(\"no processes deployed with key '\" + processDefinitionKey + \"'\", ProcessDefinition.class);\n        }\n        processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();\n        return processDefinition;\n    }\n\n    public ProcessDefinition findDeployedLatestProcessDefinitionByKeyAndTenantId(String processDefinitionKey, String tenantId) {\n        ProcessDefinition processDefinition = processDefinitionEntityManager.findLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, tenantId);\n        if (processDefinition == null) {\n            throw new FlowableObjectNotFoundException(\"no processes deployed with key '\" + processDefinitionKey + \"' for tenant identifier '\" + tenantId + \"'\", ProcessDefinition.class);\n        }\n        processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();\n        return processDefinition;\n    }\n\n    public ProcessDefinition findDeployedProcessDefinitionByKeyAndVersionAndTenantId(String processDefinitionKey, Integer processDefinitionVersion, String tenantId) {\n        ProcessDefinition processDefinition = (ProcessDefinitionEntity) processDefinitionEntityManager\n                .findProcessDefinitionByKeyAndVersionAndTenantId(processDefinitionKey, processDefinitionVersion, tenantId);\n        if (processDefinition == null) {","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java#L71-L107","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Confirm the key matches the <process id=\"...\"> attribute in the BPMN XML (not the file name)","List deployed keys: repositoryService.createProcessDefinitionQuery().list() and compare","Ensure deployment runs (Spring boot auto-deployment, or explicit createDeployment().deploy())","Check the engine connects to the database where the definition was deployed"],"exampleFix":"// before\nruntimeService.startProcessInstanceByKey(\"OrderProcess\");\n// after\n// BPMN: <process id=\"orderProcess\" ...>\nruntimeService.startProcessInstanceByKey(\"orderProcess\");","handlingStrategy":"validation","validationCode":"if (repositoryService.createProcessDefinitionQuery()\n        .processDefinitionKey(key).count() == 0) {\n    repositoryService.createDeployment().addClasspathResource(\"processes/\" + key + \".bpmn20.xml\").deploy();\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the start key identical to <process id> in the BPMN XML","Centralize deployment bootstrap so tests and prod deploy the same resources","Verify deployed keys at startup (health check)"],"tags":["flowable","process-definition","not-found","deployment"],"backgroundTag":"entity-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}