Grouping and Controlling Simultaneous Execution of Flows

How to:

Reference:

Often you need to define a process flow in which multiple steps occur simultaneously and other steps cannot begin until all of the prior steps have been completed.

For example, suppose that you are creating an employee information data mart as a data target. However, the data mart requires data from two other, independent data flows, one of which loads data from a personnel database and the other from an accounting database. You need to make sure that the data flow for the data mart does not run until the two feeder data flows have completed their runs.

By grouping the feeder data flows, you can enforce their simultaneous execution. Then, by adding a Wait object, you can ensure that the third data flow, the employee data mart, does not run until the other two have loaded the required data into their respective targets. This technique eliminates the need to estimate what time the first two flows will end in order to schedule the third flow to run at that time.

You can also pass parameters to the procedures in a parallel group using the Properties dialog box for the flow.

Note: The Scheduler must be running to execute process flows that require simultaneous execution or wait conditions. If the Scheduler is not running, the flow will not run, and a message will appear in the log.


Top of page

x
Procedure: How to Execute a Group of Procedures and Wait
  1. Right-click an application directory in the navigation pane and select New, then Flow.
  2. Click the Process Flow tab. A new workspace containing a Start object opens in the right pane.
  3. On the Flow tab, in the Insert group, click Parallel Group and drag it into the workspace, where it appears as an empty box with a border of dashes.
  4. Right-click the previous object in the workspace and draw an arrow connecting it to the Parallel group object.
  5. Drag a flow (it can be a data flow or another process flow) from the navigation pane into the Parallel Group object.
  6. Drag another flow from the navigation pane into the Parallel Group object, placing it below the previous object.

    Note: You can group as many flows or procedures as you require in a Parallel Group object.

  7. On the Flow tab, in the Insert group, click Wait and drag it into the workspace to the right of the Parallel Group object.
  8. Right-click the Parallel Group object, which now contains the multiple flows, and draw an arrow connecting it to the Wait object. Note that this is an unconditional connection.
  9. By default, the Wait object simply waits until the flows in the Parallel Group object complete their runs. If you want to limit the wait time, double-click the Wait object to open the Wait attribute pane, as shown in the following image.

    Wait Properties

    Specify the maximum number of seconds to wait before executing the next component in the flow.

    Note: WAIT time works in conjunction with the schedule interval (sched_interval) of the server. If the wait time is less than the schedule interval, the process will wait until the next schedule interval before proceeding.

  10. From the navigation pane or the Insert group, drag the next object into the workspace, to the right of the Wait object.
  11. Connect the Wait object to the object that follows it in the flow. By default, the processing will continue to the next object when the default condition is satisfied.
  12. If you wish to change the default condition, double-click the connecting arrow to open the Wait Condition Type window. See Wait Condition Type Dialog Box.

    Change the condition to Timeout or Failure and click OK.

  13. Click the Save button to update the process flow.

Top of page

x
Procedure: How to Edit a Wait Connection Condition
  1. Drag a Flow, Procedure, or E-mail object into the process flow workspace following a Wait object.
  2. Connect the objects.
  3. To view or edit the connection condition, double-click the arrow connecting the objects. The Wait Condition Type window opens.

    For a single connection, the default condition is Wait satisfied, represented by a green arrow.

    For a second connection, the default condition is Timeout or Failure, either the Wait is not satisfied OR one of the procedures in the group failed, represented as a red arrow.

  4. Click an option button to change the condition, then click OK to close the window.
  5. Click the Save button to update the process flow.

Top of page

x
Reference: Wait Attribute Pane

The Wait attribute pane shown in the following image is available from the process flow workspace by double-clicking a Wait object.

Wait Properties

The Wait Properties dialog box has the following fields and options:

Interval (sec)

Number of seconds to wait for a parallel group to finish executing. The default value is 0.

An interval of 100 causes the process flow to wait up to 100 seconds or until all flows in the group have been completed.

Note: WAIT time works in conjunction with the schedule interval (sched_interval) of the server. If the wait time is less than the schedule interval, the process will wait until the next schedule interval before proceeding.


Top of page

x
Reference: Wait Condition Type Dialog Box

The Wait Condition Type dialog box shown in the following image is available from the process flow workspace by double-clicking the arrow coming from a Wait object, or by right-clicking it and selecting Edit Condition.

The Wait Condition Type dialog box has the following fields and options:

OK Default Condition (Wait satisfied)

If the grouped objects complete their runs successfully within the set time limit, the wait condition is satisfied and the next upon-successful-completion step in the flow runs.

Timeout or Failure

If the grouped objects do not complete their runs successfully within the set time limit or one of the grouped objects fails, the wait condition is not satisfied and the next Timeout or Failure step in the flow run.

Unconditional

The next steps run regardless of any conditions.


iWay Software