Try OpenEdge Now
skip to main content
Resource Monitoring
Creating Jobs and Job Templates : Creating a job instance : Job chaining

Job chaining

When you link individual job instances together in a sequence based on the presence of a specific exit code, you are performing job chaining. Using the value of an exit code that occurs in response to a job having been run, you can determine the processes, or control the flow of processes, that occur once one job ends and the next one begins.
The following figure shows a simple job chaining scenario involving the following four job instances: Job Instance A, Job Instance B, Job Instance C, and Job Instance D. Each job instance has an exit code of 0 already defined. The job chaining in this scenario occurs only if the exit code of 0 is recognized at the end of job instances A, B, and C. If any of the jobs concludes with an exit code other than 0, the job chain ends at that point in the process.
Figure 1. Sample job chaining scenario
If you want to account for more than one exit code condition, you can use a more sophisticated implementation of job chaining known as job chaining with flow control. You can set up one job chain to implement different job chains, depending on the exit code generated by a given job in the chain.
The following figure illustrates a sample job chaining with flow control scenario. One of two possible flows is determined based on the value of the exit codes.
Figure 2. Sample job chaining with flow control scenario
* A word about recursion