{"record":{"id":"68616c52ba63c488","repo":"flowable/flowable-engine","slug":"no-decisions-deployed-with-key-definitionkey-68616c","errorCode":null,"errorMessage":"no decisions deployed with key '${definitionKey}' for tenant identifier '${tenantId}'","messagePattern":"no decisions deployed with key '(.+?)' for 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":95,"sourceCode":"        }\n        return decision;\n    }\n\n    public DecisionEntity findDeployedLatestDefinitionByKey(String definitionKey) {\n        DecisionEntity definition = decisionEntityManager.findLatestDecisionByKey(definitionKey);\n\n        if (definition == null) {\n            throw new FlowableObjectNotFoundException(\"no decisions deployed with key '\" + definitionKey + \"'\");\n        }\n        definition = resolveDecision(definition).getDecisionEntity();\n        return definition;\n    }\n\n    public DecisionEntity findDeployedLatestDefinitionByKeyAndTenantId(String definitionKey, String tenantId) {\n        DecisionEntity definition = decisionEntityManager.findLatestDecisionByKeyAndTenantId(definitionKey, tenantId);\n\n        if (definition == null) {\n            throw new FlowableObjectNotFoundException(\"no decisions deployed with key '\" + definitionKey + \"' for tenant identifier '\" + tenantId + \"'\");\n        }\n        definition = resolveDecision(definition).getDecisionEntity();\n        return definition;\n    }\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) {","sourceCodeStart":77,"sourceCodeEnd":113,"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#L77-L113","documentation":"findDeployedLatestDefinitionByKeyAndTenantId throws FlowableObjectNotFoundException when no decision with the key exists for the given tenant identifier. Flowable partitions DMN definitions per tenant; the lookup filters both on key and TENANT_ID_, and a null result is reported as not found.","triggerScenarios":"Calling findDeployedLatestDefinitionByKeyAndTenantId with a tenantId under which the decision was never deployed, or with mismatched key/tenant pairs.","commonSituations":"Multi-tenant setup where the DMN was deployed for tenant A but the execution runs with tenant B; deployment made without tenantId (null tenant) while lookup uses a tenant id; case-sensitivity or whitespace differences in tenant identifiers.","solutions":["Deploy the DMN resource with the same tenantId: dmnRepositoryService.createDeployment().tenantId(tenantId)...deploy().","Verify existing deployments via createDecisionQuery().decisionKey(key).tenantId(tenantId).list().","If the decision is tenant-agnostic, look it up with a null tenantId (findDeployedLatestDefinitionByKey) instead."],"exampleFix":"// before\nDecisionEntity d = manager.findDeployedLatestDefinitionByKeyAndTenantId(\"approveOrder\", \"tenant-42\"); // not found\n// after\ndmnRepositoryService.createDeployment()\n    .addClasspathResource(\"approveOrder.dmn\")\n    .tenantId(\"tenant-42\")\n    .deploy();\nDecisionEntity d = manager.findDeployedLatestDefinitionByKeyAndTenantId(\"approveOrder\", \"tenant-42\");","handlingStrategy":"validation","validationCode":"boolean tenantDeployed = dmnRepositoryService.createDecisionQuery()\n    .latest().decisionKey(key).tenantId(tenantId).count() > 0;","typeGuard":null,"tryCatchPattern":"try { return manager.findDeployedLatestDefinitionByKeyAndTenantId(key, tenantId); } catch (FlowableObjectNotFoundException e) { log.error(\"decision {} missing for tenant {}\", key, tenantId); throw e; }","preventionTips":["Deploy DMN resources with the tenantId that will execute them","Normalize tenant ids (trim/case) consistently","Audit per-tenant decision coverage on startup"],"tags":["flowable-dmn","not-found","tenant","missing-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"}