{"record":{"id":"2f0e0d530a6c20af","repo":"flowable/flowable-engine","slug":"no-decision-with-id-decisionkey-found-in-defi","errorCode":null,"errorMessage":"no decision with id: '<decisionKey>' found in definition","messagePattern":"no decision with id: '<decisionKey>' found in definition","errorType":"exception","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/AbstractExecuteDecisionCmd.java","lineNumber":191,"sourceCode":"        } 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());\n\n        if (decision == null) {\n            throw new FlowableIllegalArgumentException(\"no decision with id: '\" + executeDecisionContext.getDecisionKey() + \"' found in definition\");\n        }\n\n        executeDecisionContext.setDmnElement(decision);\n        CommandContextUtil.getAgenda(commandContext).planExecuteDecisionOperation(executeDecisionContext, decision);\n    }\n}\n","sourceCodeStart":173,"sourceCodeEnd":198,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/AbstractExecuteDecisionCmd.java#L173-L198","documentation":"FlowableIllegalArgumentException thrown after the DmnDefinition was resolved but definition.getDecisionById(decisionKey) returns null — the decision key exists as a deployed definition entity, yet no <decision> element with that id is present in the parsed DMN model. This indicates the repository Decision row and the DMN XML content are inconsistent.","triggerScenarios":"Executing a decision where the key matched a Decision row in the repository, but the deployed .dmn XML does not contain a <decision id=\"key\"> element (or the XML failed to expose that id).","commonSituations":"DMN XML edited to rename the decision id after deployment; repository cache holding a stale version; mismatch between decision-table id in the XML and the key used; partially failed deployment leaving metadata without the expected model content.","solutions":["Redeploy the .dmn resource so the model content matches the repository metadata.","Verify the <decision id=\"...\"> in the .dmn XML equals the decisionKey being requested.","Clear/restart the engine (definition cache) after re-deploying so the fresh model is parsed.","Use DmnRepositoryService.getDmnModel(deploymentId) to inspect which decision ids the deployed model actually contains."],"exampleFix":"// before\n<decision id=\"approval_v1\" name=\"Approval\"> ... </decision>  // key used: approval\n// after\n<decision id=\"approval\" name=\"Approval\"> ... </decision>  // then redeploy\ndmnRepositoryService.createDeployment().addClasspathResource(\"dmn/approval.dmn\").deploy();","handlingStrategy":"validation","validationCode":"DmnModel model = dmnRepositoryService.getDmnModel(deploymentId);\nif (model == null || model.getDecisionById(key) == null) {\n    throw new IllegalStateException(\"Deployed model \" + deploymentId + \" has no decision id \" + key);\n}","typeGuard":null,"tryCatchPattern":"try { dmnEngine.executeDecision(builder.decisionKey(key)); }\ncatch (FlowableIllegalArgumentException e) { log.error(\"Model/repository mismatch for key {}\", key, e); redeployDmnResource(); }","preventionTips":["Never edit .dmn decision ids after deployment without redeploying","Keep repository metadata and XML in sync by always deploying whole resources","Inspect getDmnModel(deploymentId) when renaming ids"],"tags":["dmn","model-mismatch","deployment"],"backgroundTag":"internal-invariant-violation","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"}