{"record":{"id":"bb4339b2e7120ee5","repo":"flowable/flowable-engine","slug":"no-decision-found-for-key-decisionkey-there-was-bb4339","errorCode":null,"errorMessage":"No decision found for key <decisionKey>. There was also no fall back decision found for default tenant <defaultTenant>.","messagePattern":"No decision found for key <decisionKey>\\. There was also no fall back decision found for default tenant <defaultTenant>\\.","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":148,"sourceCode":"                // If there is no decision table found linked to the deployment id, try to find one without a specific deployment id.\n                decision = decisionEntityManager.findLatestDecisionByKey(decisionKey);\n\n                if (decision == null) {\n                    throw new FlowableObjectNotFoundException(\"No decision found for key: \" + decisionKey +\n                        \" and parent deployment id \" + parentDeploymentId +\n                        \". There was also no fall back decision found without parent deployment id.\");\n                }\n            }\n            \n        } else if (StringUtils.isNotEmpty(decisionKey) && StringUtils.isNotEmpty(tenantId)) {\n            decision = decisionEntityManager.findLatestDecisionByKeyAndTenantId(decisionKey, tenantId);\n            if (decision == null) {\n                if (executeDecisionContext.isFallbackToDefaultTenant() || dmnEngineConfiguration.isFallbackToDefaultTenant()) {\n                    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","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/AbstractExecuteDecisionCmd.java#L130-L166","documentation":"Thrown when a decision is resolved by key and tenantId, fallback-to-default-tenant is enabled, the default tenant resolves to a non-empty value, but findLatestDecisionByKeyAndTenantId still finds no Decision for that default tenant. The engine treats this as a hard not-found because even the fallback could not locate the decision.","triggerScenarios":"Executing a decision with decisionKey and tenantId where (isFallbackToDefaultTenant || config fallback) is true, DefaultTenantProvider returns a non-empty default tenant, and no Decision row exists for key+defaultTenant.","commonSituations":"Decision never deployed under the default tenant; default tenant provider misconfigured to a tenant that has no DMN deployments; decision deployed only to a custom tenant while the fallback resolves to the default one.","solutions":["Check what DefaultTenantProvider returns and confirm decisions are actually deployed under that tenant; deploy the .dmn resource with that tenantId if not.","Fix or replace the defaultTenantProvider so it returns the tenant that owns the decision.","Verify the decision key is correct via DmnRepositoryService decision query.","Disable fallbackToDefaultTenant if the decision should only resolve by the explicitly given tenantId."],"exampleFix":"// before\ndmnEngineConfiguration.setDefaultTenantProvider((tenantId, scope, key) -> \"missing-tenant\");\n// after\ndmnEngineConfiguration.setDefaultTenantProvider((tenantId, scope, key) ->\n    dmnRepositoryService.createDecisionQuery().decisionKey(key).list().isEmpty() ? null : tenantId != null ? tenantId : \"default\");","handlingStrategy":"validation","validationCode":"String defaultTenant = defaultTenantProvider.getDefaultTenant(tenantId, ScopeTypes.DMN, key);\nif (defaultTenant != null && dmnRepositoryService.createDecisionQuery().decisionKey(key).tenantId(defaultTenant).count() == 0) {\n    log.error(\"Decision {} not deployed under default tenant {}\", key, defaultTenant);\n}","typeGuard":null,"tryCatchPattern":"try { dmnEngine.executeDecision(builder.decisionKey(key).tenantId(tenant)); }\ncatch (FlowableObjectNotFoundException e) { throw new IllegalStateException(\"Decision \" + key + \" missing even under default tenant\", e); }","preventionTips":["Ensure DMN models are deployed under the tenant your DefaultTenantProvider resolves","Unit-test the DefaultTenantProvider configuration","Keep fallback tenant deployments in sync with per-tenant deployments"],"tags":["dmn","tenant","fallback","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"}