{"record":{"id":"e34967282d6d4701","repo":"flowable/flowable-engine","slug":"invalid-action-e34967","errorCode":null,"errorMessage":"Invalid action: ''.","messagePattern":"Invalid action: ''\\.","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/task/TaskResource.java","lineNumber":137,"sourceCode":"        }\n\n        if (TaskActionRequest.ACTION_COMPLETE.equals(actionRequest.getAction())) {\n            completeTask(task, actionRequest);\n\n        } else if (TaskActionRequest.ACTION_CLAIM.equals(actionRequest.getAction())) {\n            claimTask(task, actionRequest);\n\n        } else if (TaskActionRequest.ACTION_UNCLAIM.equals(actionRequest.getAction())) {\n            unclaimTask(task);\n\n        } else if (TaskActionRequest.ACTION_DELEGATE.equals(actionRequest.getAction())) {\n            delegateTask(task, actionRequest);\n\n        } else if (TaskActionRequest.ACTION_RESOLVE.equals(actionRequest.getAction())) {\n            resolveTask(task, actionRequest);\n\n        } else {\n            throw new FlowableIllegalArgumentException(\"Invalid action: '\" + actionRequest.getAction() + \"'.\");\n        }\n    }\n\n    @ApiOperation(value = \"Delete a task\", tags = {\"Tasks\"}, code = 204)\n    @ApiImplicitParams({\n            @ApiImplicitParam(name = \"cascadeHistory\", dataType = \"string\", value = \"Whether or not to delete the HistoricTask instance when deleting the task (if applicable). If not provided, this value defaults to false.\", paramType = \"query\"),\n            @ApiImplicitParam(name = \"deleteReason\", dataType = \"string\", value = \"Reason why the task is deleted. This value is ignored when cascadeHistory is true.\", paramType = \"query\")\n    })\n    @ApiResponses(value = {\n            @ApiResponse(code = 204, message = \"Indicates the task was found and has been deleted. Response-body is intentionally empty.\"),\n            @ApiResponse(code = 403, message = \"Indicates the requested task cannot be deleted because it’s part of a workflow.\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested task was not found.\")\n    })\n    @DeleteMapping(value = \"/runtime/tasks/{taskId}\")\n    @ResponseStatus(HttpStatus.NO_CONTENT)\n    public void deleteTask(@ApiParam(name = \"taskId\") @PathVariable String taskId, @ApiParam(hidden = true) @RequestParam(value = \"cascadeHistory\", required = false) Boolean cascadeHistory,\n                           @ApiParam(hidden = true) @RequestParam(value = \"deleteReason\", required = false) String deleteReason) {\n","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/task/TaskResource.java#L119-L155","documentation":"REST validation in executeTaskAction: the 'action' field of the request is not one of the supported task actions (complete, claim, unclaim, delegate, resolve, delete); unknown action names are rejected.","triggerScenarios":"POST /runtime/tasks/{taskId} with body {\"action\":\"foo\"}, an empty string action, or wrong casing (e.g. \"Complete\").","commonSituations":"Typos in the action string; using action names from other engines (e.g. 'assign' instead of 'claim'); client sending null/empty action field.","solutions":["Use one of the exact action values: complete, claim, delegate, resolve","Check casing — values are case-sensitive lowercase constants","Log/inspect the serialized body to confirm what 'action' actually contains"],"exampleFix":"// before\n{\"action\": \"completeTask\"}\n// after\n{\"action\": \"complete\"}","handlingStrategy":"validation","validationCode":"const ACTIONS=['complete','claim','delegate','resolve']; if (!ACTIONS.includes(action)) throw new Error('Unsupported action: '+action);","typeGuard":"function isValidAction(a) { return ['complete','claim','delegate','resolve'].includes(a); }","tryCatchPattern":"catch (e) { if (e.status === 400 && /Invalid action/.test(e.body && e.body.message)) { /* map to a supported action name and retry */ } else throw e; }","preventionTips":["Use the exact lowercase constants complete/claim/delegate/resolve","Keep action names in an enum shared with the API client","Don't reuse action vocabulary from other workflow engines"],"tags":["rest","invalid-argument","task-action","enum"],"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"}