Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide


2.2.5 Using wait conditions to control the order of unit execution

You can use a wait condition to control the execution sequence of units in different jobnets. A unit assigned a wait condition does not start to execute until a specified unit has finished.

To use wait conditions, you need to configure the PREWAITUSE environment setting parameter in advance to enable the use of wait conditions. If you want to expand the types of units that can be waited for, configure the PREWAITEXTEND environment setting parameter as necessary.

Organization of this subsection

(1) Overview of using wait conditions to control the order of unit execution

The following gives an overview of execution sequence control using wait conditions, and describes the flow of using wait conditions to control the execution sequence among units.

(a) Units with wait conditions and units whose ends are being waited for

When assigning a wait condition, you specify a target unit. The unit with the wait condition waits for the target unit to finish executing. The status of the target unit (that is, whether it has finished executing) depends on whether the unit has a start condition#.

For units without a start condition#

You can assume that the unit whose end is being waited for has finished executing when its status is one of the following:

  • Ended normally

  • Ended with warning

  • Bypassed

For units with a start condition#

If the default settings are in effect, you can assume that the unit whose end is being waited for has finished executing when the statuses of the monitoring generation and all the execution generations of the unit are as follows:

Monitoring generation
  • Monitor-end normal

Execution generation
  • Ended normally

  • Ended with warning

By setting a start condition for the unit whose end is being waited for, you can change the status that the unit needs to have when it finishes executing. For details, see (5)(c) Behavior of units with wait conditions when start conditions are used for the units whose ends are being waited for.

#

To be able to use a start condition, the root jobnet must satisfy the following criteria:

  • A start condition is set for the root jobnet.

  • When the root jobnet is registered for execution, the use of a start condition is specified.

    For immediate execution, in the Register for Execution dialog box, in the Start condition section, click Use if defined.

    For planned execution and fixed execution, in the Schedule Rule dialog box, in the Start condition section, click Use if defined.

  • Start conditions are not disabled by the -j option of the ajsplan command.

The unit with the wait condition starts to execute when the unit specified in the wait condition finishes executing.

A unit with a wait condition assigned is called a unit with wait conditions. A unit specified in a wait condition is called a unit whose end is being waited for.

The following figure shows how a wait condition controls the order in which jobs are executed.

Figure 2‒26: Controlling execution order using wait conditions

[Figure]

In this example, a wait condition is assigned to Job 3 in Root Jobnet B, and Job 2 in Root Jobnet A is specified for the wait condition as the unit whose end is being waited for. When the system executes Root Jobnet A and Root Jobnet B, Job 3 waits for Job 2 to finish executing. When Job 2 finishes executing, Job 3 then starts.

You can use wait conditions to control the execution sequence for a variety of units. The following table describes the units to which wait conditions can be assigned, and the units you can specify as units whose end is being waited for.

Table 2‒9: Units capable of accepting wait conditions and units specifiable as a unit whose end is being waited for

No.

Unit type

Capable of accepting wait conditions

Specifiable as unit whose end is being waited for

1

Job group

Job group itself

N

N

2

Jobs immediately under a job group

Y#1

N

3

Root jobnet

Root jobnet without a start condition

Y

Y

4

Units under a root jobnet without a start condition

Y#2

Y#2

5

Root jobnet with a start condition

Y#3

Y#3

6

Units under a root jobnet with a start condition

N#2

N#2

7

Start condition (.CONDITION)

N

N

8

Nested jobnet

Y

Y

9

Remote jobnet

Remote jobnet

N

N

10

Lower-level units in remote jobnet

N

N

11

Planning group

Planning group

N

Y

12

Root jobnets directly under planning group

Y

N

13

Lower-level units in root jobnet directly under planning group

Y

Y#4

14

Standard job

Y

Y

15

Jobnet connector

Y

Y

16

OR job

N

N

17

Judgment job

N

N

18

Event job

Event job in a jobnet

Y

Y

19

Event job in a start condition (.CONDITION)

N

N

20

Action job

Y

Y

21

Custom job

Y

Y

22

Passing information setting job

Y

Y

23

HTTP connection job

Y

Y

Legend:

Y: Can be assigned a wait condition or specified as a unit whose end is being waited for

N: Cannot be assigned a wait condition or specified as a unit whose end is being waited for

#1

You can assign wait conditions to these jobs, but you cannot register them for execution.

#2

Even if a root jobnet has a start condition, you can disable the start condition by clicking Do not use in the Start condition section of the Register for Execution dialog box or the Schedule Rule dialog box. This means that you do not know whether the start condition will be applied for the units under the root jobnet with the start condition until the root jobnet is executed. Accordingly, you can assign wait conditions to the units under a root jobnet with a start condition. Also, you can specify a unit under a root jobnet with a start condition as the unit whose end is being waited for. Note, however, that if the start condition is used at execution, an execution error occurs.

#3

The following conditions must be satisfied if you want to assign wait conditions to a root jobnet with a start condition or to specify that root jobnet as the unit whose end is being waited for:

  • JP1/AJS3 - Manager is version 10-00 or later.

  • condition is set for the PREWAITEXTEND environment setting parameter.

#4

When designating a unit in a root jobnet directly under a planning group as a unit whose end is being waited for, specify the name of the unit without the root jobnet name. That is, specify /planning group/job rather than /planning group/root-jobnet/job.

A wait condition controls the execution sequence of units governed by a single scheduler service. That is, the unit with the wait condition and the unit whose end is being waited for must be under the control of the same scheduler service.

Cautionary notes
  • Job flows that incorporate wait conditions can be hard to comprehend, and tend to obscure the flow of work tasks and the jobnet hierarchy. When you create a job flow, to the extent possible, avoid using wait conditions. Use relation lines, nest jobnets, and combine multiple jobs instead.

  • When you use wait conditions, space out when waits begin so that multiple waits are not concentrated at the same time. Also specify different scheduled start times for jobnets.

    If multiple units with wait conditions must start waiting at the same time, design the job flow taking into account the following points regarding the time required from the time a unit whose end is being waited for ends until the unit with a wait condition starts executing:

    - A unit with a wait condition checks the status of the unit whose end is being waited for. Accordingly, some time is necessary after the unit whose end is being waited for ends until the unit with the wait condition starts executing. How much time is required depends on the number of units with wait conditions that are waiting at the same time. These units include other units with wait conditions in the same scheduler service.

    - One scheduler service can process approximately 4 to 20 units with wait conditions every second. For example, if 100 units with wait conditions simultaneously start waiting for one unit whose end is being waited for, approximately 5 to 25 seconds is required from the time the unit whose end is being waited for ends until the 100th unit with a wait condition starts executing.

    - When you specify a root jobnet with a start condition as the unit whose end is being waited for, the time required until the unit with the wait condition starts executing depends on the number of execution generations of the root jobnet with the start condition. For example, if 100 units with wait conditions simultaneously start waiting for 100 root jobnets with start conditions and 10 execution generations (for each root jobnet), approximately 5 to 20 seconds is required after all the root jobnets with start conditions finish executing until the units with wait conditions start executing. If each of the 100 root jobnets with start conditions has 100 execution generations, the time is approximately 50 to 100 seconds.

    - The length of time required until a unit with a wait condition starts executing depends on the performance of the computer and the jobnet configuration of the unit whose end is being waited for and the unit with the wait condition.

  • You can use wait conditions from version 09-50 of JP1/AJS3 - View and JP1/AJS3 - Manager. However, you cannot use wait conditions if the database uses a compatible ISAM configuration, even when running JP1/AJS3 - Manager 09-50 or later.

(b) Wait statuses

The wait status of a unit with wait conditions indicates whether the unit is still waiting for the unit whose end is being waited for to finish executing. The following table describes each wait status.

Table 2‒10: List of wait statuses

No.

Wait status

Description

1

Wait incomplete

The unit is still waiting for the unit whose end is being waited for to finish executing.

2

Wait complete

The unit is no longer waiting for the unit whose end is being waited for to finish executing.

3

Wait incomplete (manual)

The unit is still waiting for the unit whose end is being waited for to finish executing (the wait condition was activated, causing the wait status to change to Wait incomplete)

4

Wait complete (manual)

The unit is no longer waiting for the unit whose end is being waited for to finish executing (the wait condition was deactivated, causing the wait status to change to Wait complete)

5

Wait incomplete (rerun)

The unit is still waiting for the unit whose end is being waited for to finish executing (the succeeding unit for an abnormally terminated unit was re-executed, and the status of the abnormally terminated unit changed to an end status).

When the wait status transitions to Wait complete or Wait complete (manual), the wait condition is satisfied and the unit with the wait condition begins to execute.

You can configure the behavior of a unit with a wait condition. For details, see (5) Configuring the behavior of units with wait conditions.

