{"record":{"id":"24637568878d3023","repo":"flowable/flowable-engine","slug":"no-processes-deployed-with-key-processdefinition-246375","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":"ActivitiObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/persistence/deploy/DeploymentManager.java","lineNumber":162,"sourceCode":"        ProcessDefinition processDefinition = Context\n                .getCommandContext()\n                .getProcessDefinitionEntityManager()\n                .findLatestProcessDefinitionByKey(processDefinitionKey);\n\n        if (processDefinition == null) {\n            throw new ActivitiObjectNotFoundException(\"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 = Context\n                .getCommandContext()\n                .getProcessDefinitionEntityManager()\n                .findLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, tenantId);\n        if (processDefinition == null) {\n            throw new ActivitiObjectNotFoundException(\"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 findDeployedProcessDefinitionByKeyAndVersion(String processDefinitionKey, Integer processDefinitionVersion) {\n        ProcessDefinition processDefinition = (ProcessDefinitionEntity) Context\n                .getCommandContext()\n                .getProcessDefinitionEntityManager()\n                .findProcessDefinitionByKeyAndVersion(processDefinitionKey, processDefinitionVersion);\n        if (processDefinition == null) {\n            throw new ActivitiObjectNotFoundException(\"no processes deployed with key = '\" + processDefinitionKey + \"' and version = '\" + processDefinitionVersion + \"'\", ProcessDefinition.class);\n        }\n        processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();\n        return processDefinition;\n    }\n\n    public ProcessDefinitionCacheEntry resolveProcessDefinition(ProcessDefinition processDefinition) {","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/persistence/deploy/DeploymentManager.java#L144-L180","documentation":"Tenant-aware variant of the 'no processes deployed with key' error: findDeployedLatestProcessDefinitionByKeyAndTenantId throws ActivitiObjectNotFoundException when no process definition with the given key exists for the specified tenant. The definition may be deployed but under a different tenantId (or the global 'no tenant' scope), so the tenant-filtered query returns null.","triggerScenarios":"Calling RuntimeService.startProcessInstanceByKeyAndTenantId(key, tenantId) or RepositoryService query with processDefinitionKeyAndTenantId when the key is deployed only for another tenant or without a tenant.","commonSituations":"Multi-tenant setups where the tenantId string doesn't match the tenant deployed with (case/whitespace mismatch), processes deployed tenant-lessly but started with a tenantId, or missing tenant configuration on the deployment.","solutions":["Deploy the process with the same tenantId: deploymentBuilder.tenantId(tenantId)","Verify with repositoryService.createProcessDefinitionQuery().processDefinitionKey(key).processDefinitionTenantId(tenantId).count()","If the process is deployed without a tenant, start it without tenantId or redeploy it with the tenant","Normalize tenantId strings (trim/case) to match what was used at deployment time"],"exampleFix":"// before\nruntimeService.startProcessInstanceByKeyAndTenantId(\"OrderProcess\", \"acme\"); // deployed as 'ACME'\n// after\nrepositoryService.createDeployment().addClasspathResource(\"order.bpmn20.xml\").tenantId(\"acme\").deploy();\nruntimeService.startProcessInstanceByKeyAndTenantId(\"OrderProcess\", \"acme\");","handlingStrategy":"validation","validationCode":"if (repositoryService.createProcessDefinitionQuery()\n        .processDefinitionKey(key)\n        .processDefinitionTenantId(tenantId).count() == 0) {\n    throw new IllegalStateException(\"No process \" + key + \" for tenant \" + tenantId);\n}","typeGuard":null,"tryCatchPattern":"try {\n    return runtimeService.startProcessInstanceByKeyAndTenantId(key, tenantId);\n} catch (ActivitiObjectNotFoundException e) {\n    // fall back to tenant-less start or surface tenant misconfiguration\n}","preventionTips":["Centralize tenantId constants; trim/case-normalize before use","Deploy with tenantId(...) whenever multi-tenancy is on","Audit tenant coverage of all process keys per environment"],"tags":["multi-tenancy","process-definition","not-found","deployment"],"backgroundTag":"resource-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"}