apache/dolphinscheduler · error · ServiceException

The execType: {execType} is invalid

Error message

The execType: {execType} is invalid

What it means

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'.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java:197

                        .execType(execType)
                        .warningType(warningType)
                        .warningGroupId(warningGroupId)
                        .backfillRunMode(runMode)
                        .workflowInstancePriority(workflowInstancePriority)
                        .workerGroup(workerGroup)
                        .tenantCode(tenantCode)
                        .environmentCode(environmentCode)
                        .startParamList(startParams)
                        .dryRun(Flag.of(dryRun))
                        .backfillTime(WorkflowUtils.parseBackfillTime(scheduleTime))
                        .expectedParallelismNumber(expectedParallelismNumber)
                        .backfillDependentMode(complementDependentMode)
                        .allLevelDependent(allLevelDependent)
                        .executionOrder(executionOrder)
                        .build();
                return Result.success(execService.backfillWorkflowDefinition(workflowBackFillRequest));
            default:
                throw new ServiceException("The execType: " + execType + " is invalid");
        }
    }

    /**
     * batch execute workflow instance
     * If any workflowDefinitionCode cannot be found, the failure information is returned and the status is set to
     * failed. The successful task will run normally and will not stop
     *
     * @param loginUser                 login user
     * @param workflowDefinitionCodes    workflow definition codes
     * @param scheduleTime              schedule time
     * @param failureStrategy           failure strategy
     * @param startNodeList             start nodes list
     * @param taskDependType            task depend type
     * @param execType                  execute type
     * @param warningType               warning type
     * @param warningGroupId            warning group id
     * @param runMode                   run mode

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Use an execType value that matches the ExecuteType/CommandType enum exactly (case-sensitive), e.g. START_PROCESS, REPEAT_RUNNING, COMPLEMENT.
  2. Check the enum definitions for the installed DolphinScheduler version — values have been renamed across releases.
  3. Map/normalize the caller's action name to the supported enum before invoking the endpoint.

Example fix

// before
{"execType": "resume"}
// after
{"execType": "RECOVER_SUSPENDED_PROCESS"}
Defensive patterns

Strategy: validation

Validate before calling

ExecuteType type;
try {
    type = ExecuteType.valueOf(execType.trim().toUpperCase());
} catch (IllegalArgumentException e) {
    throw new IllegalArgumentException("Unsupported execType: " + execType);
}
// then call the endpoint with type.name()

Type guard

boolean isValidExecType(String s) {
    for (ExecuteType t : ExecuteType.values()) {
        if (t.name().equals(s)) return true;
    }
    return false;
}

Try / catch

try {
    executorService.triggerWorkflowDefinition(...);
} catch (ServiceException e) {
    if (e.getMessage().startsWith("The execType")) {
        log.error("execType not supported by this version: {}", e.getMessage());
    }
}

Prevention

When it happens

Trigger: 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').

Common situations: 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.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/716e9c0e541a62f0. Report an issue: GitHub.