(c) Flow of execution order control

To use wait conditions to control the execution order of units:

  1. Define the unit whose end is being waited for and the unit to which the wait condition is to be assigned.

    Create a detailed definition and schedule for the units.

  2. Assign a wait condition to the unit.

    The following settings define a wait condition:

    • Name of the unit whose end is being waited for

    • Wait method

    • Behavior when not waiting for any generations

    For details on the wait method and behavior when not waiting for any generations, see (5) Configuring the behavior of units with wait conditions.

    For details on how to assign a wait condition, see 5.2.6 Assigning wait conditions in the JP1/Automatic Job Management System 3 Operator's Guide.

  3. Register the root jobnets that manage the related units, namely the unit with wait conditions and the unit whose end is being waited for, for execution.

    The unit with the wait condition waits for the unit whose end is being waited for to finish executing.

    For details on how to register a root jobnet for execution, see 7. Executing Jobnets in the JP1/Automatic Job Management System 3 Operator's Guide.

(2) Rules governing waiting regarding units with wait conditions and units whose ends are being waited for

When you register a unit with a wait condition for execution, the unit with the wait condition waits for the unit whose end is being waited for to finish executing, subject to specific rules.

The rules differ for each of the following scenarios:

Each of these scenarios is described below.

(a) The unit with the wait condition is in the same root jobnet as the unit whose end is being waited for

When the unit with the wait condition is associated with the same root jobnet as the unit whose end is being waited for, both units are executed as part of the same generation. Therefore, the unit with the wait condition will wait for the unit whose end is being waited for that is executed in the same generation to finish executing.

The following figure shows an example in which the unit with the wait condition and the unit whose end is being waited for are associated with the same root jobnet.

Figure 2‒27: Example where the unit with wait conditions and the unit whose end is being waited for are in the same root jobnet

[Figure]

In this example, Job 3 (the unit with wait conditions) and Nested Jobnet 1 (the unit whose end is being waited for) are both defined under Root Jobnet A. If Root Jobnet A is scheduled to execute once per day, generations of Root Jobnet A are scheduled for 7/1 and 7/2 when the jobnet is registered for execution. In this scenario, Job 3 waits for the instance of Nested Jobnet 1 that is in the same generation to finish executing.

(b) The unit with the wait condition and the unit whose end is being waited for are in different root jobnets

When the unit with the wait condition and the unit whose end is being waited for are associated with different root jobnets, generations of each root jobnet are scheduled when you register the root jobnets for execution. In this scenario, the unit with wait conditions waits for the generation of the unit whose end is being waited for that satisfies both of the following conditions:

  • Shares the same execution date

  • Appears in the same position in the sequence when the generations are sorted in order of execution start time

The following figure shows an example in which the unit with wait conditions and the unit whose end is being waited for are in different root jobnets.

Figure 2‒28: Example where the unit with wait conditions and the unit whose end is being waited for are in different root jobnets

[Figure]

In this example, Job 1 (the unit with wait conditions) and Nested Jobnet 1 (the unit whose end is being waited for) are defined under different root jobnets. If Root Jobnet A and Root Jobnet B are scheduled for execution twice on 7/1, two generations of Root Jobnet A are generated for 7/1 with the execution IDs @A101 and @A102. Similarly, two generations of Root Jobnet B are generated for 7/1 with the execution IDs @A103 and @A104. Generations @A103 and @A104 of Job 1 each wait for the generation of Nested Jobnet 1 that shares the same execution date and whose start time appears in the equivalent position. Therefore, the wait condition of the first generation of Job 1 (@A103) applies to the generation of Nested Jobnet 1 that executes first (@A101). Similarly, the wait condition of @A104, the second generation of Job 1, applies to @A102, the second generation of Nested Jobnet 1. Of the generations of Job 1 scheduled for 7/2, each generation waits for the generation of Nested Jobnet 1 that starts in the corresponding position.

Below are examples of using wait conditions in conjunction with JP1/AJS3 functionality.

Using the jobnet release function to replace the jobnet definition of the unit whose end is being waited for

If you use the jobnet release function to switch the jobnet definition of a unit whose end is being waited for without stopping the jobnet, the jobnet targeted by the wait condition switches automatically.

The following figure shows an example of releasing a jobnet serving as a unit whose end is being waited for.

Figure 2‒29: Releasing a jobnet serving as a unit whose end is being waited for

[Figure]

In this example, Root Jobnet A is subject to a release registration that releases the jobnet definition with the release ID 001 at the specified release time of 00:00 on 7/2. When Root Jobnet A is registered for execution, the generation scheduled for 7/1 (@A101) is subject to the jobnet definition associated with release ID AJS_AUTO, and the generation scheduled for 7/2 (@A103) is subject to the jobnet definition associated with release ID 001. On 7/1, Job 1 waits for generation @A101 of the Nested Jobnet 1 associated with release ID AJS_AUTO. From 7/2, Job 1 waits for generation @A103 of the Nested Jobnet 1 associated with release ID 001.

Changing the start order of scheduled generations of a jobnet registered for execution

If you perform a temporary plan change or other operation that changes the order in which generations of a registered jobnet are scheduled to start, the generations targeted by the wait condition automatically change to reflect the order in the new schedule.

The following figure shows an example in which a temporary plan change alters the order in which scheduled generations start.

Figure 2‒30: Example of using a temporary plan change to change the start sequence of scheduled generations

[Figure]

In this example, Root Jobnet A which manages Nested Jobnet 1 (the unit whose end is being waited for), and Root Jobnet B which manages Job 1 (the unit with a wait condition), are both scheduled to execute twice on 7/1. Although generation @A103 of Root Jobnet B was scheduled to execute first on 7/1, a temporary plan change caused its execution to be canceled, and @A104 became the generation executed first. Thus, generation @A104 of Job 1 waits for generation @A101 of Nested Jobnet 1.

Effects of a 48-hour schedule on wait conditions

If you use a 48-hour schedule, the target generation of a wait condition is determined by its execution date in the 48-hour schedule.

The following figure shows an example of wait conditions in a 48-hour schedule.

Figure 2‒31: Example of wait conditions in a 48-hour schedule

[Figure]

In this example, the scheduler services for Root Jobnet A and Root Jobnet B use the 48-hour schedule. Root Jobnet A, which governs Nested Jobnet 1 (the unit whose end is being waited for), is scheduled to execute daily at 10:00. Root Jobnet B, which governs Job 1 (the unit with wait conditions), is scheduled to execute at 38:00 on 7/1. In this scenario, the first generation of Job 1 to be executed on 7/1 is @A103, scheduled for 38:00 (actually 14:00 on 7/2). Thus, generation @A103 of Job 1 waits for generation @A101 of Nested Jobnet 1, which is the first generation of Nested Jobnet 1 scheduled for 7/1.

Cautionary notes
  • You can set a different base time for the unit with wait conditions and the unit whose end is being waited for. However, doing so can complicate the process of matching wait conditions to their targets. We recommend that you coordinate the base times of units with wait conditions and their units whose ends are being waited for.

  • In UNIX, you can specify different time zones for the unit with the wait condition and the unit whose end is being waited for. However, doing so can complicate the process of matching wait conditions to their targets. We recommend that you coordinate the time zones of units with wait conditions and their units whose ends are being waited for.

  • Make sure that the saved generations for the unit with the wait condition and the unit whose end is being waited for cover at least one day of operation. This is to ensure that the unit with the wait condition waits as intended and starts executing when the unit whose end is being waited for finishes. If you cannot save one day's generations of the unit whose end is being waited for, there is a chance that the unit might not start executing. On the other hand, if you cannot save one day's generations of the unit with the wait condition, the condition might target a unit whose end is being waited for other than the one intended.

(c) The unit with the wait condition or the unit whose end is being waited for uses a start condition

■ When the unit whose end is being waited for uses a start condition

When a root jobnet with a start condition specified as the unit whose end is being waited for starts executing, both a monitoring generation and execution generations are generated. The scheduled execution generation of the unit with the wait condition waits for both the monitoring generation and execution generations of the unit whose end is being waited for to finish executing.

In this scenario, the scheduled execution generation of the unit with wait conditions waits for the monitoring and execution generations of the unit whose end is being waited for that satisfy all of the following criteria to finish executing.

Monitoring generation
  • The monitoring generation shares the same execution date as the scheduled execution generation of the unit with wait conditions.

  • The monitoring generation appears in the same position in the sequence as the scheduled execution of the unit with wait conditions when all the monitoring generations are sorted in order of scheduled execution start time.

Execution generation
  • All execution generations that are generated together with a monitoring generation

The following figure shows an example in which the root jobnet with a start condition is the unit whose end is being waited for.

