2.4.8 Controlling the order of unit execution in different jobnets (example of defining a jobnet that uses a wait condition)
- Organization of this subsection
(1) Linking units in different jobnets
To control the execution order of units in different jobnets, use a wait condition when defining the units.
Use wait conditions when defining a process flow with characteristics like the following:
-
In the Total calculation root jobnet, Job 1, Job 2, and Job 3 are executed sequentially.
-
Job 2 uses the data output by the root jobnets work task A and work task B. For this reason, Job 2 must run after work task A and work task B have finished executing.
This example assumes that work task A and work task B have already been defined to execute once per day on weekdays.
The following figure shows an example of defining such a jobnet using wait conditions.
|
First, create the Total calculation root jobnet, and define a job flow in which Job 1, Job 2, and Job 3 are executed sequentially. Because Job 2 needs to run after work task A and work task B have finished, define a wait condition for Job 2. Specify work task A and work task B as the units whose ends are being waited for, and AND as the wait method. The behavior of the unit when there are no applicable generations can be set to suit how you use the system.
Next, define a schedule for Total calculation. Because Total calculation needs to run on the same day as work task A and work task B, define its schedule to match that of work task A and work task B. In this example, because work task A and work task B are scheduled to execute on weekdays, define the same Monday to Friday schedule for Total calculation.
After defining the units, assigning the wait condition, and defining the schedules, register work task A, work task B, and Total calculation for execution. Job 2 waits for work task A and work task B to finish executing, and starts executing when both have finished.
For details on the operating methods applicable to units with wait conditions and units whose ends are being waited for after they start running, see 9.3 Operating methods related to wait conditions in the Job Management Partner 1/Automatic Job Management System 3 Administration Guide.
(2) Incorporating repeated processing in a job flow (definition example using both a start condition and wait conditions)
To incorporate a unit that performs repeated processing in a job flow, define the unit using both a start condition and wait conditions.
For example, you can define the following work tasks by using wait conditions:
-
Define the Total calculation root jobnet to calculate the total amount of data. Execute the Total calculation root jobnet six times, once every hour starting at 18:00.
-
Define the Data organization root jobnet to organize the totaled data. Execute the Data organization root jobnet regardless of whether all six executions of the Total calculation root jobnet have ended successfully.
The example assumes that a schedule has already been defined for each root jobnet.
The following figure shows how to use a start condition and wait conditions to define the work tasks.
|
First, define the Total calculation root jobnet. Define the job to be executed for Total calculation and then specify regular execution for the root jobnet. The detailed procedure for definition is as follows:
-
Create a start condition and define the Interval Control job.
-
In the Detailed Definition - [Interval Control] dialog box, in the Waiting time section, enter 60 (minutes).
-
In the Schedule Rule dialog box, define schedule rules as follows:
-
Start time: Select Absolute time and enter 18:00.
-
Start condition: Click Use if defined.
-
Valid range of start condition: In the Times box, enter 6.
-
Next, define the Data organization root jobnet. Define the job to be executed for Data organization and then define the wait conditions for waiting for Total calculation to end. In the Waiting Condition Settings dialog box, specify the wait conditions as follows:
-
Waiting-target unit: Enter Total calculation.
-
Abnormal end for an execution generation: Click Execute.
When you finish defining the units, schedules, and wait conditions, register Total calculation and Data organization for execution. After the root jobnets are registered for execution, Total calculation is executed six times on the hour starting at 18:00. When all the execution generations of Total calculation have finished executing, Data organization starts executing regardless of whether the execution generations of Total calculation ended abnormally.
For details about how to operate the units with wait conditions and the units whose ends are being waited for after execution has started, see 9.3 Operating methods related to wait conditions in the Job Management Partner 1/Automatic Job Management System 3 Administration Guide.