apache/dolphinscheduler · error · IllegalArgumentException
invalid status : <executionType>
Error message
invalid status : <executionType>
What it means
WorkflowExecutionTypeEnum.of(int) maps a workflow execution-type code (SERIAL, PARALLEL, etc.) to the enum. It throws IllegalArgumentException when the executionType integer is not present in EXECUTION_STATUS_MAP, meaning the execution type code is unknown to this DolphinScheduler version.
Source
Thrown at dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/WorkflowExecutionTypeEnum.java:55
}
@EnumValue
private final int code;
private final String descp;
private static HashMap<Integer, WorkflowExecutionTypeEnum> EXECUTION_STATUS_MAP = new HashMap<>();
static {
for (WorkflowExecutionTypeEnum executionType : WorkflowExecutionTypeEnum.values()) {
EXECUTION_STATUS_MAP.put(executionType.code, executionType);
}
}
public static WorkflowExecutionTypeEnum of(int executionType) {
if (EXECUTION_STATUS_MAP.containsKey(executionType)) {
return EXECUTION_STATUS_MAP.get(executionType);
}
throw new IllegalArgumentException("invalid status : " + executionType);
}
public boolean isSerial() {
return this != PARALLEL;
}
}
View on GitHub (pinned to 02eac45a1b)
Solutions
- Check the executionType value against the enum's defined codes and use WorkflowExecutionTypeEnum constants or valueOf by name in code.
- Re-export/re-import the workflow definition from a matching DolphinScheduler version, or fix the execution_type column to a valid code.
- Validate definitions at import time: reject or default unknown executionType values before persistence.
Example fix
// before
WorkflowExecutionTypeEnum t = WorkflowExecutionTypeEnum.of(def.getExecutionType());
// after
WorkflowExecutionTypeEnum t = Arrays.stream(WorkflowExecutionTypeEnum.values())
.filter(e -> e.getCode() == def.getExecutionType())
.findFirst()
.orElseThrow(() -> new IllegalArgumentException(
"Unknown workflow execution type: " + def.getExecutionType() +
" for workflow " + def.getName())); Defensive patterns
Strategy: validation
Validate before calling
boolean isValidExecutionType(int code) {
return Arrays.stream(WorkflowExecutionTypeEnum.values()).anyMatch(e -> e.getCode() == code);
} Try / catch
try {
WorkflowExecutionTypeEnum t = WorkflowExecutionTypeEnum.of(code);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Invalid executionType " + code + " in definition " + name + "; valid: " + Arrays.toString(WorkflowExecutionTypeEnum.values()));
} Prevention
- Use enum constants (WorkflowExecutionTypeEnum.SERIAL.getCode()) when building definitions.
- Validate executionType at workflow import time before persisting.
- Re-export definitions when moving between DolphinScheduler versions.
When it happens
Trigger: Calling WorkflowExecutionTypeEnum.of(executionType) with an int outside the enum's codes — typically when deserializing a workflow definition (e.g. from DB or imported JSON) whose executionType field holds an invalid/legacy value.
Common situations: Importing workflow definitions exported from a different version; hand-edited JSON/YAML definitions; DB migration gaps where execution_type column values were renamed.
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
- requestType is not a valid value
- contentType is not a valid value
- The execType: {execType} is invalid
- The releaseState {releaseState} is illegal, please check it.
- Recover workflow instance failed: %s
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/ef0d70366f1e896c.
Report an issue: GitHub.