Figure 2‒32: Example where the root jobnet with a start condition is the unit whose end is being waited for

[Figure]

In this example, Root Jobnet A (the root jobnet with a start condition) is defined as the unit whose end is being waited for. Generations @A101 and @A102 of Root Jobnet A use the start condition.

If Root Jobnet A and Root Jobnet B are scheduled and registered for execution twice on 7/1, a monitoring generation with execution ID @A101, an execution generation with execution ID @A103, a monitoring generation with execution ID @A102, and an execution generation with execution ID @A107 are generated for Root Jobnet A for 7/1.

When the start condition is satisfied during monitoring by monitoring generation @A101 and execution generation @A103 starts executing, execution generation @A104 is generated. When the start condition is satisfied a second time, execution generation @A104 starts executing and execution generation @A105 is generated. For Root Jobnet B for 7/1, however, generations with execution IDs @A106 and @A110 are scheduled. Generation @A106 of Job 1 waits for the monitoring generation and the execution generations of Root Jobnet A in the same position of the execution sequence for the same execution date. Accordingly, generation @A106 of Job 1 waits until monitoring generation @A101 and execution generations @A103 to @A105 of Root Jobnet A finish executing.

Similarly, generation @A110 of Job 1 (the second generation to be executed) waits until monitoring generation @A102 and execution generations @A107 to @A109 of Root Jobnet A finish executing.

Cautionary notes
  • When you specify a root jobnet with a start condition as the unit whose end is being waited for, explicitly specify numbers for the valid range (either the number of times or a period) of the start condition. If the valid range for a start condition is unlimited for both the number of times and the period, an abnormal end occurs when the unit with the wait condition starts waiting. The reason for the abnormal end is to prevent the unit with the wait condition from continuing to wait when the monitoring generation does not finish executing.

  • When you specify a root jobnet with a start condition as the unit whose end is being waited for, specify the number of logs to keep after reviewing the number of execution generations that will be generated. Also make sure that generations will not be deleted during waiting because the number of specified logs has been exceeded. For details, see (5)(c) Behavior of units with wait conditions when start conditions are used for the units whose ends are being waited for.

  • When you specify a jobnet that has start conditions as a unit whose end is being waited for, make sure not to mix generations that have start conditions with generations that do not have start conditions. For example, if you specify multiple schedule rules for a jobnet that has start conditions, all the schedule rules must either use or not use start conditions. If there are generations that have start conditions and that do not have start conditions, wait conditions will not work properly.

■ When the unit with a wait condition uses a start condition

When a root jobnet with a start condition starts executing, both a monitoring generation and execution generations are generated. The monitoring generation of the unit with the wait condition waits for the unit whose end is being waited for to finish executing.

In this scenario, the monitoring generation of the unit with the wait condition waits for the generation of the unit whose end is being waited for that satisfies both of the criteria below to finish executing. Note that the execution generations of the unit with the wait condition do not wait. The execution generations start executing when the start condition is satisfied.

  • The generation of the unit whose end is being waited for shares the same execution date as the monitoring generation of the unit with the wait condition.

  • The generation of the unit whose end is being waited for appears in the same position in the sequence as the monitoring generation of the unit with the wait condition when all the generations of the unit whose end is being waited for and all the monitoring generations of the unit with the wait condition are sorted in order of scheduled start time.

The following figure shows an example in which a root jobnet with a start condition is specified as the unit with a wait condition.

Figure 2‒33: Example where the root jobnet with a start condition is specified as the unit with a wait condition

[Figure]

In this example, Root Jobnet B (the root jobnet with a start condition) is defined as the unit with a wait condition.

If Root Jobnet A and Root Jobnet B are scheduled and registered for execution twice on 7/1, generations with execution IDs @A101 and @A102 are generated for Root Jobnet A for 7/1. For Root Jobnet B, for 7/1, a monitoring generation with execution ID @A103, an execution generation with execution ID @A105, a monitoring generation with execution ID @A104, and an execution generation with execution ID @A108 are generated. Monitoring generation @A103 waits for the end of scheduled execution generation @A101 of Nested Jobnet 1, which has the same execution date and which is in the same position in the execution sequence of Root Jobnet A.

When generation @A101 finishes executing, the wait condition is satisfied. When the wait condition is satisfied, monitoring generation @A103 starts monitoring for the start condition. When the start condition is satisfied and execution generation @A105 starts executing, execution generation @A106 is generated. When the start condition is satisfied a second time, execution generation @A106 starts executing and execution generation @A107 is generated.

Similarly, monitoring generation @A104 of Root Jobnet B waits for the end of execution of generation @A102, which is executed second in Nested Jobnet 1.

(d) A planning group is specified as the unit whose end is being waited for

When you specify a planning group as a unit whose end is being waited for, the target of the wait condition is the root jobnet running under the planning group. When the planning group switches execution from one root jobnet to another, the target of the wait condition changes automatically.

The following figure shows an example in which a planning group is specified as the unit whose end is being waited for.

Figure 2‒34: Example where planning group is specified as unit whose end is being waited for

[Figure]

In this example, Planning Group P is specified as the unit whose end is being waited for, and defines two root jobnets: Root Jobnet P1 which runs between 6/1 and 6/30, and Root Jobnet P2 which runs between 7/1 and 7/31. From 6/1 to 6/30, Job 1 waits for Root Jobnet P1. When 7/1 arrives and the root jobnet running under the planning group switches to Root Jobnet P2, Root Jobnet P2 becomes the target of Job 1's wait condition.

(3) Behavior in the case where a unit with wait conditions is not scheduled for execution

For a unit that has wait conditions and is not scheduled for execution, by default, no wait occurs. The succeeding unit runs without waiting for the execution of the waiting-target units to end.

The following figure shows the behavior in the case where a unit with wait conditions is not scheduled for execution.

Figure 2‒35: Behavior in the case where a unit with wait conditions is not scheduled for execution

[Figure]

This behavior can be changed by using the PREWAITNOSCHUNITS environment setting parameter. If yes is specified for the PREWAITNOSCHUNITS environment setting parameter, a wait occurs even if the unit with wait conditions is not scheduled for execution. For details about the PREWAITNOSCHUNITS environment setting parameter, see 20.4.2(122) PREWAITNOSCHUNITS in the JP1/Automatic Job Management System 3 Configuration Guide.

The following figure shows the behavior in the case where yes is specified for the PREWAITNOSCHUNITS environment setting parameter.

Figure 2‒36: Behavior in the case where yes is specified for the PREWAITNOSCHUNITS environment setting parameter

[Figure]

If the jobnet that contains a unit with wait conditions is not scheduled for execution, no wait occurs regardless of the value specified for the PREWAITNOSCHUNITS environment setting parameter. An upper jobnet that is not scheduled for execution is placed in Bypassed status when its own execution conditions are met (for example, when execution of the preceding job or jobnet ends). All units that belong to the jobnet (including units with wait conditions) will be placed in Bypassed status.

The following figure shows the behavior in the case where the jobnet that contains a unit with wait conditions is not scheduled for execution.

Figure 2‒37: Behavior in the case where the jobnet that contains a unit with wait conditions is not scheduled for execution

[Figure]

If yes is specified for the PREWAITNOSCHUNITS environment setting parameter, the wait conditions of a unit take effect even if the unit is not scheduled for execution, and messages and JP1 events are output according to the wait status. When the wait conditions are met, because the unit that has wait conditions and is not scheduled for execution is not run, a start message, end message, and JP1 events are not output. However, if a wait error occurs, the status of the unit with wait conditions changes to Ended abnormally, and messages and JP1 events are output.

The following figure shows the behavior of messages and JP1 events in the case where yes is specified for the PREWAITNOSCHUNITS environment setting parameter.

Figure 2‒38: Behavior of messages and JP1 events in the case where yes is specified for the PREWAITNOSCHUNITS environment setting parameter

[Figure]

Supplementary note

If a unit with wait conditions is not scheduled for execution, by default, the processing to evaluate the wait conditions also ends without being performed, as well as the processing to run the unit.

Figure 2‒39: Flow of processing in the case where the PREWAITNOSCHUNITS environment setting parameter is omitted

[Figure]

If wait conditions are provided outside the range in which the processing of the unit with wait conditions is not performed when yes is specified for the PREWAITNOSCHUNITS environment setting parameter, only the wait processing is performed. However, even when yes is specified for the PREWAITNOSCHUNITS environment setting parameter, if the upper-level jobnet of the unit with wait conditions is not scheduled for execution, no wait is performed. This is because these conditions are included in the range in which the processing of the upper-level jobnet is not performed.

Figure 2‒40: Flow of processing in the case where yes is specified for the PREWAITNOSCHUNITS environment setting parameter

[Figure]

Cautionary note

