{"record":{"id":"d1005b6b96071c3a","repo":"flowable/flowable-engine","slug":"no-processes-deployed-with-key-processdefinit-d1005b","errorCode":null,"errorMessage":"no processes deployed with key '\" + processDefinitionKey + \"' for tenant identifier '\" + tenantId + \"'","messagePattern":"no processes deployed with key '\" \\+ processDefinitionKey \\+ \"' for tenant identifier '\" \\+ tenantId \\+ \"'","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java","lineNumber":98,"sourceCode":"            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) {\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     */","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java#L80-L116","documentation":"Same lookup as the by-key variant, but scoped to a tenant: findDeployedLatestProcessDefinitionByKeyAndTenantId queries for the latest definition with the given key AND tenantId, throwing FlowableObjectNotFoundException when none exists. The combination of key and tenant identifier must match a deployed row exactly.","triggerScenarios":"runtimeService.startProcessInstanceByKey(key).processDefinitionTenantId(\"tenant-42\").start() where the tenant-42 deployment is missing, or a definition was deployed with a different/empty tenant id than the one passed.","commonSituations":"Multi-tenant setups where one tenant's definitions were deployed but not another's; deployment done without .tenantId(...) so it landed under the default empty tenant; case-sensitivity or trailing-whitespace differences in tenant ids.","solutions":["Verify deployment used .tenantId(\"tenant-42\") when deploying the definition","Query with tenant: repositoryService.createProcessDefinitionQuery().processDefinitionTenantId(t).processDefinitionKey(key).list()","If the definition should be tenant-agnostic, deploy with .tenantId(...) for each tenant or drop the tenant qualifier from the start call","Check exact tenant id spelling/case"],"exampleFix":"// before\nrepositoryService.createDeployment().addClasspathResource(\"order.bpmn20.xml\").deploy();\n// tenant-scoped start then fails\nruntimeService.startProcessInstanceByKey(\"order\").processDefinitionTenantId(\"acme\").start();\n// after\nrepositoryService.createDeployment().addClasspathResource(\"order.bpmn20.xml\").tenantId(\"acme\").deploy();\nruntimeService.startProcessInstanceByKey(\"order\").processDefinitionTenantId(\"acme\").start();","handlingStrategy":"validation","validationCode":"boolean deployed = repositoryService.createProcessDefinitionQuery()\n    .processDefinitionKey(key)\n    .processDefinitionTenantId(tenantId).count() > 0;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set .tenantId(...) when deploying in multi-tenant setups","Normalize/trim tenant ids before use","Add per-tenant deployment smoke checks"],"tags":["flowable","multi-tenancy","process-definition","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-14T11:17:12.474Z"}