{"record":{"id":"2c41bf354a68080b","repo":"flowable/flowable-engine","slug":"no-decision-service-with-id-decisionkey-found","errorCode":null,"errorMessage":"no decision service with id: '<decisionKey>' found in definition","messagePattern":"no decision service 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/ExecuteDecisionServiceCmd.java","lineNumber":76,"sourceCode":"    @Override\n    public Void execute(CommandContext commandContext) {\n        if (executeDecisionContext.getDecisionKey() == null) {\n            throw new FlowableIllegalArgumentException(\"decisionKey is null\");\n        }\n\n        DmnDefinition definition = resolveDefinition();\n\n        execute(commandContext, definition);\n\n        return null;\n    }\n\n    @Override\n    protected void execute(CommandContext commandContext, DmnDefinition definition) {\n        DecisionService decisionService = definition.getDecisionServiceById(executeDecisionContext.getDecisionKey());\n\n        if (decisionService == null) {\n            throw new FlowableIllegalArgumentException(\"no decision service with id: '\" + executeDecisionContext.getDecisionKey() + \"' found in definition\");\n        }\n\n        executeDecisionContext.setDmnElement(decisionService);\n        CommandContextUtil.getAgenda(commandContext).planExecuteDecisionServiceOperation(executeDecisionContext, decisionService);\n    }\n}\n","sourceCodeStart":58,"sourceCodeEnd":83,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/ExecuteDecisionServiceCmd.java#L58-L83","documentation":"After resolving the DMN definition, ExecuteDecisionServiceCmd looks up a DecisionService element by id within it. When no decision service with the given key exists in that definition, it throws FlowableIllegalArgumentException naming the missing key. The key is syntactically valid (non-null) but does not match anything in the deployed DMN model.","triggerScenarios":"executeDecisionService(\"someKey\", vars) where someKey is not a <decisionService id=...> in the deployed DMN XML — e.g. key points to a decision table instead of a decision service, or the definition resolved under the given decision key does not contain that decision service.","commonSituations":"Typo or case mismatch between the code and the DMN XML id; deploying a different/older version of the .dmn file than the one the code was written against; confusing decision id with decision service id.","solutions":["Open the deployed .dmn XML and copy the exact <decisionService id=\"...\"> value into the call","Verify you are invoking executeDecisionService, not executeDecision, and that the resolved definition actually contains that decision service","Redeploy the corrected DMN artifact if the model was changed, and clear stale deployments referencing the old version"],"exampleFix":"// before\ndecisionService.executeDecisionService(\"decisionService_1\", vars); // id wrong\n// after\ndecisionService.executeDecisionService(\"orderApprovalDecisionService\", vars); // matches <decisionService id=\"orderApprovalDecisionService\">","handlingStrategy":"try-catch","validationCode":"DmnDefinition def = dmnRepositoryService.createDefinitionQuery().definitionKey(definitionKey).latestVersion().singleResult();\nboolean hasService = def != null; // optionally inspect the model XML for <decisionService id=\"key\">","typeGuard":null,"tryCatchPattern":"try { decisionService.executeDecisionService(key, vars); } catch (FlowableIllegalArgumentException e) { if (e.getMessage().startsWith(\"no decision service with id\")) { throw new NotFoundException(\"decision service \" + key + \" not in deployed DMN definition\", e); } throw e; }","preventionTips":["Keep decision service ids in constants shared/reviewed against the .dmn file","Deploy the DMN artifact and code together in one release unit","Add an integration test that executes every decision service id the code references"],"tags":["flowable","dmn","decision-service","resource-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-14T05:17:10.506Z"}