{"record":{"id":"0482328f87a1b410","repo":"flowable/flowable-engine","slug":"no-action-found-in-request-body-048232","errorCode":null,"errorMessage":"No action found in request body.","messagePattern":"No action found in request body\\.","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/repository/CaseDefinitionResource.java","lineNumber":94,"sourceCode":"        CaseDefinition caseDefinition = getCaseDefinitionFromRequest(caseDefinitionId);\n\n        return restResponseFactory.createCaseDefinitionResponse(caseDefinition);\n    }\n    \n    @ApiOperation(value = \"Execute actions for a case definition\", tags = { \"Case Definitions\" },\n            notes = \"Execute actions for a case definition (Update category)\")\n    @ApiResponses(value = {\n            @ApiResponse(code = 200, message = \"Indicates action has been executed for the specified process. (category altered)\"),\n            @ApiResponse(code = 400, message = \"Indicates no category was defined in the request body.\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested case definition was not found.\")\n    })\n    @PutMapping(value = \"/cmmn-repository/case-definitions/{caseDefinitionId}\", produces = \"application/json\")\n    public CaseDefinitionResponse executeCaseDefinitionAction(\n            @ApiParam(name = \"caseDefinitionId\") @PathVariable String caseDefinitionId,\n            @ApiParam(required = true) @RequestBody CaseDefinitionActionRequest actionRequest) {\n\n        if (actionRequest == null) {\n            throw new FlowableIllegalArgumentException(\"No action found in request body.\");\n        }\n\n        CaseDefinition caseDefinition = getCaseDefinitionFromRequest(caseDefinitionId);\n\n        if (actionRequest.getCategory() != null) {\n            // Update of category required\n            repositoryService.setCaseDefinitionCategory(caseDefinition.getId(), actionRequest.getCategory());\n\n            // No need to re-fetch the CaseDefinition entity, just update category in response\n            CaseDefinitionResponse response = restResponseFactory.createCaseDefinitionResponse(caseDefinition);\n            response.setCategory(actionRequest.getCategory());\n            return response;\n        }\n        \n        throw new FlowableIllegalArgumentException(\"Invalid action: '\" + actionRequest.getAction() + \"'.\");\n    }\n\n    @ApiOperation(value = \"Get a case definition start form\", tags = { \"Case Definitions\" })","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/repository/CaseDefinitionResource.java#L76-L112","documentation":"executeCaseDefinitionAction (PUT on a case definition) expects a JSON body of type CaseDefinitionActionRequest. If the body is absent or null (no JSON sent), it throws FlowableIllegalArgumentException('No action found in request body.') before doing anything else.","triggerScenarios":"PUT /cmmn-repository/case-definitions/{id} with no request body, empty body, or Content-Type not set so Spring leaves the @RequestBody null.","commonSituations":"curl calls forgetting -d/--data or -H 'Content-Type: application/json'; clients sending form-encoded data; gateways stripping bodies on PUT; tests hitting the endpoint with GET-like semantics.","solutions":["Send a JSON body with Content-Type: application/json, e.g. {\"action\":\"update-category\",\"category\":\"...\"}.","Verify no proxy/gateway strips the PUT body.","Ensure the client serializes CaseDefinitionActionRequest correctly."],"exampleFix":"// before\ncurl -X PUT .../case-definitions/123   // no body\n// after\ncurl -X PUT .../case-definitions/123 -H 'Content-Type: application/json' -d '{\"action\":\"update-category\",\"category\":\"finance\"}'","handlingStrategy":"validation","validationCode":"if (body == null) throw new IllegalArgumentException(\"PUT case-definition requires a JSON CaseDefinitionActionRequest body\");","typeGuard":null,"tryCatchPattern":"try { ... } catch (FlowableIllegalArgumentException e) { return 400 with hint to send Content-Type: application/json and a body; }","preventionTips":["Always set Content-Type: application/json and send a JSON body on PUT.","Verify proxies/gateways preserve PUT bodies.","Write integration tests that assert the body is sent."],"tags":["rest-api","request-body","validation"],"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-18T16:30:33.424Z"}