apache/dolphinscheduler · error · java.lang.IllegalArgumentException
Condition task params: ${taskParams} is invalid.
Error message
Condition task params: ${taskParams} is invalid. What it means
Thrown by SuccessorFlowAdjuster.adjustConditionTaskSuccessorFlow when the condition task instance's taskParams JSON cannot be parsed into a ConditionsParameters object (JSONUtils.parseObject returns null). The master needs the conditions params to decide which successors to skip; unparseable params mean the task definition is corrupt or empty. It aborts successor adjustment with IllegalArgumentException.
Source
Thrown at dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/SuccessorFlowAdjuster.java:88
}
final String taskType = taskExecution.getTaskInstance().getTaskType();
if (TaskTypeUtils.isConditionTask(taskType)) {
adjustConditionTaskSuccessorFlow(taskExecution);
return;
}
if (TaskTypeUtils.isSwitchTask(taskType)) {
adjustSwitchTaskSuccessorFlow(taskExecution);
return;
}
}
private void adjustConditionTaskSuccessorFlow(final ITaskExecution taskExecution) {
final String taskParams = taskExecution.getTaskInstance().getTaskParams();
final ConditionsParameters conditionsParameters = JSONUtils.parseObject(taskParams, ConditionsParameters.class);
if (conditionsParameters == null) {
throw new IllegalArgumentException("Condition task params: " + taskParams + " is invalid.");
}
final ConditionsParameters.ConditionResult conditionResult = conditionsParameters.getConditionResult();
if (conditionResult == null) {
throw new IllegalArgumentException("ConditionResult: is null in taskParam: " + taskParams);
}
final List<Long> needSkippedBranch;
if (conditionResult.isConditionSuccess()) {
needSkippedBranch = conditionResult.getFailedNode();
} else {
needSkippedBranch = conditionResult.getSuccessNode();
}
markTaskSkipped(taskExecution, needSkippedBranch);
}
private void adjustSwitchTaskSuccessorFlow(final ITaskExecution taskExecution) {
final String taskParams = taskExecution.getTaskInstance().getTaskParams();
final SwitchParameters switchParameters = JSONUtils.parseObject(taskParams, SwitchParameters.class);
if (switchParameters == null) {View on GitHub (pinned to 02eac45a1b)
Solutions
- Inspect the condition task's taskParams in the DB (t_ds_task_definition) and fix the JSON to match ConditionsParameters (conditionResult with successNode/failedNode lists).
- Re-save the condition task through the UI so valid params are generated, then re-run the workflow.
- If a version upgrade changed the params schema, migrate old task definitions to the current format.
Example fix
// before: invalid taskParams
""
// after: valid ConditionsParameters JSON
{"conditionResult":{"successNode":[1001],"failedNode":[1002],"dependTaskList":[],"relation":"AND"}} Defensive patterns
Strategy: validation
Validate before calling
// validate condition taskParams parse before execution
ConditionsParameters p = JSONUtils.parseObject(taskInstance.getTaskParams(), ConditionsParameters.class);
if (p == null) throw new IllegalStateException("Invalid condition task params: " + taskInstance.getTaskParams()); Try / catch
try {
adjuster.adjustSuccessorFlow(taskExecution);
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Condition task params:")) {
// repair taskParams for this condition task instance
} else throw e;
} Prevention
- Never hand-edit taskParams in the DB without validating JSON shape.
- Use the UI/API to create condition tasks so params are serialized correctly.
- Check params schema after upgrading DolphinScheduler versions.
When it happens
Trigger: A condition task instance whose stored taskParams is null, empty, or not valid JSON for ConditionsParameters when the adjuster runs after the task finishes.
Common situations: Manually edited taskParams in the DB; API calls that save condition tasks with malformed params; schema drift where the params JSON structure changed between versions; empty params from a failed task save.
Understand the failure class
Background: "failed to unmarshal" / json.Unmarshal errors: why parsing a response into a Go struct fails and how to fix it — this error's family across 23 libraries.
Related errors
- Failed to parse Condition task params: {taskParams}
- "ConditionResult: is null in taskParam: " + taskParams
- "Switch task params: " + taskParams + " is invalid."
- itemsList is null
- headerParams is not a valid json
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/e8f807a0b62ba214.
Report an issue: GitHub.