{"record":{"id":"6319a00e47b70c31","repo":"flowable/flowable-engine","slug":"invalid-action-only-execute-is-supported-6319a0","errorCode":null,"errorMessage":"Invalid action, only 'execute' is supported.","messagePattern":"Invalid action, only 'execute' is supported\\.","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/management/JobResource.java","lineNumber":238,"sourceCode":"        try {\n            managementService.deleteHistoryJob(jobId);\n        } catch (FlowableObjectNotFoundException e) {\n            // Re-throw to have consistent error-messaging across REST-api\n            throw new FlowableObjectNotFoundException(\"Could not find a job with id '\" + jobId + \"'.\", Job.class);\n        }\n    }\n\n    @ApiOperation(value = \"Execute a single job\", tags = { \"Jobs\" }, code = 204)\n    @ApiResponses(value = {\n            @ApiResponse(code = 204, message = \"Indicates the job was executed. Response-body is intentionally empty.\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested job was not found.\"),\n            @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.\")\n    })\n    @PostMapping(\"/management/jobs/{jobId}\")\n    @ResponseStatus(HttpStatus.NO_CONTENT)\n    public void executeJobAction(@ApiParam(name = \"jobId\") @PathVariable String jobId, @RequestBody RestActionRequest actionRequest) {\n        if (actionRequest == null || !EXECUTE_ACTION.equals(actionRequest.getAction())) {\n            throw new FlowableIllegalArgumentException(\"Invalid action, only 'execute' is supported.\");\n        }\n        \n        Job job = getJobById(jobId);\n\n        try {\n            managementService.executeJob(job.getId());\n        } catch (FlowableObjectNotFoundException e) {\n            // Re-throw to have consistent error-messaging across REST-api\n            throw new FlowableObjectNotFoundException(\"Could not find a job with id '\" + jobId + \"'.\", Job.class);\n        }\n    }\n\n    @ApiOperation(value = \"Execute a history job\", tags = { \"Jobs\" }, code = 204)\n    @ApiResponses(value = {\n        @ApiResponse(code = 204, message = \"Indicates the job was executed. Response-body is intentionally empty.\"),\n        @ApiResponse(code = 404, message = \"Indicates the requested job was not found.\"),\n        @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.\")\n    })","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/management/JobResource.java#L220-L256","documentation":"POST /management/jobs/{jobId} accepts an action request body, and only the action 'execute' is supported. FlowableIllegalArgumentException is thrown when the body is missing or the action field is anything else. This is an input-validation error, not a job state error.","triggerScenarios":"POSTing to /management/jobs/{jobId} with a body like {\"action\":\"move\"} or {\"action\":\"reschedule\"} (unsupported on this endpoint — those belong to timer jobs), an empty body, or a missing/null action field.","commonSituations":"Copy-pasting timer-job action payloads (move/reschedule) onto the plain job endpoint; omitting Content-Type: application/json so the body deserializes to null; typos like \"Execute\" or \"EXECUTE\" (comparison is case-sensitive).","solutions":["Send a JSON body with exactly {\"action\":\"execute\"}","Set Content-Type: application/json header so the request body is deserialized","For moving/rescheduling a timer job, use POST /management/timer-jobs/{jobId} with action 'move' or 'reschedule'"],"exampleFix":"// before\n{\"action\": \"reschedule\"} -> POST /management/jobs/{jobId}  // 400\n// after\n{\"action\": \"execute\"} -> POST /management/jobs/{jobId}","handlingStrategy":"validation","validationCode":"RestActionRequest req = new RestActionRequest();\nreq.setAction(\"execute\");\nif (!\"execute\".equals(req.getAction())) throw new IllegalArgumentException(\"action must be 'execute'\");","typeGuard":null,"tryCatchPattern":"try {\n    restTemplate.postForLocation(\"/management/jobs/{id}\", new RestActionRequest(\"execute\"), jobId);\n} catch (HttpClientErrorException.BadRequest e) {\n    // invalid action payload\n}","preventionTips":["Always send {\"action\":\"execute\"} — the check is case-sensitive","Set Content-Type: application/json","Use timer-job endpoints for move/reschedule actions"],"tags":["rest-api","flowable","validation","invalid-action"],"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"}