{"record":{"id":"0c7df93fc1da476c","repo":"flowable/flowable-engine","slug":"no-decision-found-for-key-decisionkey-and-tenan","errorCode":null,"errorMessage":"No decision found for key: <decisionKey> and tenantId: <tenantId>.","messagePattern":"No decision found for key: <decisionKey> and tenantId: <tenantId>\\.","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/AbstractExecuteDecisionCmd.java","lineNumber":162,"sourceCode":"                    String defaultTenant = dmnEngineConfiguration.getDefaultTenantProvider().getDefaultTenant(tenantId, ScopeTypes.DMN, decisionKey);\n                    if (StringUtils.isNotEmpty(defaultTenant)) {\n                        decision = decisionEntityManager.findLatestDecisionByKeyAndTenantId(decisionKey, defaultTenant);\n                        if (decision == null) {\n                            throw new FlowableObjectNotFoundException(\"No decision found for key: \" + decisionKey +\n                                \". There was also no fall back decision found for default tenant \" +\n                                defaultTenant + \".\");\n                        }\n\n                    } else {\n                        decision = decisionEntityManager.findLatestDecisionByKey(decisionKey);\n                        if (decision == null) {\n                            throw new FlowableObjectNotFoundException(\"No decision found for key: \" + decisionKey +\n                                \". There was also no fall back decision found without tenant.\");\n                        }\n                    }\n\n                } else {\n                    throw new FlowableObjectNotFoundException(\n                        \"No decision found for key: \" + decisionKey + \" and tenantId: \" + tenantId + \".\");\n                }\n            }\n\n        } else if (StringUtils.isNotEmpty(decisionKey)) {\n            decision = decisionEntityManager.findLatestDecisionByKey(decisionKey);\n            if (decision == null) {\n                throw new FlowableObjectNotFoundException(\"No decision found for key: \" + decisionKey + \".\");\n            }\n            \n        } else {\n            throw new FlowableIllegalArgumentException(\"decisionKey is null\");\n        }\n\n        executeDecisionContext.setDecisionId(decision.getId());\n        executeDecisionContext.setDecisionVersion(decision.getVersion());\n        executeDecisionContext.setDeploymentId(decision.getDeploymentId());\n","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/AbstractExecuteDecisionCmd.java#L144-L180","documentation":"Thrown when a decision is resolved by key and tenantId with fallback-to-default-tenant disabled and no Decision exists for that exact key+tenantId combination. The engine refuses to fall back, so the lookup fails outright.","triggerScenarios":"Executing a decision with decisionKey and tenantId set where isFallbackToDefaultTenant() is false (context and engine config) and findDecisionByKeyAndTenantId returns null.","commonSituations":"Decision deployed under a different tenant; tenantId spelled incorrectly; decision only in the default tenant while the caller passes an explicit tenant with fallback disabled; multi-tenant deployment mismatch after environment migration.","solutions":["Enable fallbackToDefaultTenant in DmnEngineConfiguration (dmnEngineConfiguration.setFallbackToDefaultTenant(true)) or pass fallbackToDefaultTenant() on the builder so the default tenant can be used.","Correct the tenantId to the tenant under which the .dmn file was deployed.","Deploy the decision under the requested tenantId.","Verify existence with DmnRepositoryService.createDecisionQuery().decisionKey(key).tenantId(tenantId).count()."],"exampleFix":"// before\ndmnEngine.executeDecision(new ExecuteDecisionBuilderImpl().decisionKey(\"risk\").tenantId(\"acme\"));\n// after\ndmnEngine.executeDecision(new ExecuteDecisionBuilderImpl().decisionKey(\"risk\").tenantId(\"acme\").fallbackToDefaultTenant());","handlingStrategy":"fallback","validationCode":"boolean exists = dmnRepositoryService.createDecisionQuery().decisionKey(key).tenantId(tenantId).count() > 0;\nboolean fallback = dmnEngine.getDmnEngineConfiguration().isFallbackToDefaultTenant();\nif (!exists && !fallback) throw new IllegalStateException(\"Decision \" + key + \" not in tenant \" + tenantId + \" and fallback disabled\");","typeGuard":null,"tryCatchPattern":"try { dmnEngine.executeDecision(builder.decisionKey(key).tenantId(tenantId)); }\ncatch (FlowableObjectNotFoundException e) { dmnEngine.executeDecision(builder.decisionKey(key).tenantId(defaultTenant)); }","preventionTips":["Enable fallbackToDefaultTenant in multi-tenant setups with a shared default tenant","Standardize tenant ids (constants/config) to avoid typos","Deploy tenant-specific DMN resources during tenant provisioning"],"tags":["dmn","tenant","not-found"],"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"}