The task orchestration feature of Data Management (DMS) allows you to configure a dependency check node for a task flow. You can specify whether a task flow depends on a node in the same task flow or on another task flow. This topic describes how to configure a dependency check node for a task flow.
Scenarios
Inter-task flow dependency: Task Flow A runs only after Task Flow B succeeds.
For example, Task Flow A runs at 02:00 every Monday to train a recommendation model. Task Flow A runs on top of the business data of the last week (Monday to Sunday) that is generated by Task Flow B. Hence, Task Flow A is dependent on Task Flow B.
Self-dependency: Task Flow A runs only after its previous cycle is complete.
For example, Task Flow A performs data cleansing. It can run only after the previous instance of Task Flow A is complete.
Usage notes
A new task flow must have at least one completed node before the task flow can depend on the node.
Manually triggered task flows: Select a descendant node of the dependency check node for the task flow, and click Test run current node or Start test run from current. The dependency check node for the task flow is skipped, and a record indicating that the test run is successful is generated.
Auto triggered task flows: On the task flow details page, click the icon and select Dry Run.
NoteIn this case, a successful auto triggering record is generated. The task flow is not run.
If a node depends on multiple nodes, you must configure the dependency of the node on other nodes separately. For example, if Node D depends on Nodes A, B, and C, you must configure the dependency of Node D on each of these nodes. The following steps describe how to configure the dependency.
Procedure
- Log on to the DMS console V5.0.
In the top navigation bar, choose .
NoteIf you are using the DMS console in simple mode, move the pointer over the icon in the upper-left corner and choose
.Click the name of the task flow that you want to manage to go to the details page of the task flow.
For more information about how to create a task flow, see Overview.
In the Task Type list on the left side of the canvas, drag the Check for Task Flow Dependency node to the blank area on the canvas.
Double-click the Check for Task Flow Dependency node.
On the configuration page of the Check for Task Flow Dependency node, configure the following parameters.
Parameter
Description
Task Flow
The task flow for which you want to configure a dependency check node. You can search for and select the task flow in the Task Flow field.
NoteIf you select the current task flow, the task flow depends on the result of its previous cycle.
If you select a different task flow, the current task flow depends on the result of the selected task flow.
Dependency Object
The type of the dependency object. Valid values:
Task Flow: The current task flow depends on another task flow.
Single Node: The current task flow depends on an existing node in the task flow.
Dependency Settings
The time settings of the dependency check. The settings include Start Time Offset and End Time Offset.
By default, the start time and end time are offset based on the time in point when the task is executed.
For an auto triggered task flow, the business time is calculated based on the scheduled execution time of the task flow.
For a manually triggered task flow, the business time is calculated based on the time when the task flow is manually triggered.
Dependency configuration examples:
Example 1: Task Flow A, which is scheduled to start daily at 07:00, depends on the last scheduled cycle of Task Flow B, which is scheduled to start daily at 07:00. In the dependency check configuration, the start time offset of Task Flow A remains at 07:00, and its end time offset increases by 1 day.
NoteThe last scheduled cycle ends when the last execution of a task flow is complete. For more information about scheduled execution time, see the "Configure scheduling properties for the task flow" section of the Configure a task flow topic.
Example 2: Task Flow A, which is scheduled to start daily at 08:00, depends on the last scheduled cycle of Task Flow B, which is scheduled to start daily at 07:00. In the dependency check configuration, the start time offset of Task Flow A remains at 08:00, and its end time offset increases by 1 day and decreases by 1 hour.
Example 3: Task Flow A, which is scheduled to start daily at 08:10, depends on the last scheduled cycle of Task Flow B, which is scheduled to start daily at 07:00. In the dependency check configuration, the start time offset of Task Flow A remains at 08:10, and its end time offset increases by 1 day and decreases by 1 hour and 10 minutes.
NoteIn the upper part of the configuration page, click Preview. In the Preview Time dialog box, check whether the time values for the task flow are configured as expected and whether they ensure a successful run of the node.
Check Policy for Database Instances
The check policy for the task flow. Valid values:
Last Round Succeeded: The task flow passes the dependency check after the successful run of the last node that the current task flow depends on.
All Round Succeeded: The task flow passes the dependency check only after the successful run of all the nodes that the current task flow depends on.
Specified Round Succeeded: The task flow passes the dependency check after the successful run of the specified node that the current task flow depends on.
NoteFor a manually triggered task flow, only manually triggered nodes are checked.
For an auto triggered task flow, only auto triggered nodes are checked.
For example, Task Flow A was manually triggered and was never automatically triggered. If you perform a dependency check on Task Flow A, the test run succeeds, but Task Flow A fails to be automatically triggered.
Check Type
The type of the expected check time, including the start time and end time, of the task flow. Valid values:
Run At: The start time and end time are offset based on the time in point when the task is executed.
Business Date: The start time and end time are offset based on the bizdate time variable. The bizdate time variable specifies the day before the time in point when the task is executed.
Click Try Run.
If
status SUCCEEDED
appears in the last line of the execution log, the test run is successful.If
status FAILED
appears in the last line of the execution log, the test run fails.NoteIf the test run fails, you can view the node on which the failure occurs and the reason for the failure in the execution log. Then, you can modify the configuration of the node and try again.