All Products
Search
Document Center

Data Management:Configure a conditional branch node

Last Updated:Mar 28, 2026

A conditional branch node adds conditional logic to a task flow: downstream tasks run only when the conditional expression evaluates to true. If the expression evaluates to false, the downstream tasks are skipped.

Important

A conditional branch node cannot exist on its own. Connect it to an upstream node that performs data integration, data processing, or a status check. Without an upstream connection, the node configuration has no effect.

Use cases

  • Back up and delete data when the number of data entries reaches a specified value.

  • Send a notification when the sales amount meets a specified condition.

  • Check whether a specific file exists; if not, create it.

Prerequisites

Before you begin, ensure that you have:

  • A task flow in DMS. To create one, see Overview.

Add and configure a conditional branch node

  1. Log on to the DMS console V5.0.

  2. In the top navigation bar, choose Data+AI > Data+AI > Task Orchestration.

    Note

    In simple mode, move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner and choose All Features > Data+AI > Data Development > Task Orchestration.

  3. Click the name of the task flow you want to edit.

  4. In the Task Type list on the left side of the canvas, drag the Conditional Branch node to the canvas.

  5. Double-click the Conditional Branch node to open its configuration tab.

  6. Configure one or more conditional expressions:

    • From the Variable Name drop-down list, select an upstream variable or a state.

      Note
      • To view available upstream variables and task states, click the Variable Setting tab in the right-side navigation pane and go to the Input Variables tab.

      • If you select a state, the Relational Operator and Variable Value fields are not required.

    • From the Relational Operator drop-down list, select a comparison operator.

    • In the Variable Value field, enter the expected value. Use the ${var_name} format for variables.

      You can reference three types of variables:

      Variable typeDescriptionWhere to find it
      Upstream variableOutput variables from upstream nodesVariable Setting tab > Input Variables tab
      System variableBuilt-in system variablesVariable Setting tab > Input Variables tab. See System variables.
      Time variableDefault time variables or task flow variablesSee Configure time variables.
    • (Optional) Add, nest, or remove expressions using the icons to the right of each expression:

      • 加: Create an expression at the same level. Select a logical operator to combine it with the existing expression.

      • 5加4: Create an expression and move it to the next level together with the current expression. Select a logical operator to combine the two.

      • 减: Delete the expression.

    • Note
      • Expressions support up to three nesting levels.

      • The Preview section to the right of the Conditional Expression section shows the combined judgment logic as you build expressions.

      • To use output variables from an SQL assignment node or an Elastic Compute Service (ECS) remote commands node, see Configure an SQL assignment node and Configure an ECS remote commands node.

    9任务编排条件表达式2

How the AND and OR relationships affect the task flow result

When a task flow contains multiple conditional branch nodes, the relationship between those branches determines how DMS evaluates the overall task flow result.

RelationshipCondition evaluates to false (branch skipped)Condition evaluates to true (branch executed)
ANDDMS marks the entire task flow as failed, even if all other nodes run successfully.
ORDMS marks the entire task flow as successful, even if other branches are not executed.

In an OR-relationship task flow, you can force a specific branch to succeed by setting its conditional expression to whether to successfully run a conditional branch node = true (for example, on conditional branch node 3). When that branch executes successfully, DMS marks the entire task flow as successful.

What's next