How to: Reference: |
Often you need to define a process flow in which multiple steps occur simultaneously and where 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 that loads data from a personnel database and one that loads data 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.
Note: You can group as many flows or procedures as you require in a Parallel Group object.
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.
Change the condition to Timeout or Failure and click OK.
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, which shows that either the Wait is not satisfied OR one of the procedures in the group failed. This is represented as a red arrow.
To access the Wait attribute pane shown in the following image, from the process flow workspace, double-click a Wait object.
The Wait Properties dialog box has the following fields and options:
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.
To access the Wait Condition Type dialog box shown in the following image, from the process flow workspace, double-click the arrow coming from a Wait object, or right-click it and select Edit Condition.
The Wait Condition Type dialog box has the following fields and options:
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.
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 is run.
The next steps run regardless of any conditions.
iWay Software |