apache/dolphinscheduler · error · IllegalArgumentException
"ConditionResult: is null in taskParam: " + taskParams
Error message
"ConditionResult: is null in taskParam: " + taskParams
What it means
Thrown by SuccessorFlowAdjuster.adjustConditionTaskSuccessorFlow when ConditionsParameters parsed successfully but its conditionResult field is null. The master needs conditionResult (successNode/failedNode branches) to compute which branch to continue and which to skip. A missing conditionResult renders the condition task's routing unusable.
Source
Thrown at dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/SuccessorFlowAdjuster.java:92
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) {
throw new IllegalArgumentException("Switch task params: " + taskParams + " is invalid.");
}
final SwitchParameters.SwitchResult switchResult = switchParameters.getSwitchResult();
if (switchResult == null) {View on GitHub (pinned to 02eac45a1b)
Solutions
- Edit the condition task and configure both success and failed branches so conditionResult is populated.
- Fix the stored taskParams JSON to include conditionResult with successNode and failedNode arrays.
- Re-create the condition task node if its definition is unrecoverable, then relink the DAG edges.
Example fix
// before
{"conditionResult":null}
// after
{"conditionResult":{"successNode":[1001],"failedNode":[1002]}} Defensive patterns
Strategy: validation
Validate before calling
// require conditionResult before running a condition task
ConditionsParameters p = JSONUtils.parseObject(taskInstance.getTaskParams(), ConditionsParameters.class);
if (p == null || p.getConditionResult() == null)
throw new IllegalStateException("Condition task missing conditionResult in params"); Try / catch
try {
adjuster.adjustSuccessorFlow(taskExecution);
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("ConditionResult: is null")) {
// configure success/failed branches for the condition task
} else throw e;
} Prevention
- Always configure both success and failed branches when creating condition tasks.
- Validate saved condition task params include conditionResult with node lists.
- Guard API/script-driven task creation with schema validation.
When it happens
Trigger: A condition task whose taskParams JSON parses but lacks the conditionResult object — e.g. {"conditionResult":null} or params saved without branch configuration.
Common situations: Condition task created programmatically via API without setting conditionResult; partial params from hand-editing; older definitions missing the field after schema changes.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- The branch is empty, please check the switch task configurat
- Condition task params: ${taskParams} is invalid.
- Recover workflow instance failed: %s
- The workflow instance: %s status is %s, cannot repeat runnin
- Repeat running workflow instance failed: %s
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/401e488745b5de98.
Report an issue: GitHub.