{"record":{"id":"010faeced8f9ad62","repo":"flowable/flowable-engine","slug":"invalid-action-only-execute-is-supported","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-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/management/JobResource.java","lineNumber":220,"sourceCode":"        try {\n            managementService.deleteDeadLetterJob(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 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(\"/cmmn-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 single job action (move or reschedule)\", tags = { \"Jobs\" }, code = 204)\n    @ApiResponses(value = {\n            @ApiResponse(code = 204, message = \"Indicates the timer job action 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":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/management/JobResource.java#L202-L238","documentation":"Thrown by POST /cmmn-management/jobs/{jobId} when the action request body is missing or its 'action' field is not the only supported value 'execute'. FlowableIllegalArgumentException means the request itself is invalid — a 400-class client error, not a job state problem.","triggerScenarios":"POST /cmmn-management/jobs/{jobId} with an empty body, or {\"action\":\"move\"|\"reschedule\"|\"kill\"} — anything other than exactly 'execute'.","commonSituations":"Copy-pasting action bodies from the BPMN REST API (which supports move/reschedule) into the CMMN API; misspelled 'action' field; calling with no JSON body at all.","solutions":["Send {\"action\":\"execute\"} exactly as the body.","Use the timer-job move/reschedule endpoints instead if you intended a move or reschedule action.","Serialize the body explicitly — ensure the HTTP client actually sends the JSON (no empty body)."],"exampleFix":"// before\npost(\"/cmmn-management/jobs/\" + jobId, {\"action\": \"reschedule\"});\n// after\npost(\"/cmmn-management/jobs/\" + jobId, {\"action\": \"execute\"});","handlingStrategy":"validation","validationCode":"if (body == null || !\"execute\".equals(body.getAction())) {\n    throw new IllegalArgumentException(\"action must be 'execute' for CMMN jobs\");\n}","typeGuard":null,"tryCatchPattern":"try { post(\"/cmmn-management/jobs/\" + jobId, body); }\ncatch (HttpClientErrorException.Conflict | HttpClientErrorException.BadRequest e) { /* invalid action — fix body */ }","preventionTips":["Always send exactly {\"action\":\"execute\"} for CMMN jobs","Don't reuse BPMN REST action bodies (move/reschedule) against the CMMN API","Ensure the HTTP client actually serializes the body"],"tags":["flowable","rest-api","invalid-action","validation"],"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"}