{"record":{"id":"695819d21ca60ddf","repo":"flowable/flowable-engine","slug":"decision-key-is-required","errorCode":null,"errorMessage":"Decision key is required.","messagePattern":"Decision key is required\\.","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-dmn-rest/src/main/java/org/flowable/dmn/rest/service/api/decision/DmnRuleServiceResource.java","lineNumber":67,"sourceCode":"\n    @Autowired\n    protected DmnRestResponseFactory dmnRestResponseFactory;\n\n    @Autowired\n    protected DmnDecisionService dmnDecisionService;\n\n    @Autowired(required = false)\n    protected DmnRestApiInterceptor restApiInterceptor;\n\n    @ApiOperation(value = \"Execute a Decision\", tags = { \"DMN Rule Service\" }, code = 201)\n    @ApiResponses(value = {\n            @ApiResponse(code = 201, message = \"Indicates the Decision has been executed\")\n    })\n    @PostMapping(value = \"/dmn-rule/execute\", produces = \"application/json\")\n    @ResponseStatus(HttpStatus.CREATED)\n    public DmnRuleServiceResponse execute(@ApiParam(\"request\") @RequestBody DmnRuleServiceRequest request) {\n        if (request.getDecisionKey() == null) {\n            throw new FlowableIllegalArgumentException(\"Decision key is required.\");\n        }\n\n        if (restApiInterceptor != null) {\n            restApiInterceptor.executeDecision(request);\n        }\n\n        Map<String, Object> inputVariables = composeInputVariables(request.getInputVariables());\n\n        try {\n            ExecuteDecisionBuilder decisionBuilder = dmnDecisionService.createExecuteDecisionBuilder();\n            decisionBuilder.decisionKey(request.getDecisionKey()).variables(inputVariables);\n\n            if (StringUtils.isNotEmpty(request.getParentDeploymentId())) {\n                decisionBuilder.parentDeploymentId(request.getParentDeploymentId());\n            }\n\n            if (StringUtils.isNotEmpty(request.getTenantId())) {\n                decisionBuilder.tenantId(request.getTenantId());","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-rest/src/main/java/org/flowable/dmn/rest/service/api/decision/DmnRuleServiceResource.java#L49-L85","documentation":"REST request validation in DmnRuleServiceResource.execute: the execute-decision request body did not include a decision key (and no table/definition identifier), so the DMN rule service cannot determine which decision to evaluate.","triggerScenarios":"POSTing JSON to /dmn-rule/execute without a decisionKey field, or with decisionKey explicitly set to null.","commonSituations":"Client payloads missing the field due to serialization settings skipping nulls/defaults; renaming the property in the client while the server expects decisionKey; copy-pasted request templates from other endpoints.","solutions":["Include \"decisionKey\" in the JSON request body.","Validate the request payload on the client before sending.","Check client serialization is not omitting the field (e.g. null-skipping serializers with a null value).","Catch the 400 response and inspect the error message to confirm which field is missing."],"exampleFix":"// before\nPOST /dmn-rule/execute {\"inputVariables\": {\"a\": 1}}\n// after\nPOST /dmn-rule/execute {\"decisionKey\": \"myDecision\", \"inputVariables\": {\"a\": 1}}","handlingStrategy":"validation","validationCode":"if (request.getDecisionKey() == null || request.getDecisionKey().isEmpty()) {\n    throw new IllegalArgumentException(\"decisionKey is required\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    ResponseEntity<DmnRuleServiceResponse> resp = rest.postForEntity(url, request, DmnRuleServiceResponse.class);\n} catch (HttpClientErrorException.BadRequest e) {\n    logger.error(\"decisionKey missing: {}\", e.getResponseBodyAsString());\n}","preventionTips":["Always set decisionKey in execute requests","Add client-side payload validation before posting","Verify serializers do not drop the field"],"tags":["rest","dmn","validation","required-field"],"backgroundTag":"missing-required-argument","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"}