{"record":{"id":"73c1534b3fafc7a0","repo":"flowable/flowable-engine","slug":"invalid-action-action-73c153","errorCode":null,"errorMessage":"Invalid action: '${action}'.","messagePattern":"Invalid action: '(.+?)'\\.","errorType":"exception","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/process/ProcessInstanceResource.java","lineNumber":142,"sourceCode":"\n            if (ProcessInstanceUpdateRequest.ACTION_ACTIVATE.equals(updateRequest.getAction())) {\n                return activateProcessInstance(processInstance);\n\n            } else if (ProcessInstanceUpdateRequest.ACTION_SUSPEND.equals(updateRequest.getAction())) {\n                return suspendProcessInstance(processInstance);\n\n            } else if (ProcessInstanceUpdateRequest.ACTION_CLAIM.equals(updateRequest.getAction())) {\n                runtimeService.claimProcessInstance(processInstanceId, updateRequest.getAssignee());\n                processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();\n                return restResponseFactory.createProcessInstanceResponse(processInstance);\n\n            } else if (ProcessInstanceUpdateRequest.ACTION_UNCLAIM.equals(updateRequest.getAction())) {\n                runtimeService.unclaimProcessInstance(processInstanceId);\n                processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();\n                return restResponseFactory.createProcessInstanceResponse(processInstance);\n\n            } else {\n                throw new FlowableIllegalArgumentException(\"Invalid action: '\" + updateRequest.getAction() + \"'.\");\n            }\n\n        } else { // update\n\n            boolean hasUpdates = false;\n            ProcessInstanceUpdateBuilder updateBuilder = runtimeService.createProcessInstanceUpdateBuilder(processInstanceId);\n\n            if (updateRequest.getName() != null) {\n                updateBuilder.name(updateRequest.getName());\n                hasUpdates = true;\n            }\n            if (updateRequest.getBusinessKey() != null) {\n                updateBuilder.businessKey(updateRequest.getBusinessKey());\n                hasUpdates = true;\n            }\n            if (updateRequest.getBusinessStatus() != null) {\n                updateBuilder.businessStatus(updateRequest.getBusinessStatus());\n                hasUpdates = true;","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/process/ProcessInstanceResource.java#L124-L160","documentation":"Flowable REST throws FlowableIllegalArgumentException when PUT /runtime/process-instances/{id} carries an 'action' property whose value is not one of the supported actions (activate, suspend, claim, unclaim). Unknown action strings are rejected.","triggerScenarios":"PUT with body {\"action\":\"cancel\"} or {\"action\":\"ACTIVATE\"} (case-sensitive check against ACTION_* constants); typo like 'suspende'.","commonSituations":"Client written against Activiti 5 API with actions Flowable dropped or renamed; case-sensitivity assumption; migrated code sending custom actions.","solutions":["Use only: activate, suspend, claim, unclaim (exact lowercase strings).","Remove the action field entirely if you only want to update businessKey/query variables — updates go through the non-action branch.","Check the ProcessInstanceAction constants in the Flowable version you target."],"exampleFix":"// before\n{\"action\": \"resume\"}\n// after\n{\"action\": \"activate\"}","handlingStrategy":"validation","validationCode":"const allowed = ['activate','suspend','claim','unclaim']; if (body.action && !allowed.includes(body.action)) throw new Error('invalid action: ' + body.action);","typeGuard":"const isValidAction = (a) => ['activate','suspend','claim','unclaim'].includes(a);","tryCatchPattern":null,"preventionTips":["Keep action strings in a shared constant module","Re-check allowed actions after Flowable version upgrades","Send updates without an action field when not performing an action"],"tags":["rest-api","invalid-enum","process-instance"],"backgroundTag":"invalid-enum-value","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}