{"record":{"id":"5987db0908624c5d","repo":"flowable/flowable-engine","slug":"invalid-action-only-move-or-reschedule-are-su","errorCode":null,"errorMessage":"Invalid action, only 'move' or 'reschedule' are supported.","messagePattern":"Invalid action, only 'move' or 'reschedule' are 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":243,"sourceCode":"        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    })\n    @PostMapping(\"/cmmn-management/timer-jobs/{jobId}\")\n    @ResponseStatus(HttpStatus.NO_CONTENT)\n    public void executeTimerJobAction(@ApiParam(name = \"jobId\") @PathVariable String jobId, @RequestBody TimerJobActionRequest actionRequest) {\n        if (actionRequest == null || !(MOVE_ACTION.equals(actionRequest.getAction()) || RESCHEDULE_ACTION.equals(actionRequest.getAction()))) {\n            throw new FlowableIllegalArgumentException(\"Invalid action, only 'move' or 'reschedule' are supported.\");\n        }\n        \n        Job job = getTimerJobById(jobId);\n\n        if (MOVE_ACTION.equals(actionRequest.getAction())) {\n            try {\n                managementService.moveTimerToExecutableJob(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 timer job with id '\" + jobId + \"'.\", Job.class);\n            }\n        } else if (RESCHEDULE_ACTION.equals(actionRequest.getAction())) {\n            if (actionRequest.getDueDate() == null) {\n                throw new FlowableIllegalArgumentException(\"Invalid reschedule timer action. Reschedule timer actions must have a valid due date\");\n            }\n            try {\n                managementService.rescheduleTimeDateValueJob(job.getId(), actionRequest.getDueDate());\n            } catch (FlowableObjectNotFoundException e) {","sourceCodeStart":225,"sourceCodeEnd":261,"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#L225-L261","documentation":"The CMMN REST API timer-job action endpoint only supports the 'move' and 'reschedule' actions. Flowable throws FlowableIllegalArgumentException when the request body is missing or its 'action' field is anything else. It is a client-side request validation error, not an engine failure.","triggerScenarios":"POST /cmmn-management/timer-jobs/{jobId} with a null/empty body, or with an action value other than exactly 'move' or 'reschedule' (e.g. 'execute', 'Move', 'retry').","commonSituations":"Copy-pasting request payloads from the BPMN REST API or deadletter-job endpoint (which use different action names), case mismatches, or omitting the JSON body entirely.","solutions":["Set the request body's action field to exactly 'move' or 'reschedule'","Ensure the JSON body is actually sent and deserialized (Content-Type: application/json, non-null body)","Check API docs / Swagger for the endpoint's accepted actions before calling"],"exampleFix":"// before\ncurl -X POST /cmmn-management/timer-jobs/42 -d '{\"action\":\"execute\"}'\n// after\ncurl -X POST /cmmn-management/timer-jobs/42 -d '{\"action\":\"reschedule\",\"dueDate\":\"2026-01-01T10:00:00Z\"}'","handlingStrategy":"validation","validationCode":"const allowed = ['move','reschedule'];\nif (!body || !allowed.includes(body.action)) throw new Error(\"action must be 'move' or 'reschedule'\");","typeGuard":"function isValidTimerAction(a) { return a === 'move' || a === 'reschedule'; }","tryCatchPattern":"try { await post(`/cmmn-management/timer-jobs/${id}`, body); }\ncatch (e) { if (e.status === 400 && /Invalid action/.test(e.message)) { /* fix action field */ } else throw e; }","preventionTips":["Keep a constants map of valid actions per endpoint","Always send an explicit JSON body with Content-Type: application/json","Consult the endpoint's Swagger definition before scripting"],"tags":["rest","validation","bad-request"],"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"}