Execution Judgement

  • Last update: July 10, 2025
  • Overview

    Application Scenario

    You want to customize the error-handling process when a scheduled task fails. For example, you may want FineDataLink to send notifications to the WeCom group when a scheduled task fails.

    Function Overview

    The following figure explains the function.

    1.2(英.jpeg

    Function Description

    The node at the start of the connector is the upstream node, and the node at the end of the connector is the downstream node.

    Node Connector Configuration

    Right-click a connector on the scheduled task editing page and configure the execution condition, with options including Execute Unconditionally, Execute on Success, and Execute on Failure provided, as shown in the following figure.

    2.1.png

    The following table describes the details.

    iconNote:
    The execution condition is set to Execute on Success by default.
    OptionDescription

    Execute Unconditionally

    The downstream node is executed regardless of whether the upstream node succeeds or fails.

    Execute on Success

    The downstream node is executed when the upstream node succeeds.

    Execute on Failure

    The downstream node is executed when the upstream node fails.

    Execution Judgment

    Right-click a node on the scheduled task editing page and click Execution Judgment. You can customize how multiple execution conditions take effect (All or Any) to control node dependencies in the task flexibly, as shown in the following figure.

    2.2.gif

    When a downstream node is connected to multiple upstream nodes, click Execution Judgment and select All or Any from the dropdown list. The two options correspond to AND logic and OR logic, respectively.

    • AND logic: The execution of the downstream node is triggered only when the execution results of all upstream nodes meet the execution condition of the connectors.

    • OR logic: The execution of the downstream node is triggered when the execution result of any upstream node meets the execution condition of the connector. (The judgment condition is configured at the downstream node.)

    Overall Execution Strategy

    1. When a downstream node is connected to an upstream node, the execution of the downstream node is triggered if the execution result of the upstream node meets the execution condition of the connector between them.

    2. When a downstream node is connected to multiple upstream nodes, the execution judgment is triggered after all upstream nodes complete execution, and the execution of the downstream node follows the selected logic:

    • AND logic: The execution of the downstream node is triggered only when the execution results of all upstream nodes meet the execution condition of the connectors.

    • OR logic: The execution of the downstream node is triggered when the execution result of any upstream node meets the execution condition of the connector. (The judgment condition is configured at the downstream node.)

    3. The downstream node of a Conditional Branch node only allows setting Execution Judgment to Execute on Success. Execute on Failure and Execute Unconditionally are grayed out and cannot be selected.

    • If the execution condition of the connector is set to Execute on Success and the execution result of the Conditional Branch node meets the configured judgment condition, the execution of the corresponding downstream node will be triggered.

    • If the execution condition of the connector is Execute on Success, but the execution result of the Conditional Branch node does not meet the configured judgment condition, the downstream node will skip execution.

    4. The Execution Judgment of an upstream Virtual Node is Execute on Success by default. Execute on Failure and Execute Unconditionally are grayed out and cannot be selected. Once triggered, the execution of a Virtual Node is always successful.

    Scenario Example

    1-to-N Scenario Description

    The following figure shows the design of a scheduled task.

    2.4.1(英.jpeg

    Nodes A, B, C, and D form a 1-to-N scenario. The following table describes their execution strategies.

    iconNote:
    Node A is not a Conditional Branch node.
    Execution Result of Node ANode B (Connected to Node A, with the Execution Condition Set to Execute on Success)Node C (Connected to Node A, with the Execution Condition Set to Execute on Failure)Node D (Connected to Node A, with the Execution Condition Set to Execute Unconditionally)

    The execution fails.

    The execution is not triggered.

    The execution is triggered.

    The execution is triggered.

    The execution succeeds.

    The execution is triggered.

    The execution is not triggered.

    The execution is triggered.

    The execution is terminated.

    For example, you stop the task when Node A starts execution.

    The execution is not triggered.

    The execution is not triggered.

    The execution is not triggered.

    The execution is skipped. For example:

    1. The upstream node of Node A is not a Conditional Branch node, and the execution result of the upstream node does not meet the execution condition of the connector between the two nodes.

    2. The upstream node of Node A is a Conditional Branch node, and it determines to skip Node A after a conditional judgment.

    The execution is not triggered.

    The execution is not triggered.

    The execution is not triggered.

    N-to-1 Scenario Description

    The following figure shows the design of an ETL task.

    2.4.2-2(英.jpeg

    Nodes A, B, C, and D form an N-to-1 scenario. The following table describes their execution strategies.

    iconNote:

    1. Nodes A, B, and C are not Conditional Branch nodes. The execution judgment on Node D is triggered after all its upstream nodes complete execution.

    2. Regardless of how many upstream nodes are connected to Node D, or what execution judgment is configured for their connectors, Node D will only be executed once during each task execution.

    Logic for Execution Conditions to Take EffectActual Execution Results of Nodes A/B/CNode D

    AND

    The execution results of nodes A, B, and C all meet the execution conditions configured at Node D.

    The execution is triggered.

    Any of the execution results of nodes A, B, or C does not meet the execution conditions configured at Node D.

    iconNote:
    If one of nodes A/B/C is skipped during execution, the skipped node will not be included in the execution judgment on Node D.

    The execution is not triggered.

    OR

    Any of the execution results of nodes A, B, or C meet the execution conditions configured at Node D.

    The execution is triggered.

    None of the execution results of nodes A, B, and C meet the execution conditions configured at Node D.

    The execution is not triggered.

    Scenario: Node H will be executed if at least one upstream chain (A-D, B-E, or C-F) succeeds, as shown in the following figure.

    2.4.2-2(英.jpeg

    If you want Node H to be executed only after nodes D, E, and F are all executed successfully, you can use the following methods.

    Method One: Add a Conditional Branch node before Node H and reference the parameter Node Name.opresult (whose output value is success if the node is executed successfully) to determine whether to execute Node H.

    Method Two: Set the logic for multiple execution conditions to take effect to All at Node H, as shown in the following figure. For details, see the "Execution Judgment Introduction" section.

    2.4.2-3.png

    N-to-N Scenario Description

    The execution condition of connectors in chains A-C, A-D, B-C, and B-D is set to Execute on Success, Execute on Failure, Execute on Success, and Execute on Failure, respectively. Multiple conditions are evaluated with AND logic, as shown in the following figure.

    2.4.3.png

    Execution strategy: When both Node A and Node B succeed, Node C will be executed and Node D will not be executed. When both Node A and Node B fail, Node D will be executed and Node C will not be executed. When Node A succeeds and Node B fails, neither Node C nor Node D will be executed.

    Compatibility Instruction

    By default, the execution condition on all node connectors is set to Execute on Success, and multiple execution conditions are evaluated with AND.

    Example

    Example: If the upstream node runs successfully, its downstream node will be executed. If the upstream node fails to run, the system will send a notification message.

    Preparation

    1. Create a scheduled task, drag in a Data Synchronization node, name it Data Extraction from the Sales Table, set Data Source to Sales, and extract all data of the North China region in the table. Next, configure Data Destination and Mapping. To store the extracted data in a new table, set Target Table to Auto Created Table and name the table Sale, as shown in the following figure.

    3.1-1.png

    2. Add an SQL Script node, connect it to the Data Synchronization node, and name it Sales_Sum. Select SQLite as the data source, choose FDLDemo as the data connection, and enter the SQL statement to create the Sales_Sum table, as shown in the following figure.

    CREATE TABLE `Sales_Sum` (
      `Area` TEXT DEFAULT NULL,
      `Salesman` TEXT DEFAULT NULL,
      `Sales` REAL DEFAULT NULL
    );

    3.1-2.png

    3. Add another SQL Script node, connect it to the Sales_Sum node, and name it Data Filtering. Select SQLite as the data source, choose FDLDemo as the data connection, and enter the SQL statement to insert data with sales volume greater than 600 from Sale into Sales_Sum, as shown in the following figure.

    INSERT INTO `Sales_Sum` (Area, Salesman, Sales)
    SELECT Area, Name, Sales 
    FROM `Sale` 
    WHERE Sales > 600;

    3.1-3.png

    Adding a Notification Node

    1. Add a Notification node and connect it to the Sales_Sum node.

    2. Right-click the connector between the Notification node and the Sales_Sum node, and click Execute on Failure, as shown in the following figure.

    3.2-1.png

    3. The following figure shows the setting page of the Notification node.

    3.2-2(1).png

    Running the Task

    Sales_Sum Node Running Successfully

    Click Run in the upper left corner, as shown in the following figure.

    The Sales_Sum node is then executed successfully, and the Notification node is skipped.

    3.3.1-1.png

    Two tables are generated in the SQLite database:

    Sale:

    3.3.1-2.png

    Sales_Sum:

    3.3.1-3.png

    Sales_Sum Node Failing to Run

    1. Modify the SQL statement in the Sales_Sum node to make it invalid, as shown in the following figure.

    3.3.2-1.png

    2. Click Run in the upper-left corner, as shown in the following figure.

    The Sales_Sum node fails to run, and the Notification node runs successfully.

    3.3.2-2.png

    In the WeCom group, the notification message is sent to the set group members, as shown in the following figure.

     3.3.2-3(英.jpeg

    附件列表


    主题: Data Development - Scheduled Task
    Previous
    Next
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy