Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Automatic Job Management System 3 System Design (Work Tasks) Guide


2.4.6 Executing a specific process when a job ends abnormally (example of defining a jobnet that uses a recovery unit)

Use a recovery unit when defining a jobnet in which a process is executed only if a job ends abnormally.

You can set a recovery unit by entering Recovery in Type in the Attributes definition of the job or jobnet. Any job or jobnet can be set the recovery attributes.

Organization of this subsection

(1) Example of defining a jobnet that uses a recovery job

In the example below, a recovery job is used in defining a jobnet that performs a stock check, and then creates an order entry form if there is adequate stock. If there is insufficient stock, the stock check job ends abnormally, a purchase order form is created, and then the order entry form is created.

Figure 2‒83: Example of defining a jobnet that uses a recovery job

[Figure]

In this example, the stock check job returns 5 or a higher value if the execution result indicates a stock shortage.

First, set Judgment by threshold as the end judgment of the stock check job and set the abnormal threshold to 4. (That is, the stock check job ends normally if the return code is 4 or lower, or ends abnormally if the return code is 5 or higher.) If the stock check job ends normally, the create order entry form job will be executed next. Therefore, leave Normal (default) as the create order entry form job's Type setting. If the stock check job ends abnormally, the create purchase order form job will be executed next. Therefore, set Recovery in Type in the Attributes definition of the create purchase order form job. When this job ends, the create order entry form-R job will be executed. Set Recovery in Type for this job too (because only a recovery unit can be defined as the succeeding unit of a recovery unit).

Accordingly, the succeeding job of the stock check job is as follows:

Note that when a recovery unit is executed (because the preceding job ended abnormally), even if that recovery unit ends normally, the entire jobnet in which those units are defined is assumed to have ended abnormally. Also, if no preceding job is defined, the recovery unit is not be executed and is set to Not executed + Ended status.

Supplementary note

When you define an OR job as a recovery job, you must define its preceding event jobs and its succeeding job as recovery jobs.

(2) Example of defining multiple preceding jobs for a recovery unit

You can define multiple preceding jobs for a recovery unit. In this case, the recovery unit will be executed only if all the preceding jobs end abnormally. An example of defining multiple preceding jobs for a recovery job is shown below.

Figure 2‒84: Example of defining multiple preceding jobs

[Figure]

In this example, recovery job A is executed only if standard jobs A, B, and C all end abnormally. Recovery job B is executed following normal termination of recovery job A.