flowable/flowable-engine · error · FlowableIllegalArgumentException

No action found in request body.

Error message

No action found in request body.

What it means

executeProcessDefinitionAction (PUT on a process definition) requires a JSON body carrying an 'action' field. When the deserialized ProcessDefinitionActionRequest is null — i.e. no usable body was sent — Flowable rejects the request with this IllegalArgumentException.

Source

Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/ProcessDefinitionResource.java:99

        return restResponseFactory.createProcessDefinitionResponse(processDefinition);
    }

    // FIXME Unique endpoint but with multiple actions
    @ApiOperation(value = "Execute actions for a process definition", tags = { "Process Definitions" },
            notes = "Execute actions for a process definition (Update category, Suspend or Activate)")
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "Indicates action has been executed for the specified process. (category altered, activate or suspend)"),
            @ApiResponse(code = 400, message = "Indicates no category was defined in the request body."),
            @ApiResponse(code = 404, message = "Indicates the requested process definition was not found."),
            @ApiResponse(code = 409, message = "Indicates the requested process definition is already suspended or active.")
    })
    @PutMapping(value = "/repository/process-definitions/{processDefinitionId}", produces = "application/json")
    public ProcessDefinitionResponse executeProcessDefinitionAction(
            @ApiParam(name = "processDefinitionId") @PathVariable String processDefinitionId,
            @ApiParam(required = true) @RequestBody ProcessDefinitionActionRequest actionRequest) {

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

        ProcessDefinition processDefinition = getProcessDefinitionFromRequestWithoutAccessCheck(processDefinitionId);

        if (restApiInterceptor != null) {
            restApiInterceptor.executeProcessDefinitionAction(processDefinition, actionRequest);
        }

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

            // No need to re-fetch the ProcessDefinition entity, just update
            // category in response
            ProcessDefinitionResponse response = restResponseFactory.createProcessDefinitionResponse(processDefinition);
            response.setCategory(actionRequest.getCategory());
            return response;

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Send a JSON body such as {"action":"suspend"} with Content-Type: application/json
  2. Use one of the supported actions: activate or suspend
  3. Check the HTTP client actually serializes the request body

Example fix

// before
curl -X PUT .../process-definitions/myDef -H "Content-Type: application/json"
// after
curl -X PUT .../process-definitions/myDef -H "Content-Type: application/json" -d '{"action":"suspend"}'
Defensive patterns

Strategy: validation

Validate before calling

if (!body || !body.action) throw new Error('PUT process-definition requires a JSON body with an action field');

Type guard

const hasAction = (r) => r != null && typeof r.action === 'string' && r.action.length > 0;

Try / catch

try { await api.put(defUrl, { action: 'suspend' }); }
catch (e) { if (e.status === 400 && /No action found/.test(e.message)) fixRequestBody(e); else throw e; }

Prevention

When it happens

Trigger: PUT /repository/process-definitions/{id} with an empty body, no Content-Type: application/json, or a body that deserializes to null.

Common situations: Testing with curl -X PUT without -d; clients forgetting the JSON body; content-type mismatches causing the body to be ignored.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


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