flowable/flowable-engine · error · FlowableIllegalArgumentException

No action found in request body.

Error message

No action found in request body.

What it means

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.

Solutions

  1. Send a JSON body with Content-Type: application/json, e.g. {"action":"update-category","category":"..."}.
  2. Verify no proxy/gateway strips the PUT body.
  3. Ensure the client serializes CaseDefinitionActionRequest correctly.

Example fix

// before
curl -X PUT .../case-definitions/123   // no body
// after
curl -X PUT .../case-definitions/123 -H 'Content-Type: application/json' -d '{"action":"update-category","category":"finance"}'
Defensive patterns

Strategy: validation

Validate before calling

if (body == null) throw new IllegalArgumentException("PUT case-definition requires a JSON CaseDefinitionActionRequest body");

Try / catch

try { ... } catch (FlowableIllegalArgumentException e) { return 400 with hint to send Content-Type: application/json and a body; }

Prevention

When it happens

Trigger: PUT /cmmn-repository/case-definitions/{id} with no request body, empty body, or Content-Type not set so Spring leaves the @RequestBody null.

Common situations: 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.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/0482328f87a1b410. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/repository/CaseDefinitionResource.java:94

        CaseDefinition caseDefinition = getCaseDefinitionFromRequest(caseDefinitionId);

        return restResponseFactory.createCaseDefinitionResponse(caseDefinition);
    }
    
    @ApiOperation(value = "Execute actions for a case definition", tags = { "Case Definitions" },
            notes = "Execute actions for a case definition (Update category)")
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "Indicates action has been executed for the specified process. (category altered)"),
            @ApiResponse(code = 400, message = "Indicates no category was defined in the request body."),
            @ApiResponse(code = 404, message = "Indicates the requested case definition was not found.")
    })
    @PutMapping(value = "/cmmn-repository/case-definitions/{caseDefinitionId}", produces = "application/json")
    public CaseDefinitionResponse executeCaseDefinitionAction(
            @ApiParam(name = "caseDefinitionId") @PathVariable String caseDefinitionId,
            @ApiParam(required = true) @RequestBody CaseDefinitionActionRequest actionRequest) {

        if (actionRequest == null) {
            throw new FlowableIllegalArgumentException("No action found in request body.");
        }

        CaseDefinition caseDefinition = getCaseDefinitionFromRequest(caseDefinitionId);

        if (actionRequest.getCategory() != null) {
            // Update of category required
            repositoryService.setCaseDefinitionCategory(caseDefinition.getId(), actionRequest.getCategory());

            // No need to re-fetch the CaseDefinition entity, just update category in response
            CaseDefinitionResponse response = restResponseFactory.createCaseDefinitionResponse(caseDefinition);
            response.setCategory(actionRequest.getCategory());
            return response;
        }
        
        throw new FlowableIllegalArgumentException("Invalid action: '" + actionRequest.getAction() + "'.");
    }

    @ApiOperation(value = "Get a case definition start form", tags = { "Case Definitions" })

View on GitHub (pinned to d6d39ce1c6)