Modeling Guide

Create a Task Workflow

A task workflow orchestrates multiple tasks and executes them in a given order.

Prerequisites

You have created and activated at least one task in the same project in which you are creating the task workflow.

Context

Modeling and executing a task workflow in SAP Data Hub helps set data flow across the landscape in a logical order. You can also define some conditions for the tool to trigger the task workflow execution. For example, you can schedule an immediate execution of the task workflow, schedule an execution for a specific date and time, or schedule a recurring execution of the task workflow.

Procedure

  1. Start the SAP Data Hub cockpit in a Web browser.
  2. In the System Status section, choose the Modeling tile.
    The cockpit opens the SAP Data Hub Modeling tool in a new tab in the same browser window.
  3. Create a task workflow.
    1. In the navigation pane, right-click the project within which you want to create the task workflow and choose Start of the navigation pathNew Next navigation step Task WorkflowEnd of the navigation path.
    2. In the New Task Workflow dialog box, provide a name for the task workflow.
    3. Choose Create.
    The tool opens a new task workflow editor where you can define your task workflow. The editor, by default, inserts a Task Workflow node and a Trigger node.
  4. Add new tasks.
    1. In the editor toolbar, choose New Task to add a task to the task workflow.
      By default, the tool inserts a task of the type, SAP BW Process Chain to the task workflow editor.
    2. On the task node, choose (Show Properties).
      The tool opens a dialog box where you can define the required task type and task reference.
    3. In the TaskType dropdown list, select the required task type.
    4. In the Reference dropdown list, select the task that you want to add to the task workflow.
      The tool populates the Reference dropdown list with all tasks, which are of the selected task type and are from the same project in which you are creating the task workflow.
    5. If you want to open the task to view or edit the task, choose Open.
      In a new tab, the tool opens the task in a task editor.
    6. Choose OK.
      A single task workflow can contain one or more tasks.
  5. (Optional) Add multiple tasks to a task workflow.
    If you want to add more than one task to the task workflow and execute them in a sequence, then
    1. In the editor tool bar, choose New Task.
      By default, the tool inserts a task of the type, SAP BW Process Chain, and connects the new task and the preceding task with the status, OK (color code: green). This means that, the tool executes the new task only if the execution of the previous task in the task workflow is successful.
    2. If you want to change the task type, on the task node, choose (Show Properties)
    3. In the TaskType dropdown list, select the required task type.
  6. (Optional) Add a data transfer task.
    Yon can use the task workflow to schedule a data transfer from an SAP BW system to and SAP Vora system. If you have already created an SAP BW data transfer task and want to include it in a task workflow, then
    1. In the editor tool bar, choose New Task.
      By default, the tool inserts a task of the type, SAP BW Process Chain to the task workflow editor.
    2. On the task node, choose (Show Properties).
    3. In the TaskType dropdown list, select Data Transfer.
    4. In the Reference dropdown list, select the required data transfer task.
    5. Choose OK.
  7. (Optional) Adding a new task to clear logs.
    You can add a new clear log task in a task workflow. When you execute or schedule a task workflow with this task, it helps clear all logs of all task workflows from all projects in a system.
    1. In the editor toolbar, choose New Task to add a clear log task to the task workflow.
      By default, the tool inserts a task of the type, SAP BW Process Chain to the task workflow editor.
    2. On the task node, choose (Show Properties).
    3. In the TaskType dropdown list, select Clear Log.
    4. In the Description text field, provide a description for the clear log task.
    5. In the Clear all logs older than (days) text field, specify the number of days.
      The tool clears all logs older than the number of days that you specify here.
    6. Choose OK.
  8. (Optional) Add new collectors.
    1. In the editor toolbar, choose New Collector.
    2. In the collector node, choose (Change Collector Type).
    3. If you want the tool to first execute the collector during the task workflow execution, select First.
  9. (Optional) Define additional properties.
    In the Task Workflow node, you can define additional properties for the task workflow. These values help the tool identify the runtime behavior of the task workflow.
    1. In the Task Workflow node, Choose (Show Properties).
    2. In the Description text field, provide a description for the task workflow.
    3. In the Responsible text field, provide the name of the user responsible for the task workflow.
    4. In the E-mail text field, provide the e-mail address of the user responsible for the task workflow.
    5. In the Max Number of Parallel Execution field, provide the required number of parallel task workflow executions.
    6. In the Task Timeout field, provide the maximum time limit in seconds.
      Beyond this time limit, the tool stops executing the tasks.
    7. In the Resume Behavior dropdown list, select the required resume behavior for the task workflow.
      By default the resume behavior is Resume not required. This behavior will not resume any of the errored or aborted task workflows, instead all the task workflows will be reexecuted. If you select Resume required after failure/abort menu option in the Resume Behavior dropdown list, then the tool attempts a resume run for the next scheduled run of the task workflow.
    8. Choose OK.
  10. Save changes.
    In the global toolbar, choose Save to save the task workflow.
  11. Activate the task workflow.
    After creating a task workflow object, activate the task workflow. Activation is necessary to convert the design-time object to its equivalent runtime object in the database.
    1. In the global toolbar, choose (Activate) field, to activate the task workflow.
  12. (Optional) Check for inconsistencies.
    Checking for inconsistencies help identify any impact to the dependent objects of the task workflow. After creating a task workflow or after modifying a task workflow, you can check for any inconsistencies in its dependent objects.
    1. In the navigation pane, right-click the object for which you want to identify inconsistencies and choose Check Consistency.
      If there is an impact to any of the dependent objects, the tool displays more details of the dependent objects and the impact in the Problems view.
    2. (Optional) If you want to automatically adjust the references in the impacted objects and redeploy them, in the navigation pane, right-click the object and choose Redeploy.

Next Steps

After creating and activating a task workflow, you can perform a direct execution of the task workflow within the modeler tool, or use the SAP Data Hub cockpit to schedule an execution (immediate or recurring).