Even if the environment setting parameter PREWAITNOSCHUNITS is yes, units are not made to wait in the following cases. The succeeding unit is executed without waiting for the end of the unit whose end is being waited for.

  • When a unit with a wait condition that is not scheduled for execution is a dependent unit, and the status of the Judgment job is Normal end + False.

  • When a unit with a wait condition that is not scheduled for execution is the preceding event job of an OR job, and another preceding event job ends.

(4) Status transitions of units with wait conditions and units whose ends are being waited for

(a) Status transitions of units with wait conditions and units whose ends are being waited for when no start condition is used

■ Status transitions of a unit with wait conditions that is scheduled for execution

The following figure shows the status transitions of a unit when its wait conditions are met.

Figure 2‒41: Status transitions of a unit that is scheduled for execution when its wait conditions are met (when no start condition is used)

[Figure]

While the status of the unit whose end is being waited for is Now running, the unit with wait conditions waits in Wait for start time or Wait for prev. to end status until the wait condition is satisfied. Its status while waiting depends on the unit type.

The table below lists, for each unit type, the status that the unit with wait conditions adopts before the wait condition is met. For details on the types of units that can accept wait conditions, see (1)(a) Units with wait conditions and units whose ends are being waited for.

Table 2‒11: Status of units with wait conditions before the wait condition is satisfied by unit type (if the units are scheduled for execution)

No.

Type of unit with wait conditions

Status before wait condition is satisfied

1

Root jobnet

Wait for start time

2

Nested jobnet

Wait for prev. to end

3

  • Standard job

  • Jobnet connector

  • Event job

  • Action job

  • Custom job

  • Passing information setting job

  • HTTP connection job

Wait for prev. to end

When the unit with wait conditions is in Wait for start time or Wait for prev. to end status, the wait condition is satisfied when the unit whose end is being waited for transitions to one of the following statuses:

  • Ended normally

  • Ended with warning

  • Bypassed

When the wait condition is satisfied, the unit with wait conditions enters Now running status and starts executing.

If the unit whose end is being waited for ends abnormally, the unit with wait conditions remains in Wait for start time or Wait for prev. to end status and continues to wait for the wait condition to be satisfied. If this occurs, fix the problem that caused the unit whose end is being waited for to terminate abnormally and then rerun the unit.

■ Status transitions of a unit with wait conditions that is not scheduled for execution

If yes is specified for the PREWAITNOSCHUNITS environment setting parameter, a unit with wait conditions performs a wait even when it is not scheduled for execution. For details about the PREWAITNOSCHUNITS environment setting parameter, see 20.4.2(122) PREWAITNOSCHUNITS in the JP1/Automatic Job Management System 3 Configuration Guide.

The following figure shows the status transitions of units when a wait condition is satisfied.

Figure 2‒42: Status transitions of a unit that is not scheduled for execution when its wait conditions are met (when no start condition is used)

[Figure]

If yes is specified for the PREWAITNOSCHUNITS environment setting parameter, a unit with wait conditions waits for wait conditions to be met even when it is not scheduled for execution. The unit continues to wait in the Not sched. to exe. status while the waiting-target unit (unit whose end is being waited for) is in the Now running status.

The table below lists, for each unit type, the status that the unit with wait conditions adopts before the wait condition is met. For details on the types of units that can accept wait conditions, see (1)(a) Units with wait conditions and units whose ends are being waited for.

Table 2‒12: Status of units with wait conditions before the wait condition is satisfied by unit type (if the units are not scheduled for execution)

No.

Type of unit with wait conditions

Status before wait condition is satisfied

1

Nested jobnet

Not sched. to exe.

2

  • Standard job

  • Event job

  • Action job

  • Custom job

  • Passing information setting job

  • HTTP connection job

Not sched. to exe.

When the unit with wait conditions is in Not sched. to exe. status, the wait condition is satisfied when the unit whose end is being waited for transitions to one of the following statuses:

  • Ended normally

  • Ended with warning

  • Bypassed

When the wait conditions of a unit are met, the unit enters the Bypassed status and the succeeding job begins to run.

If the unit whose end is being waited for ends abnormally, the unit with wait conditions remains in Not sched. to exe. status and continues to wait for the wait condition to be satisfied. If this occurs, fix the problem that caused the unit whose end is being waited for to terminate abnormally and then rerun the unit.

(b) Status transitions of units with wait conditions and units whose ends are being waited for when a start condition is used

■ Status transitions when units whose ends are being waited for use start conditions

The following figure shows the status transitions of units when a wait condition is satisfied.

Figure 2‒43: Status transitions of units when a wait condition is satisfied (when the unit whose end is being waited for uses a start condition)

[Figure]

If a unit with wait conditions is scheduled for execution, the unit waits for the wait conditions to be met in the Wait for start time or Wait for prev. to end status under either of the following conditions: While the monitoring generation of the waiting-target unit (jobnet with start conditions) is in the Now monitoring status or while the execution generation is in the Now running status. Which status the unit enters depends on the type of the unit. For details about the status of a unit with a wait condition until the wait condition is satisfied, see Table 2-11.

A unit with wait conditions enters the Now running status and begins to run when execution of the jobnet with start conditions ends and the wait conditions are met, if the unit is scheduled for execution.

A unit that has wait conditions and is not scheduled for execution waits for the conditions to be met in the Not sched. to exe. status, if environment setting parameter PREWAITNOSCHUNITS is yes, under either of the following conditions: While the monitoring generation of the waiting-target unit (jobnet with start conditions) is in the Now monitoring status or while the execution generation is in the Now running status. For details about the PREWAITNOSCHUNITS environment setting parameter, see 20.4.2(122) PREWAITNOSCHUNITS in the JP1/Automatic Job Management System 3 Configuration Guide. For details about the status of a unit with a wait condition until the wait condition is satisfied, see Table 2-12.

When a jobnet with start conditions ends and wait conditions are met, a unit with wait conditions that is not scheduled to be executed enters the Bypassed status and the succeeding unit runs.

You can change the status of the monitoring generation or an execution generation that marks the end of execution of the root jobnet with the start condition by changing the wait condition. For details, see (5)(c) Behavior of units with wait conditions when start conditions are used for the units whose ends are being waited for.

■ Status transitions when units with wait conditions use start conditions

The following figure shows the status transitions of units when a wait condition is satisfied.

Figure 2‒44: Status transitions of units when a wait condition is satisfied (when the unit with a wait condition uses a start condition)

[Figure]

While the unit whose end is being waited for is in the Now running status, the monitoring generation of the unit with a wait condition (that is, the root jobnet with a start condition) waits in the Wait for start time status for the wait condition to be satisfied. During this time, if an event to be monitored by the start condition occurs, the start condition is not satisfied because monitoring for the start condition has not started yet. As a result, no execution generation starts executing.

Cautionary note

While a root jobnet with a start condition is waiting for the execution of a unit whose end is being waited for to finish executing, no events are monitored. If the unit whose end is being waited for is delayed, the start of monitoring for events is also delayed. To avoid this problem, make sure that a delay in monitoring for events does not cause any problems when you assign a wait condition to a root jobnet with a start condition.

Example of a monitoring delay that does not cause any problems
  • The Monitoring Files job is used to satisfy a start condition even if a file exists before monitoring starts.

    In this case, there are no problems if a unit whose end is being waited for is delayed and the start of monitoring is delayed because the root jobnet with a start condition starts executing at the same time that monitoring starts.

Example of a monitoring delay that causes problems
  • The Interval Control job is used to repeatedly start a jobnet at a preset interval from a specific point in time.

    This case might cause either the start or end of a repetition to be later than the expected time because the repetition start time depends on the time that the unit whose end is being waited for finishes executing.

(c) Status transitions of units when units with wait conditions are not executed even if a wait condition is satisfied

Note that if the unit with wait conditions and the unit whose end is being waited for are defined or run under the following circumstances, the unit with wait conditions might not run even if the wait condition is satisfied:

  • The unit with wait conditions connects to a preceding unit by a relation line

  • A hold attribute is set for the unit with wait conditions

  • Multiple instances of the unit with wait conditions are set to run concurrently

  • You rerun the unit with wait conditions or the unit whose end is being waited for

The following describes the status transitions that take place in these scenarios.

■ When the unit with wait conditions connects to a preceding unit by a relation line

When the unit with wait conditions is connected to a preceding unit by a relation line, the unit with wait conditions does not check whether the wait condition is satisfied until the preceding unit has finished executing. If the wait condition is satisfied before the preceding unit finishes, the unit with wait conditions does not start to execute because it does not check whether the wait condition is satisfied.

The following figure shows an example in which a relation line connects the unit with wait conditions to a preceding unit.

Figure 2‒45: Example with preceding unit connected by relation line

