{"record":{"id":"401e488745b5de98","repo":"apache/dolphinscheduler","slug":"conditionresult-is-null-in-taskparam-taskpa","errorCode":null,"errorMessage":"\"ConditionResult: is null in taskParam: \" + taskParams","messagePattern":"\"ConditionResult: is null in taskParam: \" \\+ taskParams","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/SuccessorFlowAdjuster.java","lineNumber":92,"sourceCode":"            adjustConditionTaskSuccessorFlow(taskExecution);\n            return;\n        }\n\n        if (TaskTypeUtils.isSwitchTask(taskType)) {\n            adjustSwitchTaskSuccessorFlow(taskExecution);\n            return;\n        }\n    }\n\n    private void adjustConditionTaskSuccessorFlow(final ITaskExecution taskExecution) {\n        final String taskParams = taskExecution.getTaskInstance().getTaskParams();\n        final ConditionsParameters conditionsParameters = JSONUtils.parseObject(taskParams, ConditionsParameters.class);\n        if (conditionsParameters == null) {\n            throw new IllegalArgumentException(\"Condition task params: \" + taskParams + \" is invalid.\");\n        }\n        final ConditionsParameters.ConditionResult conditionResult = conditionsParameters.getConditionResult();\n        if (conditionResult == null) {\n            throw new IllegalArgumentException(\"ConditionResult: is null in taskParam: \" + taskParams);\n        }\n        final List<Long> needSkippedBranch;\n        if (conditionResult.isConditionSuccess()) {\n            needSkippedBranch = conditionResult.getFailedNode();\n        } else {\n            needSkippedBranch = conditionResult.getSuccessNode();\n        }\n        markTaskSkipped(taskExecution, needSkippedBranch);\n    }\n\n    private void adjustSwitchTaskSuccessorFlow(final ITaskExecution taskExecution) {\n        final String taskParams = taskExecution.getTaskInstance().getTaskParams();\n        final SwitchParameters switchParameters = JSONUtils.parseObject(taskParams, SwitchParameters.class);\n        if (switchParameters == null) {\n            throw new IllegalArgumentException(\"Switch task params: \" + taskParams + \" is invalid.\");\n        }\n        final SwitchParameters.SwitchResult switchResult = switchParameters.getSwitchResult();\n        if (switchResult == null) {","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/SuccessorFlowAdjuster.java#L74-L110","documentation":"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.","triggerScenarios":"A condition task whose taskParams JSON parses but lacks the conditionResult object — e.g. {\"conditionResult\":null} or params saved without branch configuration.","commonSituations":"Condition task created programmatically via API without setting conditionResult; partial params from hand-editing; older definitions missing the field after schema changes.","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."],"exampleFix":"// before\n{\"conditionResult\":null}\n// after\n{\"conditionResult\":{\"successNode\":[1001],\"failedNode\":[1002]}}","handlingStrategy":"validation","validationCode":"// require conditionResult before running a condition task\nConditionsParameters p = JSONUtils.parseObject(taskInstance.getTaskParams(), ConditionsParameters.class);\nif (p == null || p.getConditionResult() == null)\n    throw new IllegalStateException(\"Condition task missing conditionResult in params\");","typeGuard":null,"tryCatchPattern":"try {\n    adjuster.adjustSuccessorFlow(taskExecution);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"ConditionResult: is null\")) {\n        // configure success/failed branches for the condition task\n    } else throw e;\n}","preventionTips":["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."],"tags":["workflow","condition-task","config"],"backgroundTag":"missing-required-config-field","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"}