Table-Driven Dynamic Parallel Processing

Use

You have defined a multiline container element in the workflow container, which contains a list of values of the same type at runtime. The exact number of values is not known at definition time.

For each value in this list, one particular function is to be executed as a step in the workflow.

Integration

In addition to table-driven, dynamic parallel processing, there is also explicitly-modeled parallelism and the work queue. For more information, see Implementation Options for Parallel Processing.

Prerequisites

The following prerequisites must always be fulfilled for parallel steps:

  • The workflow container contains a multiline container element.

    A multiline container element is created with one data type reference and can therefore only ever include a list of values that refer to the same data type reference.

    A multiline container element can be a list of object references.

  • You have entered the multiline container element from the workflow container on the tab page Other.

Features

Table-driven parallel processing has two aspects:

  • Creation of parallel steps in accordance with the number of values

  • Operations on the relevant current value of the multiline container element

Creation of parallel steps in accordance with the number of values

The system executes a step of a workflow definition in parallel processing branches as many times as there are values in the multiline container element.

  • At runtime the workflow system generates from the step as many parallel work items as there are values in the multiline container element at that time.

    A dialog step is represented for each value of the multiline container element with a work item in the Business Workplaces of the recipients. Background steps are executed automatically by the system.

  • The number of values does not have to be known at definition time.

Operations on the relevant current value of the multiline element

In each of the steps created in parallel, one value from the multiline container element is the current value. You can also define a binding from the relevant current value of the multiline container element to a single-line container element in the task container or the event container.

Activities

You use the multiline container element in the binding from the workflow container to the task container.

The relevant current value of the multiline container element can be used in the relevant parallel step.

You define a binding for the activity from the multiline container element in the workflow container to a (single-line) container element in the task container. The container element of the task container must have the same data type reference as the multiline container element.

The following are possible:

  • The multiline container element contains a list of object references, for which you define the binding to the element _WI_Object_ID in the task container.

    In this case, you execute the same single-step task n times on n objects ( n = number of values, n > 1). All n work items created have the same input parameters.

  • The multiline container element contains a list of ABAP Dictionary references or object references which, however, are not used as _WI_Object_ID.

    In this case, you execute the same object method on an object m times. But the m work items then have one variable parameter.

A combination of the two cases is not possible.

For the binding definition from and to the multiline container element, use &<MultilieElement>[&_WF_PARFOREACH_INDEX&]&. as the expression for the workflow container.