[Figure]

[Figure]

In these examples, Nested Jobnet 1 is defined as the unit whose end is being waited for, for Job 2. Also, Job 1 is defined as a preceding unit of Job 2.

In Example 1, Job 1 finishes executing before Nested Jobnet 1. In this scenario, Job 2 begins to check whether the wait condition is satisfied as soon as Job 1 finishes executing. When Nested Jobnet 1 finishes executing and satisfies the wait condition, Job 2 starts executing.

In Example 2, Nested Jobnet 1 finishes executing before Job 1. In this scenario, even if Nested Jobnet 1 ends normally, Job 2 is not executed because it has not begun to check the status of the wait condition. Only after Job 1 ends normally does Job 2 begin to check whether the condition is satisfied. If Nested Jobnet 1 has ended normally by the time Job 2 begins checking the status of the wait condition, the wait condition is satisfied and Job 2 starts immediately.

■ When a hold attribute is set for the unit with wait conditions

If a hold attribute is set for the unit with wait conditions, the unit does not start executing when the wait condition is satisfied, instead entering a held state.

The following figure shows an example in which a hold attribute is set.

Figure 2‒46: Example with hold attribute set

[Figure]

In this example, a hold attribute is set for Job 1 (the unit with wait conditions) while the job is in Wait for prev. to end status. In this scenario, if the wait condition is satisfied, the status of Job 1 changes to Being held and the job does not start executing until its held status is released.

■ Multiple instances of a unit with wait conditions are run concurrently

If you run multiple concurrent instances of the unit with wait conditions, depending on the concurrent execution and schedule option settings of the root jobnet, a generation of the unit with wait conditions might wait for the current generation to end despite the wait condition being satisfied, or the next scheduled execution of the root jobnet might enter Bypassed status.

The following figure shows examples of the status transitions that apply under different concurrent execution and schedule option settings.

Figure 2‒47: Examples of status transitions for different concurrent execution and schedule option settings

[Figure]

[Figure]

In Example 1, concurrent execution is disabled and multi-schedule is set as the schedule option in the detailed definition of Root Jobnet B (the unit with wait conditions). If Root Jobnet B is registered for immediate execution while the status of Generation 1 of Root Jobnet B is Now running, Generation 2 of Root Jobnet B is generated and waits in Wait for start time status for Generation 2 of Root Jobnet A/Job 1 to finish executing. When Generation 2 of Job 1 finishes executing and satisfies the wait condition, because concurrent execution is disabled, Generation 2 of Root Jobnet B remains in Wait for start time status and waits for Generation 1 of Root Jobnet B to finish executing. Generation 2 of Root Jobnet B starts executing after Generation 1 of Root Jobnet B has finished.

In Example 2, concurrent execution is disabled and schedule skip is set as the schedule option in the detailed definition of Root Jobnet B. If Root Jobnet B is registered for immediate execution while the status of Generation 1 of Root Jobnet B is Now running, Generation 2 of Root Jobnet B is generated. However, because Generation 1 is still running, Generation 2 is skipped and enters Skipped so not exe. status. Subsequently, even if Generation 2 of Job 1 of Root Jobnet A ends normally, Generation 2 of Root Jobnet B does not start executing because it has already been skipped.

In Example 3, concurrent execution is enabled and multi-schedule is set as the schedule option in the detailed definition of Root Jobnet B. If Root Jobnet B is registered for immediate execution while the status of Generation 1 of Root Jobnet B is Now running, Generation 2 of Root Jobnet B is generated and waits in Wait for start time status for Generation 2 of Root Jobnet A/Job 1 to finish executing. When Generation 2 of Job 1 finishes executing and satisfies the wait condition, Generation 2 of Root Jobnet B begins executing.

Cautionary note

When assigning wait conditions for the root jobnet, make sure that the wait conditions for the previous execution schedule are satisfied and that the unit begins to execute before the subsequent execution start time arrives. Even when concurrent execution is enabled and multi-schedule is set, if the previous execution schedule has not yet started, execution will not start when the wait conditions are satisfied.

■ Rerunning units with wait conditions or units whose ends are being waited for

The following describes the status transitions that occur when you rerun a unit with wait conditions or a unit whose end is being waited for.

Behavior when a unit with wait conditions is rerun

If you rerun a unit whose wait condition is already satisfied, the wait condition does not revert to an unsatisfied state. If you rerun a unit that finished executing after its wait condition was satisfied, the unit enters a waiting state. However, because the wait condition is already satisfied, the unit then starts executing immediately.

The following figure shows an example of the status transitions that occur when a unit with wait conditions is rerun.

Figure 2‒48: Example of rerunning a unit with wait conditions

[Figure]

In this example, Root Jobnet B is re-executed after Job 1 (the unit whose end is being waited for) has ended normally and satisfied the wait condition. When Root Jobnet B is rerun, it starts executing immediately without waiting for Job 1 to finish because the wait condition is already satisfied.

Supplementary note

When you rerun a unit that has wait conditions and is not scheduled for execution if yes is specified for the PREWAITNOSCHUNITS environment setting parameter, the unit enters the Bypassed status and the succeeding unit runs.

Behavior when unit whose end is being waited for is rerun

When you rerun a unit whose end is being waited for, only the unit whose end is being waited for is rerun. The unit with the wait condition remains unaffected.

The following figure shows an example of the status transitions that occur when a unit whose end is being waited for is rerun.

Figure 2‒49: Example of rerunning a unit whose end is being waited for

[Figure]

In this example, Job 1 (the unit whose end is being waited for) is rerun after Job 1 and Root Jobnet B (the unit with the wait condition) have both ended normally. In this scenario, Job 1 starts executing, but Root Jobnet B remains in Ended normally and does not restart.

Cautionary note

When you use a start condition for a unit whose end is being waited for, do not re-execute the monitoring generation. Re-executing the monitoring generation will not start monitoring again, and might unexpectedly cause a wait condition to be satisfied. If the monitoring generation has ended in the Monitor terminated or Unmonitored + Ended status when no wait condition is satisfied, disable the wait condition to start execution of the unit with the wait condition. For details about making temporary changes to wait conditions, see 4.5.15 Temporarily changing the wait condition settings for a jobnet or job in the manual JP1/Automatic Job Management System 3 Overview.

(d) Treatment of a wait condition when the succeeding unit of a unit, whose end is being waited for, is rerun

The status of a unit whose end is being waited for by the succeeding unit might change when the succeeding unit is rerun. By using the PREWAITRERUNSTATUS environment setting parameter, whether to meet the wait condition can be controlled based on this status change. In a newly installed JP1/AJS3, the environment setting parameter is initially set to meet the wait condition.

For details about the PREWAITRERUNSTATUS environment setting parameter, see 20.4.2(110) PREWAITRERUNSTATUS in the JP1/Automatic Job Management System 3 Configuration Guide.

Configuring so that the wait condition is met:

If the PREWAITRERUNSTATUS environment setting parameter is set to no and running the succeeding unit changes the status of the unit whose end is being waited for, the wait condition is met and the unit with wait conditions then starts running.

The following figure shows an example of rerunning the succeeding job of a unit whose end is being waited for, while the PREWAITRERUNSTATUS environment setting parameter is set to no.

Figure 2‒50: Example of rerunning a succeeding unit of a unit whose end is being waited for (configuring so that the wait condition is met)

[Figure]

In this example, Job 2 is the unit whose end is being waited for and Job 3 is a succeeding unit of Job 2. If Job 3 is re-executed while both Job 3 and Job 2 are in Not executed + Ended status, the status of Job 2 changes from Not executed+ Ended to Bypassed.

If the PREWAITRERUNSTATUS environment setting parameter is set to no, the wait status changes to Wait complete, causing the wait condition to be met. As a result, root jobnet A, which is a unit with wait conditions, starts running.

If the PREWAITRERUNSTATUS environment setting parameter is set to no, be careful if rerunning of the succeeding unit changes the status of a unit whose end is being waited for. If you intend to rerun a succeeding unit of a unit whose end is being waited for, make sure that you are fully aware of the effects such an action will have. You can do so by conducting a search to make sure that the unit whose end is being waited for is not one of the units whose status will be affected. For details on rerunning a unit, see 4.5.11 Rerunning a job or jobnet in the manual JP1/Automatic Job Management System 3 Overview. For details on how to search for wait conditions, see 10.2 Finding and displaying units in the JP1/Automatic Job Management System 3 Operator's Guide.

Configuring so that wait condition is not met:

If the PREWAITRERUNSTATUS environment setting parameter is set to yes, the wait condition is not met when the status of a unit whose end is being waited for is changed by rerunning the succeeding unit. Therefore, the status of the unit with wait conditions does not change.

