{"record":{"id":"0c5dd9f5ee34c4eb","repo":"flowable/flowable-engine","slug":"no-decisions-deployed-with-key-definitionkey-0c5dd9","errorCode":null,"errorMessage":"no decisions deployed with key '${definitionKey}' for deployment id '${deploymentId}' and tenant identifier ${tenantId}","messagePattern":"no decisions deployed with key '(.+?)' for deployment id '(.+?)' and tenant identifier (.+?)","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/persistence/deploy/DeploymentManager.java","lineNumber":117,"sourceCode":"    }\n\n    public DecisionEntity findDeployedLatestDecisionByKeyAndDeploymentId(String definitionKey, String deploymentId) {\n        DecisionEntity definition = decisionEntityManager.findDecisionByDeploymentAndKey(deploymentId, definitionKey);\n\n        if (definition == null) {\n            throw new FlowableObjectNotFoundException(\"no decisions deployed with key '\" + definitionKey +\n                            \"' for deployment id '\" + deploymentId + \"'\");\n        }\n        definition = resolveDecision(definition).getDecisionEntity();\n        return definition;\n    }\n\n    public DecisionEntity findDeployedLatestDecisionByKeyDeploymentIdAndTenantId(String definitionKey,\n            String deploymentId, String tenantId) {\n        DecisionEntity definition = decisionEntityManager.findDecisionByDeploymentAndKeyAndTenantId(deploymentId, definitionKey, tenantId);\n\n        if (definition == null) {\n            throw new FlowableObjectNotFoundException(\"no decisions deployed with key '\" + definitionKey +\n                            \"' for deployment id '\" + deploymentId + \"' and tenant identifier \" + tenantId);\n        }\n        definition = resolveDecision(definition).getDecisionEntity();\n        return definition;\n    }\n\n    public DecisionEntity findDeployedDefinitionByKeyAndVersionAndTenantId(String definitionKey, int definitionVersion, String tenantId) {\n        DecisionEntity definition = decisionEntityManager.findDecisionByKeyAndVersionAndTenantId(definitionKey, definitionVersion, tenantId);\n\n        if (definition == null) {\n            throw new FlowableObjectNotFoundException(\"no decision deployed with key = '\" + definitionKey + \"' and version = '\" + definitionVersion + \"'\");\n        }\n\n        definition = resolveDecision(definition).getDecisionEntity();\n        return definition;\n    }\n\n    /**","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/persistence/deploy/DeploymentManager.java#L99-L135","documentation":"findDeployedLatestDecisionByKeyDeploymentIdAndTenantId throws FlowableObjectNotFoundException when no decision matches the key, deployment id AND tenant identifier triple. It is the tenant-scoped variant of the deployment-pinned lookup.","triggerScenarios":"Calling findDeployedLatestDecisionByKeyDeploymentIdAndTenantId where the deployment exists but was made under a different tenantId, or the key/deployment/tenant combination never existed.","commonSituations":"Multi-tenant environments where deployment was done with a null or different tenant; copying deployment ids between tenant environments; tenant id typos or trailing whitespace.","solutions":["Deploy with the matching tenantId and confirm via createDecisionQuery().deploymentId(id).decisionKey(key).tenantId(tenantId).list().","Normalize tenant identifiers (trim, consistent casing) before deployment and lookup.","Relax the lookup (drop tenant or deployment constraint) if strict pinning isn't required."],"exampleFix":"// before\nDecisionEntity d = manager.findDeployedLatestDecisionByKeyDeploymentIdAndTenantId(\"approveOrder\", deploymentId, \"tenant-42\");\n// after\nif (dmnRepositoryService.createDecisionQuery().deploymentId(deploymentId)\n        .decisionKey(\"approveOrder\").tenantId(\"tenant-42\").count() == 0) {\n    dmnRepositoryService.createDeployment().addClasspathResource(\"approveOrder.dmn\")\n        .tenantId(\"tenant-42\").deploy();\n}\nDecisionEntity d = manager.findDeployedLatestDecisionByKeyDeploymentIdAndTenantId(\"approveOrder\", deploymentId, \"tenant-42\");","handlingStrategy":"validation","validationCode":"boolean match = dmnRepositoryService.createDecisionQuery()\n    .deploymentId(deploymentId).decisionKey(key).tenantId(tenantId).count() > 0;","typeGuard":null,"tryCatchPattern":"try { return manager.findDeployedLatestDecisionByKeyDeploymentIdAndTenantId(key, deploymentId, tenantId); } catch (FlowableObjectNotFoundException e) { log.error(\"no decision {} in deployment {} for tenant {}\", key, deploymentId, tenantId); throw e; }","preventionTips":["Keep a registry of (deploymentId, key, tenantId) triples produced at deploy time","Deploy per-tenant resources with matching tenantId","Trim/validate tenant ids before any engine call"],"tags":["flowable-dmn","not-found","tenant","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-18T11:17:12.947Z"}