{"record":{"id":"1893ca78ee6907fd","repo":"flowable/flowable-engine","slug":"no-decision-found-for-key-decisionkey","errorCode":null,"errorMessage":"No decision found for key <decisionKey>.","messagePattern":"No decision found for key <decisionKey>\\.","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":170,"sourceCode":"\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\n        DecisionCacheEntry decisionTableCacheEntry = CommandContextUtil.getDmnEngineConfiguration().getDeploymentManager().resolveDecision(decision);\n        DmnDefinition dmnDefinition = decisionTableCacheEntry.getDmnDefinition();\n\n        return dmnDefinition;\n    }\n\n    protected void execute(CommandContext commandContext, DmnDefinition definition) {\n        Decision decision = definition.getDecisionById(executeDecisionContext.getDecisionKey());","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/AbstractExecuteDecisionCmd.java#L152-L188","documentation":"Thrown when a decision is resolved by decisionKey alone (no parent deployment, no tenant) and findLatestDecisionByKey returns null — i.e. no decision with that key is deployed anywhere in the DMN repository. Execution cannot continue without a definition.","triggerScenarios":"Calling executeDecision / evaluateDecision with only decisionKey set, where no Decision entity with that key exists in the database.","commonSituations":"Typo in the decision key; DMN model not deployed yet; deployment auto-cleanup removed it; key refers to a decision-table id that changed when the .dmn was edited; wrong database/schema (test vs prod).","solutions":["Deploy the DMN resource containing the decision (DmnRepositoryService.createDeployment().addClasspathResource(\"x.dmn\").deploy()).","Fix the decisionKey to match the decision id in the .dmn XML.","Confirm with dmnRepositoryService.createDecisionQuery().decisionKey(key).latestVersion().singleResult() before executing.","Check you are connected to the database/schema where the decision is deployed."],"exampleFix":"// before\ndmnEngineRule.executeDecision(new ExecuteDecisionBuilderImpl().decisionKey(\"approveOrder\"));\n// after\nif (dmnRepositoryService.createDecisionQuery().decisionKey(\"approveOrder\").count() == 0) {\n    dmnRepositoryService.createDeployment().addClasspathResource(\"dmn/approveOrder.dmn\").deploy();\n}\ndmnEngineRule.executeDecision(new ExecuteDecisionBuilderImpl().decisionKey(\"approveOrder\"));","handlingStrategy":"validation","validationCode":"if (dmnRepositoryService.createDecisionQuery().decisionKey(key).latestVersion().singleResult() == null) {\n    dmnRepositoryService.createDeployment().addClasspathResource(\"dmn/\" + key + \".dmn\").deploy();\n}","typeGuard":null,"tryCatchPattern":"try { dmnEngine.executeDecision(builder.decisionKey(key)); }\ncatch (FlowableObjectNotFoundException e) { log.error(\"Decision {} not deployed\", key, e); throw new IllegalStateException(\"Deploy DMN model first\", e); }","preventionTips":["Add DMN deployment steps to app startup or CI before execution","Centralize decision keys in constants to avoid typos","Verify test/prod database URLs — not-found often means wrong schema"],"tags":["dmn","not-found","deployment"],"backgroundTag":"entity-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"}