A task flow is a directed acyclic graph (DAG) that consists of one or more tasks. A task flow is the basic unit where data is analyzed. This topic shows you how to create a task flow, create and connect task nodes in the task flow, and then configure the task flow.

Create a task flow

This section describes how to create a task flow.

  1. Log on to the DMS console.
  2. In the top navigation bar, choose Data Factory > Task Orchestration.
  3. In the Free orchestration tasks section of the Task Orchestration tab, click New task flow.
  4. In the New Task Flow dialog box, set the Task Flow Name and Description parameters and click OK.
    New Task Flow

Create and connect task nodes in the task flow

This section describes how to create and connect task nodes in a task flow. You can create one or more tasks in the task flow.

  1. Log on to the DMS console.
  2. In the top navigation bar, choose Data Factory > Task Orchestration.
  3. On the left-side navigation submenu of the Task Orchestration tab, click the Develop Space icon icon.
    Task Orchestration: Develop Space
  4. In the task flow list, double-click the task flow that you created.
    Task flow list
  5. Drag one or more task nodes that you want to create from the left-side task node list to the blank area on the canvas.
    Note For more information about supported task nodes and how to configure a task node, see Task.
    Drag a task node
  6. Optional. Assume that you have created multiple task nodes in the task flow. Move the pointer over a task node on the canvas, click and hold the circle, and then draw a line from the circle to another task node.
    Connect the task nodes
    You can use this method to connect multiple tasks to form a task flow and configure the sequence for running the tasks. The following figure shows a sample task flow. In the task flow, the task a is the first task to be run and the task b is the second. After that, the tasks c and e are run at the same time.Sample task flow

Configure scheduling properties for the task flow

This section describes how to configure scheduling properties for a task flow. You can schedule the task flow to be run as required. For example, you can schedule the task flow to be run by month, week, or day.

  1. On the task orchestration tab of the task flow that you created, click the blank area on the canvas.
  2. In the right-side pane, click the Scheduling tab.
  3. On the tab that appears, set the parameters that are described in the following table.
    Table 1. Scheduling properties
    Parameter Description
    Trigger type The scheduling type of the task flow. Valid values:
    • Cyclic scheduling
    • Schedule once
    Note If you set this parameter to Schedule once, you need only to set the Specific Time parameter.
    Effective Time The time period during which the scheduling properties take effect. The default time period is from January 1, 1970 to January 1, 9999, which indicates that the scheduling properties permanently take effect.
    Scheduling cycle The scheduling cycle of the task flow. Valid values: Hour, Day, Week, and Month.
    Note If you set the Scheduling Cycle parameter to Hour, you must set the Timed Scheduling parameter.
    Timed Scheduling The time that you specify for running the task flow. You can set this parameter in the following ways:
    • Set the Starting Time, Intervals, and End Time parameters.
      • Starting Time: the time when the task flow starts to be run.
      • Intervals: the interval at which the task flow is scheduled to be run. Unit: hours.
      • End Time: the time when the task flow stops running.
      Assume that you set the Starting Time, Intervals, and End Time parameters to 00:00, 6, and 20:59. In this case, Data Management (DMS) schedules the task flow to be run at 00:00, 06:00, 12:00, and 18:00.
    • Set the Specified Time parameter. You can specify a point in time for running the task flow.

    This parameter is displayed only when the Scheduling cycle parameter is set to Hour.

    Specified Time The time for running the task flow based on the scheduling cycle that you specify.

    This parameter is displayed only when the Scheduling cycle parameter is set to Week or Month.

    Specific Time The specific point in time at which the task flow starts to be run.

    This parameter is displayed only when the Scheduling cycle parameter is set to Day, Week, or Month.

    Cron Expression The CRON expression that is automatically generated based on the scheduling cycle and time that you specify.

    For example, you can schedule a task flow to be run at 05:00 every business day, as shown in the following figure.

    Scheduling
  4. Click Save.

Configure basic properties for the task flow

This section describes how to configure basic properties for a task flow. You can configure the basic properties by setting parameters such as Task Flow Name, Owner, and Partner.

  1. On the task orchestration tab of the task flow that you created, click the blank area on the canvas.
  2. In the right-side pane, click the Properties tab.
  3. On the tab that appears, set the parameters that are described in the following table.
    Task flow: Properties tab
    Parameter Description
    Task Flow Name The name of the task flow.
    Owner The owner of the task flow. The owner can edit the task nodes and configurations of the task flow and run tests. The owner receives an alert if the task flow fails.
    Partner The one or more stakeholders of the task flow. The stakeholders can view, but not edit, the task nodes and configurations of the task flow. They can also run tests.
    Note DMS administrators and database administrators (DBAs) are the default stakeholders of each task flow. They can also change the owners of task flows.
    Enable message notification Specifies whether to enable message notification for the task flow.
    Note To enable message notification for a task flow, make sure that a notification rule is configured for the task flow. Only DMS administrators and DBAs can configure notification rules. For more information, see Notification rule management.
  4. Click Save.

View the operation records of the task flow

This section describes how to view the operation records of a task flow.

  1. On the task orchestration tab of the task flow that you created, click the blank area on the canvas.
  2. In the right-side pane, click the Operations tab. You can view all the operation records of the task flow.
    Task flow: Operations tab

Configure variables for the task flow

This section describes how to configure variables for a task flow.

You can use ${Variable name} in SQL statements to specify time. bizdate is the default system variable, which indicates the previous day of the day when a task is run. The value of bizdate is in the yyyy-MM-dd format. You can configure variables for each task in the task flow based on the variables that you configure for the task flow. For more information about the rules and usage of variables, see Task.

  1. On the task orchestration tab of the task flow that you created, click the blank area on the canvas.
  2. In the right-side pane, click the Variables tab.
  3. Set the Variable Name and Variable Rule parameters as required.
  4. Click Save.