flowable/flowable-engine · error · FlowableIllegalArgumentException
Invalid action, only 'execute' is supported.
Error message
Invalid action, only 'execute' is supported.
What it means
Thrown by POST /cmmn-management/jobs/{jobId} when the action request body is missing or its 'action' field is not the only supported value 'execute'. FlowableIllegalArgumentException means the request itself is invalid — a 400-class client error, not a job state problem.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/management/JobResource.java:220
try {
managementService.deleteDeadLetterJob(job.getId());
} catch (FlowableObjectNotFoundException e) {
// Re-throw to have consistent error-messaging across REST-api
throw new FlowableObjectNotFoundException("Could not find a job with id '" + jobId + "'.", Job.class);
}
}
@ApiOperation(value = "Execute a single job", tags = { "Jobs" }, code = 204)
@ApiResponses(value = {
@ApiResponse(code = 204, message = "Indicates the job was executed. Response-body is intentionally empty."),
@ApiResponse(code = 404, message = "Indicates the requested job was not found."),
@ApiResponse(code = 500, message = "Indicates the an exception occurred while executing the job. The status-description contains additional detail about the error. The full error-stacktrace can be fetched later on if needed.")
})
@PostMapping("/cmmn-management/jobs/{jobId}")
@ResponseStatus(HttpStatus.NO_CONTENT)
public void executeJobAction(@ApiParam(name = "jobId") @PathVariable String jobId, @RequestBody RestActionRequest actionRequest) {
if (actionRequest == null || !EXECUTE_ACTION.equals(actionRequest.getAction())) {
throw new FlowableIllegalArgumentException("Invalid action, only 'execute' is supported.");
}
Job job = getJobById(jobId);
try {
managementService.executeJob(job.getId());
} catch (FlowableObjectNotFoundException e) {
// Re-throw to have consistent error-messaging across REST-api
throw new FlowableObjectNotFoundException("Could not find a job with id '" + jobId + "'.", Job.class);
}
}
@ApiOperation(value = "Execute a single job action (move or reschedule)", tags = { "Jobs" }, code = 204)
@ApiResponses(value = {
@ApiResponse(code = 204, message = "Indicates the timer job action was executed. Response-body is intentionally empty."),
@ApiResponse(code = 404, message = "Indicates the requested job was not found."),
@ApiResponse(code = 500, message = "Indicates the an exception occurred while executing the job. The status-description contains additional detail about the error. The full error-stacktrace can be fetched later on if needed.")
})View on GitHub (pinned to d6d39ce1c6)
Solutions
- Send {"action":"execute"} exactly as the body.
- Use the timer-job move/reschedule endpoints instead if you intended a move or reschedule action.
- Serialize the body explicitly — ensure the HTTP client actually sends the JSON (no empty body).
Example fix
// before
post("/cmmn-management/jobs/" + jobId, {"action": "reschedule"});
// after
post("/cmmn-management/jobs/" + jobId, {"action": "execute"}); Defensive patterns
Strategy: validation
Validate before calling
if (body == null || !"execute".equals(body.getAction())) {
throw new IllegalArgumentException("action must be 'execute' for CMMN jobs");
} Try / catch
try { post("/cmmn-management/jobs/" + jobId, body); }
catch (HttpClientErrorException.Conflict | HttpClientErrorException.BadRequest e) { /* invalid action — fix body */ } Prevention
- Always send exactly {"action":"execute"} for CMMN jobs
- Don't reuse BPMN REST action bodies (move/reschedule) against the CMMN API
- Ensure the HTTP client actually serializes the body
When it happens
Trigger: POST /cmmn-management/jobs/{jobId} with an empty body, or {"action":"move"|"reschedule"|"kill"} — anything other than exactly 'execute'.
Common situations: Copy-pasting action bodies from the BPMN REST API (which supports move/reschedule) into the CMMN API; misspelled 'action' field; calling with no JSON body at all.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Invalid action: '${action}'.
- Invalid action, only 'execute' is supported.
- Variable operation is missing for variable:
- Variable value is missing for variable:
- Value-only query (without a variable-name) is not supported
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/010faeced8f9ad62.
Report an issue: GitHub.