flowable/flowable-engine · error · FlowableIllegalArgumentException
Invalid action: '${action}'.
Error message
Invalid action: '${action}'. What it means
Thrown by updateCaseInstance (PUT on a case instance) when the 'action' field in the CaseInstanceUpdateRequest body is neither 'claim' nor 'unclaim'. Flowable only supports these two actions on this endpoint; anything else is rejected as an invalid argument via FlowableIllegalArgumentException.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceResource.java:111
CaseInstance caseInstance = getCaseInstanceFromRequestWithoutAccessCheck(caseInstanceId);
if (StringUtils.isNotEmpty(updateRequest.getAction())) {
if (restApiInterceptor != null) {
restApiInterceptor.doCaseInstanceAction(caseInstance, updateRequest);
}
if (RestActionRequest.EVALUATE_CRITERIA.equals(updateRequest.getAction())) {
runtimeService.evaluateCriteria(caseInstance.getId());
} else if (CaseInstanceUpdateRequest.ACTION_CLAIM.equals(updateRequest.getAction())) {
runtimeService.claimCaseInstance(caseInstanceId, updateRequest.getAssignee());
} else if (CaseInstanceUpdateRequest.ACTION_UNCLAIM.equals(updateRequest.getAction())) {
runtimeService.unclaimCaseInstance(caseInstanceId);
} else {
throw new FlowableIllegalArgumentException("Invalid action: '" + updateRequest.getAction() + "'.");
}
} else { // regular update
if (restApiInterceptor != null) {
restApiInterceptor.updateCaseInstance(caseInstance, updateRequest);
}
boolean hasUpdates = false;
CaseInstanceUpdateBuilder updateBuilder = runtimeService.createCaseInstanceUpdateBuilder(caseInstanceId);
if (updateRequest.getName() != null) {
updateBuilder.name(updateRequest.getName());
hasUpdates = true;
}
if (updateRequest.getBusinessKey() != null) {
updateBuilder.businessKey(updateRequest.getBusinessKey());
hasUpdates = true;View on GitHub (pinned to d6d39ce1c6)
Solutions
- Set 'action' to exactly "claim" or "unclaim" in the request body.
- To claim, include the "assignee" field alongside action=claim; for unclaim, no assignee is needed.
- Remove the 'action' field entirely if you intend a regular update handled by restApiInterceptor instead of a claim/unclaim.
- Check the Flowable REST API docs for your version to confirm the supported action values.
Example fix
// before
PUT /cmmn-runtime/case-instances/case1
{"action":"activate"}
// after
PUT /cmmn-runtime/case-instances/case1
{"action":"claim","assignee":"johnDoe"} Defensive patterns
Strategy: validation
Validate before calling
const VALID_ACTIONS = ['claim', 'unclaim'];
if (body.action && !VALID_ACTIONS.includes(body.action)) {
throw new Error(`Invalid action '${body.action}'; use 'claim' or 'unclaim'`);
}
if (body.action === 'claim' && !body.assignee) {
throw new Error('claim requires an assignee');
} Type guard
function isCaseAction(a) {
return typeof a === 'string' && ['claim', 'unclaim'].includes(a);
} Try / catch
try {
await updateCaseInstance(caseId, body);
} catch (e) {
if (e.status === 400) { /* invalid action: fix body before retry */ }
else throw e;
} Prevention
- Use a constant/enum for action values instead of free-form strings.
- Don't reuse BPMN process instance action bodies for CMMN case instances.
- Validate the request body against the CaseInstanceUpdateRequest schema before sending.
When it happens
Trigger: PUT /cmmn-runtime/case-instances/{caseInstanceId} with a JSON body whose 'action' property is an unsupported string (e.g. 'suspend', 'activate', 'complete', or a typo like 'claime'), while no assignee-based regular update path applies.
Common situations: Copy-pasting request bodies from the process (BPMN) REST API which supports more actions; typos or wrong casing in the action string; clients sending action values not valid for CMMN case instances; API version drift where an action existed in a different product/endpoint.
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, only 'execute' is supported.
- 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/decb9a892f4a2beb.
Report an issue: GitHub.