{"record":{"id":"716e9c0e541a62f0","repo":"apache/dolphinscheduler","slug":"the-exectype-exectype-is-invalid","errorCode":null,"errorMessage":"The execType: {execType} is invalid","messagePattern":"The execType: (.+?) is invalid","errorType":"exception","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java","lineNumber":197,"sourceCode":"                        .execType(execType)\n                        .warningType(warningType)\n                        .warningGroupId(warningGroupId)\n                        .backfillRunMode(runMode)\n                        .workflowInstancePriority(workflowInstancePriority)\n                        .workerGroup(workerGroup)\n                        .tenantCode(tenantCode)\n                        .environmentCode(environmentCode)\n                        .startParamList(startParams)\n                        .dryRun(Flag.of(dryRun))\n                        .backfillTime(WorkflowUtils.parseBackfillTime(scheduleTime))\n                        .expectedParallelismNumber(expectedParallelismNumber)\n                        .backfillDependentMode(complementDependentMode)\n                        .allLevelDependent(allLevelDependent)\n                        .executionOrder(executionOrder)\n                        .build();\n                return Result.success(execService.backfillWorkflowDefinition(workflowBackFillRequest));\n            default:\n                throw new ServiceException(\"The execType: \" + execType + \" is invalid\");\n        }\n    }\n\n    /**\n     * batch execute workflow instance\n     * If any workflowDefinitionCode cannot be found, the failure information is returned and the status is set to\n     * failed. The successful task will run normally and will not stop\n     *\n     * @param loginUser                 login user\n     * @param workflowDefinitionCodes    workflow definition codes\n     * @param scheduleTime              schedule time\n     * @param failureStrategy           failure strategy\n     * @param startNodeList             start nodes list\n     * @param taskDependType            task depend type\n     * @param execType                  execute type\n     * @param warningType               warning type\n     * @param warningGroupId            warning group id\n     * @param runMode                   run mode","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java#L179-L215","documentation":"ExecutorController.triggerWorkflowDefinition switches on the execType request parameter (RUN, START_PROCESS, REPEAT_RUNNING, RECOVER_SUSPENDED_PROCESS, STOP, PAUSE, SCHEDULER, COMPLEMENT, etc.). Any execType outside the handled enum values hits the default branch and throws ServiceException 'The execType: X is invalid'.","triggerScenarios":"POST /executor/start-check or start-process-with-params style endpoints with an execType value that is not a valid ExecuteType/CommandType enum name (e.g. 'resume', 'RERUN', or lowercase 'run').","commonSituations":"Automation scripts using stale or renamed enum values after a version upgrade; hand-built API calls with misspelled exec types; passing a task-level execute type where a command/exec type is expected.","solutions":["Use an execType value that matches the ExecuteType/CommandType enum exactly (case-sensitive), e.g. START_PROCESS, REPEAT_RUNNING, COMPLEMENT.","Check the enum definitions for the installed DolphinScheduler version — values have been renamed across releases.","Map/normalize the caller's action name to the supported enum before invoking the endpoint."],"exampleFix":"// before\n{\"execType\": \"resume\"}\n// after\n{\"execType\": \"RECOVER_SUSPENDED_PROCESS\"}","handlingStrategy":"validation","validationCode":"ExecuteType type;\ntry {\n    type = ExecuteType.valueOf(execType.trim().toUpperCase());\n} catch (IllegalArgumentException e) {\n    throw new IllegalArgumentException(\"Unsupported execType: \" + execType);\n}\n// then call the endpoint with type.name()","typeGuard":"boolean isValidExecType(String s) {\n    for (ExecuteType t : ExecuteType.values()) {\n        if (t.name().equals(s)) return true;\n    }\n    return false;\n}","tryCatchPattern":"try {\n    executorService.triggerWorkflowDefinition(...);\n} catch (ServiceException e) {\n    if (e.getMessage().startsWith(\"The execType\")) {\n        log.error(\"execType not supported by this version: {}\", e.getMessage());\n    }\n}","preventionTips":["Use enum .name() values from the installed version's ExecuteType/CommandType, not free-text verbs.","Re-check enum names after upgrading DolphinScheduler.","Reject invalid exec types in client code before hitting the API."],"tags":["rest-api","enum","invalid-enum-value","executor"],"backgroundTag":"invalid-enum-value","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}