4.1.0
Supported the selection of parameters via a collapsible tree when you add parameters in the Conditional Branch node.
In data development, you may need to use a variable as the judgment condition and establish connections between nodes and upstream nodes or other tasks, thereby flexibly controlling execution prerequisites for downstream nodes.
Example:
When the sales volume of a department reaches a certain threshold, mark the department as excellent.
Determine whether to execute Task 2 based on the execution result (success/failure) of Task 1.
When the number of separated personnel in a department reaches N, mark the department's stability as at risk.
You need to use the Conditional Branch node in conjunction with the Parameter Assignment node. When the parameter value meets a certain condition, the corresponding downstream node(s) will be executed. When the parameter value does not meet a certain condition, the corresponding downstream node(s) will be skipped. The unexecuted downstream node(s) are not considered as a failure and do not affect the overall task execution.
For details about parameter descriptions, see Parameter Overview.
You need to use the Conditional Branch node in conjunction with the Parameter Assignment node. When the parameter value meets a certain condition, the corresponding downstream node(s) will be executed.
Note:
1. If only one parameter value is set as the condition, you can either add a Conditional Branch node and connect it to the Parameter Assignment node or directly use the Conditional Branch node to determine whether to execute the subsequent nodes, as shown in the following figure.
2. If multiple parameter values are set as the conditions, since the Conditional Branch node can only judge one parameter value at a time, you need to place the Conditional Branch node and subsequent nodes to be conditionally executed inside a Loop Container node. The Loop Container node will iterate through all parameter values, as shown in the following figure.
The following figure displays the setting items of the Conditional Branch node.
If the condition is met, the corresponding downstream node(s) will be executed. Otherwise, the node(s) will be skipped.
1. Description of judgment conditions:
After the conditional judgment, the Conditional Branch node will return a Boolean value: TRUE/FALSE.
When the return value is TRUE, the corresponding downstream node(s) will be executed.
When the return value is FALSE, the corresponding downstream node(s) will not be executed.
When the return value is Null, it means that no judgment is performed, and the downstream node(s) will be executed directly.
Built-in parameters are supported in conditional judgment. You can directly input parameter names in Condition Configuration, using the format ${Parameter name}.
Different judgment conditions are provided based on different parameter types:
Text
In, Not In, Contain, Not Contain, Begin with, End with, Not Begin with, Not End with, Null, and Not Null
Date
Between, Not Between, Before, After, Equal to, Not Equal to, Null, and Not Null
Numeric (Integer, Double)
In, Not In, Between, Not Between, Greater Than, Less Than, Greater Than or Equal to, Less Than or Equal to, Null, and Not Null
Boolean
TRUE and FALSE
2. Parameter selection via a collapsible tree:
FineDataLink of V4.1.0 and later versions support parameter selection via a collapsible tree during parameter adding. Available parameter types include Task Parameter, Global Parameter, and Built-in Parameter, as shown in the following figure.
3. Description of constant condition values:
Directly input constant-type condition values that are formatted the same as when they are defined. The following table shows the specific requirements.
Number (Single)
1
Number (Array)
1.4,2.6,4.8,5.6
Separate numbers by commas (,).
Text (Single)
Text 1
Text (Multiple)
'Text1','Text2'
Enclose the text in single quotes ('') and separate them by commas (,).
Here’s an example using text constant values. The specific setting is shown in the following figure.
You need to configure the nodes to be executed after the Conditional Branch node based on actual requirements.
Example: You want to write the corresponding machine maintenance level to another table based on the daily crash times (on the task execution date, which is June 11, 2025).
The example task uses two tables, and their table names and fields are described as follows:
Edown: The number of daily crashes of each machine in a simulated production environment is automatically written into this table.
Estatus: The machine maintenance levels are written to this table every day based on the number of daily crashes in the Edown table. Different numbers of daily crashes correspond to different maintenance levels, which requires conditional judgment.
Machine maintenance levels are described as follows:
If the number of daily crashes is 0, the machine maintenance level is normal.
If the number of daily crashes is greater than 3, the machine maintenance level is critical.
If the number of daily crashes is greater than or equal to 1 and less than or equal to 3, the machine maintenance level is moderate.
Since different numbers of daily crashes correspond to different levels, the machine maintenance level should be determined based on the number of daily crashes. Therefore, it is necessary to output the number of daily crashes as a parameter, so that the subsequent Conditional Branch node can determine the machine maintenance level accordingly.
1. Create a scheduled task, drag in a Parameter Assignment node, and retrieve the number of daily machine crashes, as shown in the following figure.
Click Data Preview, as shown in the following figure.
2. Output the number of daily crashes as a parameter, as shown in the following figure.
3. In Node Remark, enter Obtain the number of crashes today., as shown in the following figure.
1. Drag in an SQL Script node, write the current date and normal level to the Estatus table, and name the node Normal-Level Logging, as shown in the following figure.
2. Drag in another SQL Script node, write the current date and moderate level to the Estatus table, and name the node Moderate-Level Logging, as shown in the following figure.
3. Drag in another SQL Script node, write the current date and critical level to the Estatus table, and name the node Critical-Level Logging, as shown in the following figure.
1. Drag in a Conditional Branch node between the Parameter Assignment node and the SQL Script nodes. Connect the Conditional Branch node to the upstram Parameter Assignment node and the three downstream SQL Script nodes, as shown in the following figure.
Click the Conditional Branch node and three new branches is displayed, each corresponding to one of the downstream nodes. You can set Judgment Condition for each branch to determine which one to run.
2. Set Judgment Condition for the SQL script node named Normal-Level Logging. When the number of crashes is 0, this branch is executed, as shown in the following figure.
Follow the same steps to set Judgment Condition for the other two SQL Script nodes, as shown in the following figure.
Click Run to execute the task. The running result in Log upon successful execution is shown in the following figure.
The number of machine crashes on June 11, 2025 is 2, so only the SQL Script node named Moderate-Level Logging will be executed, while the remaining two SQL Script nodes will be skipped, as shown in the following figure.
The following figure shows the data in the Estatus table.
For details about best practices on the Conditional Branch node, see Using Conditional Branch to Obtain Information About Outstanding Employees.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy