{"record":{"id":"da099d458ea2d50f","repo":"flowable/flowable-engine","slug":"illegal-action-request-getaction","errorCode":null,"errorMessage":"Illegal action: '${request.getAction()}'.","messagePattern":"Illegal action: '(.+?)'\\.","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/caze/HistoricCaseInstanceCollectionResource.java","lineNumber":336,"sourceCode":"\n    @ApiOperation(value = \"Post action request to delete a bulk of historic case instances\", tags = {\n            \"Manage History Case Instances\" }, nickname = \"bulkDeleteHistoricCaseInstances\",\n            code = 204)\n    @ApiResponses(value = {\n            @ApiResponse(code = 204, message = \"Indicates the bulk of historic case instances was found and deleted. Response body is left empty intentionally.\"),\n            @ApiResponse(code = 404, message = \"Indicates at least one requested case instance was not found.\")\n    })\n    @PostMapping(value = \"/cmmn-history/historic-case-instances/delete\")\n    @ResponseStatus(value = HttpStatus.NO_CONTENT)\n    public void bulkDeleteHistoricCaseInstances(@ApiParam(name = \"bulkDeleteRestActionRequest\")\n    @RequestBody BulkDeleteInstancesRestActionRequest request) {\n        if (BulkDeleteInstancesRestActionRequest.DELETE_ACTION.equals(request.getAction())) {\n            if (restApiInterceptor != null) {\n                restApiInterceptor.bulkDeleteHistoricCases(request.getInstanceIds());\n            }\n            historyService.bulkDeleteHistoricCaseInstances(request.getInstanceIds());\n        } else {\n            throw new FlowableIllegalArgumentException(\"Illegal action: '\" + request.getAction() + \"'.\");\n        }\n    }\n}\n","sourceCodeStart":318,"sourceCodeEnd":340,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/caze/HistoricCaseInstanceCollectionResource.java#L318-L340","documentation":"FlowableIllegalArgumentException from the bulk delete historic case instances endpoint: the request body's action field is not the expected 'delete' value. The endpoint only supports the DELETE_ACTION constant.","triggerScenarios":"POST to .../historic-case-instances/bulk-delete (or equivalent) with {\"action\":\"remove\",...} or a missing/misspelled action instead of {\"action\":\"delete\",\"instanceIds\":[...]}.","commonSituations":"Client code invents its own action verb; version drift where another bulk endpoint uses a different action string; JSON casing issues (\"Delete\" vs \"delete\").","solutions":["Set action exactly to \"delete\" in the request body","Ensure instanceIds is also present and non-empty","Check the REST API docs for the exact endpoint contract","Compare constant BulkDeleteInstancesRestActionRequest.DELETE_ACTION in your Flowable version"],"exampleFix":"// before\n{\"action\":\"remove\",\"instanceIds\":[\"a\",\"b\"]}\n// after\n{\"action\":\"delete\",\"instanceIds\":[\"a\",\"b\"]}","handlingStrategy":"validation","validationCode":"if (!\"delete\".equals(request.action)) throw new IllegalArgumentException(\"action must be 'delete'\");","typeGuard":"boolean isBulkDeleteAction(String action) { return \"delete\".equals(action); }","tryCatchPattern":"try { ... } catch (FlowableIllegalArgumentException e) {\n  return badRequest(\"Unsupported bulk action: \" + e.getMessage());\n}","preventionTips":["Hardcode action=\"delete\" from the API constant, not free text","Validate the request body against the endpoint schema","Re-check the contract after Flowable upgrades"],"tags":["rest-api","validation","bulk-delete","invalid-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-14T11:17:12.474Z"}