This setting can prevent a wait condition from being unintentionally met when the status of the preceding unit is changed by rerunning a unit.

The following figure shows an example of rerunning the succeeding job of a unit whose end is being waited for if the PREWAITRERUNSTATUS environment setting parameter is set to yes.

Figure 2‒51: Example of rerunning a succeeding unit of a unit whose end is being waited for (configuring so that the wait condition is not met)

[Figure]

The unit definitions in the above example are the same as those in the example in the case where the wait condition is met. When job 3 is rerun, the status of job 2 changes from Not executed + Ended to Bypassed.

However, if the PREWAITRERUNSTATUS environment setting parameter is set to yes, the wait condition changes to Wait incomplete. As a result, the wait condition is not met. Therefore, the status of root jobnet A, which is a unit with wait conditions, does not change.

Note that if job 2, which is a unit whose end is being waited for, is re-executed and the execution ends, the wait condition is met, causing root jobnet A to start running.

If the unit whose end is being waited for is a jobnet and subordinate units are individually rerun, a wait is completed when the jobnet ends. If necessary, set the hold attribute or change the job status so that the wait condition is not met.

(5) Configuring the behavior of units with wait conditions

In addition to the name of the unit whose end is being waited for, the following attributes can be set for a wait condition:

These attributes are described below.

(a) Wait methods for conditions with multiple units whose ends are being waited for

You can specify, for each unit with wait conditions, a maximum of 32 units whose ends are being waited for. If you specify more than one unit whose end is being waited for, you can specify whether the condition is satisfied when all of the units whose ends are being waited for finish executing, or just one.

You can choose either of the following wait methods:

  • AND

    The wait condition is satisfied when all specified units whose ends are being waited for finish executing.

  • OR

    The wait condition is satisfied when any one of the specified units whose ends are being waited for finishes executing.

The following figure shows the difference between the two wait methods.

Figure 2‒52: Difference between AND and OR wait methods

[Figure]

In these examples, Nested Jobnet 1 and Nested Jobnet 2 are specified for Job 1, the unit with wait conditions, as the units whose ends are being waited for.

In Example 1, which uses the AND wait method, the condition is satisfied and Job 1 starts executing when Nested Jobnet 1 and Nested Jobnet 2 have both finished executing.

In Example 2, which uses the OR wait method, the condition is satisfied and Job 1 starts executing when Nested Jobnet 1 finishes executing.

Cautionary note

Assigning a large number of wait conditions to a single unit can slow down the processing speed of the JP1/AJS3 system. When designing a unit with wait conditions, try to use as few units whose ends are being waited for as possible.

The following figure shows an example of how you can reduce the number of units whose ends are being waited for.

Figure 2‒53: Example of reducing the number of units whose ends are being waited for

[Figure]

In the example with the greater number of units whose ends are being waited for, Job 1, Job 2, and Job 3 are specified for job 4 (the unit with wait conditions) as the units whose ends are being waited for. In this example, the number of units whose ends are being waited for is reduced by defining an empty job (Job 0) as a succeeding unit of Jobs 1, 2, and 3, and connecting each of Jobs 1, 2, and 3 to Job 0 by relation lines. For Job 4, you can then specify Job 0 as the unit whose end is being waited for, achieving the same results with fewer units whose ends are being waited for. However, defining empty jobs like the one pictured above can complicate job management. For this reason, we recommend that you avoid defining superfluous units unless performance considerations demand it.

Supplementary note

When using the AND wait method, if you perform a hot restart of the scheduler service after some of the units whose ends are being waited for have finished executing, the status of the wait condition is retained after the scheduler service restarts. This means that the wait condition will be satisfied when the remaining units whose ends are being waited for finish executing.

For example, suppose that in Example 1 of Figure 2-52 you perform a hot restart of the scheduler service after Nested Jobnet 1 has ended normally and Nested Jobnet 2 is running. In this scenario, the wait condition is satisfied when Nested Jobnet 2 finishes executing after the scheduler service restarts.

(b) Behavior of units with wait conditions when there are no applicable generations of units whose ends are being waited for

Units with wait conditions wait for specific generations of their units whose end is being waited for to finish executing, according to the rules described in (2) Rules governing waiting regarding units with wait conditions and units whose ends are being waited for. However, if there are no generations of the unit whose end is being waited for that satisfy the wait rule, the unit with the wait condition can be configured to behave in either of the following ways:

  • Do not start executing

    When there are no applicable generations of the unit whose end is being waited for, the unit with the wait condition continues waiting for the wait condition to be satisfied with a status of either Wait for start time, Wait for prev. to end, or Not sched. to exe.#.

    #

    If yes is specified for the PREWAITNOSCHUNITS environment setting parameter, the unit with wait conditions performs a wait even if the unit is in the Not sched. to exe. status. For details about the PREWAITNOSCHUNITS environment setting parameter, see 20.4.2(122) PREWAITNOSCHUNITS in the JP1/Automatic Job Management System 3 Configuration Guide.

  • Start executing

    When there are no applicable generations of the unit whose end is being waited for, the unit with the wait condition immediately starts executing. If the wait condition applies to multiple units whose ends are being waited for, the unit starts executing when there are no applicable generations of any units whose ends are being waited for that have not finished executing.

This setting applies when the unit with wait conditions and the unit whose end is being waited for are associated with different root jobnets. If both units are under the same root jobnet, they run as part of the same generation, which means there is always a generation of the unit whose end is being waited for that satisfies the wait rule.

The following figure shows the differences between the settings that govern how wait conditions behave when there are no applicable generations of units whose ends are being waited for.

Figure 2‒54: Differences in behavior when there are no settings specifying applicable generations of units whose ends are being waited for

[Figure]

In Example 1, the setting for when there are no applicable generations of units whose ends are being waited for is Do not start executing. When Root Jobnet B, an upper-level unit of Job 1 (the unit with wait conditions), is registered for immediate execution, a generation of Job 1 is generated. Because there is no generation of Nested Jobnet 1 (the unit whose end is being waited for), Job 1 enters Wait for prev. to end status and waits for the wait condition to be satisfied. If Root Jobnet A, an upper-level unit of Nested Jobnet 1, is registered for immediate execution, and then Nested Jobnet 1 ends normally, the wait condition is satisfied and Job 1 starts executing.

In Example 2, the setting for when there are no applicable generations of units whose ends are being waited for is Start executing. When Root Jobnet B is registered for immediate execution, a generation of Job 1 is generated. Because no generation of Nested Jobnet 1 exists at this time, Job 1 immediately starts executing. If Root Jobnet A, an upper-level unit of Nested Jobnet 1, is registered for immediate execution after Job 1 has already started executing, a normal termination of Nested Jobnet 1 will not trigger another generation of Job 1.

Supplementary notes
  • If the status of the unit whose end is being waited for is Not sched. to exe., the setting governing behavior when no applicable generations are present does not apply if the root jobnet associated with the unit whose end is being waited for has an execution schedule. In this scenario, the unit whose end is being waited for enters Bypassed status when its root jobnet is executed. This causes the unit whose end is being waited for to be seen as having finished executing, which satisfies the wait condition.

  • If the status of the root jobnet of the unit whose end is being waited for is Not registered, the Start executing setting does not take effect and the unit with wait conditions does not start to execute.

(c) Behavior of units with wait conditions when start conditions are used for the units whose ends are being waited for

When you use a start condition for a unit whose end is being waited for, you can change the wait condition to change the status the unit whose end is being waited for must have so it can finish executing.

  • When the monitoring generation of the unit whose end is being waited for ends in the Unmonitored + Ended status

    The wait condition can be satisfied when the monitoring generation ends in the Unmonitored + Ended status.

  • When an execution generation of the unit whose end is being waited for ends abnormally

    The wait condition can be satisfied when an execution generation ends abnormally.

    The wait condition can also be satisfied when the abnormal termination status of an execution generation is the Skipped so not exe.

The following examples describe how you can change a wait condition:

  • If you want a unit to end without satisfying a start condition during event monitoring

    If you want operation to be treated as normal even if no start condition at all is satisfied during the time period specified as the valid range for the start condition, you can cause the wait condition to be satisfied when the monitoring generation enters the Unmonitored + Ended status.

  • If you want operation to continue when an execution generation enters the Ended abnormally or Killed status

    When a start condition is satisfied multiple times, if you want operation to be treated as normal even if some of generated execution generations end abnormally, you can cause the wait condition to be satisfied when execution generations end abnormally.

  • If generations waiting to be executed are set not to be retained even when many start conditions are to be satisfied while the monitoring generation is in the Now monitoring status

    If execution generations waiting to be executed are set not to be retained even when many start conditions are satisfied, the execution generations that have not started executing enter the Skipped so not exe. status. If you want operation to be treated as normal even when execution generations enter the Skipped so not exe. status, you can cause the wait condition to be satisfied when execution generations enter the Skipped so not exe. status.

