{"record":{"id":"ddc546ff9138cd4d","repo":"flowable/flowable-engine","slug":"no-processes-deployed-with-key-processdefin","errorCode":null,"errorMessage":"no processes deployed with key = '\" + processDefinitionKey + \"' and version = '\" + processDefinitionVersion + \"'","messagePattern":"no processes deployed with key = '\" \\+ processDefinitionKey \\+ \"' and version = '\" \\+ processDefinitionVersion \\+ \"'","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java","lineNumber":108,"sourceCode":"        }\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) {\n            throw new FlowableObjectNotFoundException(\"no processes deployed with key = '\" + processDefinitionKey + \"' and version = '\" + processDefinitionVersion + \"'\", ProcessDefinition.class);\n        }\n        processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();\n        return processDefinition;\n    }\n\n    /**\n     * Resolving the process definition will fetch the BPMN 2.0, parse it and store the {@link BpmnModel} in memory.\n     */\n    public ProcessDefinitionCacheEntry resolveProcessDefinition(ProcessDefinition processDefinition) {\n        String processDefinitionId = processDefinition.getId();\n        String deploymentId = processDefinition.getDeploymentId();\n\n        ProcessDefinitionCacheEntry cachedProcessDefinition = processDefinitionCache.get(processDefinitionId);\n\n        if (cachedProcessDefinition == null) {\n            if (Flowable5Util.isFlowable5ProcessDefinition(processDefinition, processEngineConfiguration)) {\n                return Flowable5Util.getFlowable5CompatibilityHandler().resolveProcessDefinition(processDefinition);\n            }","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java#L90-L126","documentation":"Flowable throws FlowableObjectNotFoundException when looking up a deployed definition by exact key + version (optionally tenant) and no such combination exists. The query filters ACT_RE_PROCDEF on key, version and tenant; any mismatch produces null and this error.","triggerScenarios":"repositoryService.getProcessDefinition(key, version) style lookups / newProcessDefinition resolution where the requested version was never deployed or was deleted; asking for version 5 when only versions 1-3 exist.","commonSituations":"Hardcoded version numbers after redeployments shifted versions; definitions redeployed on a fresh database so old versions no longer exist; off-by-one assumptions (expecting version to start at 1 when it does, but requesting 0).","solutions":["Check available versions: repositoryService.createProcessDefinitionQuery().processDefinitionKey(key).list() and inspect getVersion()","Use the latest version (startProcessInstanceByKey) instead of pinning an exact version if not strictly needed","Redeploy the specific BPMN version if that exact version must exist","Confirm tenant id matches the version's tenant scope"],"exampleFix":"// before\nruntimeService.startProcessInstanceById(key, 7, vars); // version 7 never deployed\n// after\nProcessDefinition pd = repositoryService.createProcessDefinitionQuery().processDefinitionKey(key)\n    .latestVersion().singleResult();\nruntimeService.startProcessInstanceById(pd.getId(), vars);","handlingStrategy":"validation","validationCode":"ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()\n    .processDefinitionKey(key)\n    .processDefinitionVersion(version)\n    .singleResult();\nif (pd == null) { /* fall back to latestVersion */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid hardcoding version numbers; query latestVersion when possible","After redeploys, re-resolve versions rather than caching them","Include version in error logging for traceability"],"tags":["flowable","process-definition","versioning","not-found"],"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-18T11:17:12.947Z"}