External Dependencies in Workflows

An external dependency in a Workflow is the representation of an external task that must end with a specific status for one or more tasks in the Workflow to start processing. This means that external dependencies are predecessors of one or more tasks within the Workflow. To differentiate external dependencies from the rest of the tasks in the Workflow, their task boxes have dotted lines.

After adding an external dependency and connecting it to its successor, you define the status that the external dependency must have for its successor to start running. There are two places where you can indicate the expected status of the external dependency:

  • (Optional) In the Execution Settings Section of the external dependency itself you can indicate the expected end status
  • In the Time & Dependencies tab of the successor task, you indicate what should happen if the expected status is reached.
  • Example: You define that the expected end status of the external dependency is ENDED_NOT_OK and that the successor task should only start if the preceding task shows the status ENDED_OK. When the external dependency reaches the status ENDED_NOT_OK, it actually shows the status ENDED_OK because the expected status condition is fulfilled. Therefore, the successor can start.

You can define external dependencies in standard Workflows only.

For information about how to add external dependencies to a Workflow, see Adding Tasks to a Workflow.

This page includes the following:

Example

This example describes a simple scenario that illustrates the use of external dependencies:

  • WORKFLOW_A contains two Jobs: JOB_A1 and JOB_A2.
  • WORKFLOW_B contains two Jobs: JOB_B1 and JOB_B2.
  • JOB_B1 must wait for JOB_A1 to finish successfully. Only then can it start.

To establish this dependency in WORKFLOW_B, you insert JOB_A1 as external dependency:

  1. Do one of the following:

    • Right-click anywhere on the Workflow editor and select Add Existing Object.

      On the dialog that opens up, search for JOB_A1 and select it. Then activate the Insert as External Dependency checkbox at the bottom.

    • Open the Explorer (Process Assembly) and the Workflow in two separate browser windows.

      1. In the Explorer window, search for JOB_A1 and use the drag and drop function to insert it in the Workflow.
      2. Right-click JOB_A1 and select Convert to External Dependency from the context-menu.
  2. JOB_A1 is displayed as external task in the Workflow. It has a dashed task box.
  3. Connect JOB_A1 to one o more tasks in the Workflow. In this example, it is connected to JOB_B1. JOB_A1 is the predecessor of JOB_B1. External tasks do not have predecessors:

    Screenshot showing WORKFLOW_A and WORKFLOW_B (without external dependency) as well as WORKFLOW_B with the external dependency.

  4. Select JOB_B1 and right-click to select Properties.
  5. Open the Time & Dependencies tab to configure how the task should behave depending on the status of the external dependency.

External Task Status

In the Process Monitoring perspective, while the Workflow is executing, JOB_A1 is displayed in different colors depending on its status:

  • White

    The external task has not been processed yet

  • Dark gray

    The condition specified on the External Dependency tab has been met

  • Blue

    The external task is still executing and, therefore, the external dependency is in a waiting status

If the external task blocks, the external dependency remains in a waiting status (blue). If you remove the block manually, the conditions of the external dependency are only fulfilled when the expected status in its properties is set either to ANY_OK_OR_UNBLOCKED or ENDED_OK_OR_UNBLOCKED. Otherwise, the external dependency remains in its waiting status.

Notes:

The status of an external task is retrieved through its execution data. No status is available in the following situations:

  • The external task has not yet been processed. For example, the external dependency is an object that has just been created, duplicated, imported or transported.
  • The execution data has been reorganized and the status of the external task is no longer available. For example, an external dependency refers to a task which always runs at the beginning of a month. A workflow which is always processed on the 10th of a month cannot retrieve this task's status if the execution data is removed from the database every second day.

In either situation, your selection in the Check if the external task was activated with the same logical date as the workflow group does not show positive results and the Else action is applied.

External Dependency Status

The status of the external task is not the same as the status of the external dependency. An external dependency can only have one of the following status:

  • ENDED_OK
  • ENDED_INACTIVE
  • ENDED_SKIPPED
  • ENDED_OK_OR_INACTIV

Best Practices

The system is designed to avoid overlapping situations. This means that an instance (an execution) of an external task is used in only one instance (execution) of the Workflow in which it is referred to as external dependency. Take this into account when configuring the period within which the external task must have ended with the desired status so that its successor in the Workflow can start. For more information about how to configure this period, see Execution Settings Section.

See also:

Workflows (JOBP)