Include a static flow array in the flow diagram

About this task

You can include a static flow array as a subflow within a flow diagram. A static flow array works in a similar fashion to a job array, but at a subflow level.

When the static flow array is instantiated, a specific number of flow elements start to run either in parallel, or sequentially, depending on what you selected in the flow array attributes. By default, flow elements run in parallel.

Within a flow array element, the #{JS_FLOW_INDEX} scoped variable specifies the array index of the static flow array element.

Procedure

  1. Click the Insert Static Flow Array button to put the Flow Editor in static flow array placement mode. The Open dialog appears.
  2. Locate the flow definition file you want to include and click Open.
  3. Left-click in the workspace in the location where you want to insert the static flow array. The static flow array icon is added to the flow diagram.
  4. Draw the lines describing any dependencies the static flow array has on other work items in the flow definition.
  5. Define the static flow array.
    1. Right-click the static flow array and select Attributes.

      The Flow Array Attributes dialog displays.

    2. Specify the name of the static flow array in the Name field.

      The default name assigned to the static flow array is the name of the subflow you selected.

    3. Optional. To specify the description of the static flow array, use the Description field.
    4. Define the size of the array by specifying the First Element and Last Element fields.

      If you do not specify a value for First Element, it defaults to 1. You must specify a value for Last Element that is larger than First Element.

      Tip:

      You can use user variables in the element fields to specify the flow array index, thus allowing static flow arrays with dynamic element fields. At runtime, before the static flow array is started, Process Manager replaces the variables with values, which is usually set be a predecessor job.

    5. Optional. Specify Run flow array elements: whether flow array elements run in parallel or sequentially. By default, flow array elements run in parallel, as checked.
  6. Optional. To specify a working directory at the static flow array level, expand the static flow array and use the Working directory field in the Flow Attributes of the flow array.
    Tip:

    You can use user variables when specifying the working directory.

    All valid inner work items (subflows, jobs, and job arrays) in the static flow array will use this directory as the working directory unless you further specify a working directory for the inner work item. In this case, the working directory setting for the inner work item will override the setting for this static flow array.

  7. Optional. Monitor this static flow array for a particular exception, and handle it automatically.

    For more detailed information about exceptions and handlers, see Handling Exceptions.

    1. Right-click the static flow array and select Expand to enter the subflow level.
    2. Right-click on the workspace and select Attribute.
    3. Click the Exception Handling tab and specify the exceptions and handlers.
    Tip:

    You can view (and edit) the jobs in the subflow in the flow array by double-clicking on the flow array or by right-clicking on the flow array and selecting Expand. Any changes you make apply only to the subflow in the flow array.

  8. Click OK to save your static flow array definition.

Flow array element names

When a static flow array is run, each element takes a unique name in the form of flow_array_name(array_index).

For example, if the name of the static flow array instance is 1:usr1:FA, and its index is 1 to 3, the three elements have the name of 1:usr1:FA(1), 1:usr1:FA(2), and 1:usr1:FA(3).

Viewing a static flow array

Procedure

  1. Right-click the static flow array in the instance diagram and select View Elements.

    A list of flow array elements displays.

  2. Select one of the flow array elements and click View Flow.

    The diagram for the selected flow array element displays.