■ Configuring the end of execution for the monitoring generation when a unit whose end is being waited for uses a start condition

When a unit whose end is being waited for uses a start condition, you can set that the monitoring generation transitions to the Unmonitored + Ended status as the end of execution of the monitoring generation.

In the Waiting Condition Settings dialog box, in the When Unmonitored + Ended section, choose either of the following:

  • Do not execute (default)

    The unit with a wait condition does not start executing even if the monitoring generation enters the Unmonitored + Ended status.

  • Execute

    The unit with a wait condition starts executing when the monitoring generation enters the Unmonitored + Ended status.

The following table describes how to end the execution of a root jobnet with a start condition by using these options.

Table 2‒13: Settings in the When Unmonitored + Ended section and statuses that end execution of a root jobnet with a start condition

Do not execute (default)

Execute

Monitoring generation
  • Monitor-end normal

Execution generation#
  • Ended normally

  • Ended with warning

Monitoring generation
  • Monitor-end normal

  • Unmonitored + Ended

Execution generation#
  • Ended normally

  • Ended with warning

#

You can also change the status an execution generation must have to end its execution by changing the behavior of the unit with a wait condition. This table assumes that the default settings are used.

The following figure explains the difference in the behavior of units with wait conditions resulting from the option chosen in the When Unmonitored + Ended section.

Figure 2‒55: Difference in the behavior of units with wait conditions resulting from the option chosen in the When Unmonitored + Ended section

[Figure]

In example 1, Do not execute is chosen in the When Unmonitored + Ended section for the wait condition defined for Job 1. If the start condition is never satisfied while the monitoring generation of Root Jobnet A (the unit whose end is being waited for) is in the Now monitoring status, the monitoring generation transitions to the Unmonitored + Ended status. Accordingly, Job 1 (the unit with the wait condition) continues to wait in the Wait for prev. to end status for the wait condition to be satisfied.

In example 2, Execute is chosen in the When Unmonitored + Ended section for the wait condition defined for Job 1. If the start condition is never satisfied while the monitoring generation of Root Jobnet A is in the Now monitoring status, the monitoring generation transitions to the Unmonitored + Ended status. With the transition, the wait condition is satisfied and Job 1 (the unit with the wait condition) starts executing.

■ Configuring the end of execution for an execution generation when a unit whose end is being waited for uses a start condition

When a unit whose end is being waited for uses a start condition, you can set that an execution generation transitions to the Skipped so not exe. status or any end status, including abnormal termination, as the end of execution of the execution generation.

In the Waiting Condition Settings dialog box, in the Abnormal end for an execution generation section, choose either of the following:

  • Do not execute (default)

    If an execution generation ends abnormally, the unit with a wait condition does not start executing. However, if the execution generation is in the Skipped so not exe. status, you can choose whether to start execution of the unit. By default, the unit with a wait condition does not start executing when an execution generation is in the Skipped so not exe. status.

  • Execute

    Even if an execution generation ends abnormally, the unit with a wait condition starts executing. When you choose this option, all types of end statuses are considered to be the end of execution.

The following table describes how to end the execution of a root jobnet with a start condition by using these options.

Table 2‒14: Settings in the Abnormal end for an execution generation section and statuses that end execution of a root jobnet with a start condition

Do not execute

Execute

Do not start execution even if the execution generation is in the Skipped so not exe. status (default)

Start execution when the execution generation is in the Skipped so not exe. status

Monitoring generation#
  • Monitor-end normal

Execution generation
  • Ended normally

  • Ended with warning

Monitoring generation#
  • Monitor-end normal

Execution generation
  • Ended normally

  • Ended with warning

  • Skipped so not exe.

Monitoring generation#
  • Monitor-end normal

Execution generation
  • All types of end statuses

#

You can also change the status the monitoring generation must have to end its execution by changing the behavior of the unit with a wait condition. This table assumes that the default settings are used.

The following figure shows the difference in the behavior of units with wait conditions resulting from the option chosen in the Abnormal end for an execution generation section.

Figure 2‒56: Difference in the behavior of units with wait conditions resulting from the option chosen in the Abnormal end for an execution generation section

[Figure]

In example 1, Do not execute is chosen in the Abnormal end for an execution generation section for the wait condition defined for Job 1. When execution generation 1 ends normally and execution generation 2 ends abnormally, Job 1 (the unit with a wait condition) continues to wait in the Wait for prev. to end status for the wait condition to be satisfied.

[Figure]

In example 2, Do not execute is chosen in the Abnormal end for an execution generation section for the wait condition defined for Job 1. However, the unit starts executing when the execution generation is in the Skipped so not exe. status. The execution generations of Root Jobnet A are not retained. As a result, if the start condition is satisfied while execution generation 1 is executing and execution generation 2 enters the Skipped so not exe. status, the wait condition is satisfied when execution generation 1 enters the Ended normally status.

[Figure]

In example 3, Execute is chosen in the Abnormal end for an execution generation section for the wait condition defined for Job 1. If execution generation 2 is forced to end and enters the Killed status while it is executing, the wait condition is satisfied.

Cautionary note

The option chosen in the Abnormal end for an execution generation section is applied to saved generations. For example, if some saved execution generations have been deleted because the number of logs to keep is exceeded, whether the wait condition is satisfied is determined starting with the remaining execution generations. In other words, even if Do not execute is chosen in the Abnormal end for an execution generation section, the wait condition is satisfied when all the abnormally-ended execution generations are deleted and all the remaining generations have ended normally.

When you specify a root jobnet with a start condition as the unit whose end is being waited for, estimate the number of logs to keep after taking into consideration the number of execution generations that will be started by the start condition. This precaution ensures that saved execution generations will not be deleted while waiting.

For details about the number of logs to keep for root jobnets with start conditions, see 4.2.3(3) Examples of managing saved generations for a jobnet with a start condition in the manual JP1/Automatic Job Management System 3 Overview and 7.2 Relationship between number of logs to keep and performance. You can then determine the settings.

(6) Temporarily changing a wait condition

You can temporarily enable or disable the waiting process with respect to a unit whose end is being waited for specified in the wait conditions.

When you enable waiting for a unit with wait conditions that has finished executing, its status changes to Wait incomplete (manual). This unit will resume the waiting process if you rerun it. If you disable waiting for a unit that is waiting for a unit whose end is being waited for to finish executing, its status changes to Wait complete (manual). If you change the status to Wait complete (manual) for every unit whose end is being waited for that is subject to an AND wait method, the unit with wait conditions will immediately start executing. If the wait method is OR, the unit with wait conditions will start executing if you change the waiting status of any one of the units whose ends are being waited for to Wait complete (manual).

The following figure shows how the wait status is affected by enabling or disabling a wait condition.

Figure 2‒57: Effect on wait statuses from enabling or disabling wait conditions

[Figure]

The wait status is Wait incomplete while the unit with wait conditions is in Wait for start time, Wait for prev. to end, or Not sched. to exe.# status and the unit whose end is being waited for is running. If you disable waiting, the wait status changes to Wait complete (manual) and the unit with wait conditions starts executing. If you enable waiting after the unit with wait conditions has finished executing, the wait status changes to Wait incomplete (manual), and the unit will resume the waiting process if you rerun it. In this context, if the unit whose end is being waited for terminates normally, the waiting status changes to Wait complete and the unit with wait conditions starts executing.

#

If yes is specified for the PREWAITNOSCHUNITS environment setting parameter, the unit with wait conditions performs a wait even if the unit is in the Not sched. to exe. status. For details about the PREWAITNOSCHUNITS environment setting parameter, see 20.4.2(122) PREWAITNOSCHUNITS in the JP1/Automatic Job Management System 3 Configuration Guide.

To temporarily change waiting condition settings, in the Wait Conditions Statuses window, from the Operations menu, choose Waiting and then Wait Enabled or Wait Disabled.

For details on temporarily changing waiting condition settings, see 4.5.15 Temporarily changing the wait condition settings for a jobnet or job in the manual JP1/Automatic Job Management System 3 Overview.

(7) Behavior of units with wait conditions when the definition for the unit whose end is being waited for is invalid

When you use wait conditions to control the order of unit execution, the process might not work as intended if you perform any of the following operations:

Such operations result in what is called an invalid definition for the unit whose end is being waited for. The response to an invalid definition for the unit whose end is being waited for depends on whether the unit whose end is being waited for has been registered for execution, and whether the unit whose end is being waited for is suspended.

When the unit whose end is being waited for is unregistered or is suspended

The message KAVS4957-E or KAVS4971-E is output, and the unit with wait conditions does not start executing.

If the unit whose end is being waited for is suspended, the waiting process does not conclude when that unit finishes executing. If the unit whose end is being waited for terminates abnormally or is deleted, the unit with wait conditions does not itself terminate abnormally or output a message. The behavior of the unit with wait conditions in this scenario depends on the status of the unit whose end is being waited for when its suspension is released.

When the unit whose end is being waited for has been registered for execution and is not suspended

The message KAVS4954-E is output and the unit with wait conditions terminates abnormally.

The following figure shows an example of an invalid definition for the unit whose end is being waited for.

Figure 2‒58: Example of invalid definition for the unit whose end is being waited for

[Figure]

In this example, the specification of a remote jobnet as the unit whose end is being waited for has caused an invalid definition for the unit whose end is being waited for. If you register Root Jobnet B for execution before registering Remote Jobnet A, Job 1 (the unit with wait conditions) enters Wait for prev. to end status and waits for the unit whose end is being waited for to finish executing. At this point, the system outputs an error message indicating that the unit whose end is being waited for has not been registered for execution. If Remote Jobnet A is subsequently registered for execution, although a generation of Remote Jobnet A is scheduled, Job 1 terminates abnormally due to the invalid definition for the unit whose end is being waited for.

An invalid definition also results if you delete, move, or rename a root jobnet or planning group that is serving as a unit whose end is being waited for, after specifying it in a wait condition. In this scenario, the unit with wait conditions undergoes an abnormal termination as soon as it starts executing.

When OR is specified as the wait method, the unit with wait conditions will start executing if another unit whose end is being waited for finishes executing and satisfies the wait condition before the invalid definition is detected. However, if the invalid definition is detected before this can happen, the unit with wait conditions will terminate abnormally.

Preventing invalid definitions for the unit whose end is being waited for

To prevent invalid definitions from occurring, change the wait conditions accordingly each time you rename or delete a unit whose end is being waited for.

You can also use either of the following methods to preemptively check whether an invalid definition for the unit whose end is being waited for exists in a wait condition:

  • Definition pre-check

    You can use the definition pre-check function to check whether the wait condition is defined correctly. For details on conducting a definition pre-check, see 8. Definition Pre-Check.

    A definition pre-check does not discover the following problems, which must be identified separately by monitoring the operation of the wait condition:

    - An execution sequence loop caused by a wait condition

    - An invalid definition caused by specifying a nested jobnet or job under a planning group as a unit whose end is being waited for

    - An invalid definition caused by using a start condition

  • Check the Wait Conditions Settings List window

    You can check for invalid definitions for the unit whose end is being waited for in the Wait Conditions Settings List window of JP1/AJS3 - View. For details, see (8) Checking units whose ends are being waited for.

(8) Checking units whose ends are being waited for

If you use JP1/AJS3 - View or the ajsshow command to define or monitor units with wait conditions, you can use the following methods to view a list of units with wait conditions and units whose ends are being waited for.

Checking wait condition settings

You can use the Wait Conditions Settings List window of JP1/AJS3 - View to view detailed wait condition settings.

The figure below shows the Wait Conditions Settings List window.

Figure 2‒59: Wait Conditions Settings List window

[Figure]

The Wait Conditions Settings List window lists all the units with wait conditions under a given unit, and also lists the units whose ends are being waited for that are specified for those units. You can use this information to check for invalid definitions among the units whose ends are being waited for, and to find out which wait method applies to the unit and its behavior when there are no applicable generations of the target unit.

Checking the status of wait conditions

You can use the Wait Conditions Statuses window of JP1/AJS3 - View or the ajsshow command with the -xw option to check the status of the units whose ends are being waited for regarding active units with wait conditions.

The following figure shows the Wait Conditions Statuses window.

Figure 2‒60: Wait Conditions Statuses window

[Figure]

The Wait Conditions Statuses window displays a list of specific units with wait conditions, and displays the units whose ends are being waited for that are associated with those units. This allows you to check whether a unit whose end is being waited for is executing normally, without displaying the Jobnet Monitor window. You can also use it to check the wait status of a unit with wait conditions.

When you use a start condition for a unit whose end is being waited for, the information about the monitoring generation is displayed as information about the unit whose end is being waited for. Based on the status of the monitoring generation and the wait status, you can determine the execution status of the unit whose end is being waited for. For details, see 8.3.3(1) Checking the wait status when a unit whose end is being waited for uses a start condition in the JP1/Automatic Job Management System 3 Administration Guide.

The Wait Conditions Statuses window also lets you enable or disable waiting for individual units whose ends are being waited for, and open the Jobnet Monitor window to display the status of units whose ends are being waited for.

For details on the ajsshow command, see ajsshow in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

Cautionary notes
  • The Wait Conditions Statuses window might take a long time to display information when a large number of units whose ends are being waited for are assigned to a unit with wait conditions. Refer to the cautionary note in (5)(a) Wait methods for conditions with multiple units whose ends are being waited for, and try to use as few units whose ends are being waited for as possible.

  • To open the Jobnet Monitor window for a unit whose end is being waited for from the Wait Conditions Statuses window, you need to have JP1_AJS_Guest permission for the unit whose end is being waited for and its upper-level jobnet.

  • The information displayed in the Wait Conditions Statuses window and the output of the ajsshow command is always based on the waiting rules. If you intend to restart the waiting process by enabling waiting for a unit and rerunning it, you can use this information to predict how the unit will behave when the waiting process starts (for example, whether it will wait for the unit whose end is being waited for to finish executing, or start executing immediately).

    If you perform an operation that adds or deletes a generation of a unit with wait conditions or a unit whose end is being waited for, the waiting rules will select a different generation as the unit whose end is being waited for. This means that the generation displayed in the Wait Conditions Statuses window or the output of the ajsshow command might differ from the one that causes the wait status to transition to Wait complete. To ensure that the window always displays information for the true unit whose end is being waited for when the wait status changes to Wait complete, configure the system to save one day's generations of the unit with wait conditions and the unit whose end is being waited for, to ensure that the waiting rules always select the right generation of the unit whose end is being waited for. For details on waiting rules, see (2) Rules governing waiting regarding units with wait conditions and units whose ends are being waited for.

For details on the Wait Conditions Settings List window and the Wait Conditions Statuses window, see 12. Windows and Dialog Boxes in the JP1/Automatic Job Management System 3 Operator's Guide.

(9) Choosing between wait conditions or jobnet connectors for execution order control

When you want to control the execution order of units in different root jobnets, you can use wait conditions or jobnet connectors to establish links between units.

Select whether to use wait conditions or jobnet connectors according to your operational requirements.

The following table lists the advantages and disadvantages associated with wait conditions and jobnet connectors in specific contexts.

Table 2‒15: Advantages and disadvantages of wait conditions and jobnet connectors

Context

Wait condition

Jobnet connector

Unit configuration

Advantages

Can be defined by simply assigning a wait condition to the succeeding unit (unit with wait conditions), requiring no changes to jobnet configuration.

Disadvantages

None.

Advantages

None.

Disadvantages
  • Requires the definition of a new jobnet connector.

  • You cannot define a nested jobnet as a connection-destination jobnet without redefining the nested jobnet as a root jobnet.

Detailed unit definitions

Advantages

There is no need to edit the detailed definition of the preceding-side unit (unit whose end is being waited for).

Disadvantages

None.

Advantages

None.

Disadvantages

The connection range and jobnet connector name must be specified in the detailed definition of the connection-destination jobnet.

Methods of linking units

Advantages
  • Root jobnets, nested jobnets, and various job types can be linked together.

  • You can assign more than one unit whose end is being waited for to one unit with wait conditions.

Disadvantages

You cannot use wait conditions to link units under the control of different scheduler services. Units under different scheduler services can only be linked by using jobnet connectors or other means to redefine the jobnets, which demands the use of other methods in parallel with wait conditions.

Advantages

Links can be created between root jobnets under the control of different scheduler services, allowing jobnet connectors to be used exclusively.

Disadvantages
  • Only root jobnets can be linked.

  • You can only link one root jobnet to each jobnet connector.

Unit monitoring

Advantages

You can use the Wait Conditions Statuses window to view a list of units whose ends are being waited for and units with wait conditions.

Disadvantages
  • Because no relation lines are drawn between units whose ends are being waited for and units with wait conditions, it can be hard to ascertain the execution order.

  • The status of the unit whose end is being waited for is not reflected in the status of the unit with wait conditions.

Advantages
  • The execution order is easy to ascertain because relation lines are drawn between jobnet connectors and other units.

  • The status of the connection-destination jobnet applies to the jobnet connector. This means you can centrally monitor the status of the connection-destination jobnet by monitoring the root jobnet associated with the jobnet connector.

Disadvantages

None.