Nesting Jobs

Previous Next

See Also

There are two ways in which a job can be called from within another job:

· By defining a job task. In this case, the job being called resides in the same environment as the job calling it. This means that parameters passed on to the first job, for example, 'data-directory', are available to the second job as well. It is not possible to pass on specific input parameters when calling the second job: the job being called is expected to use the same input and output parameter set as its parent.

However, the parameter set can be supplied for the job which is being called, it is then possible for the job being called to have a different input and output parameter set to its parent. In this case both the parent's input and output set and the second job's own input and output set are available. Note that it is not mandatory to fill a parameter set for the second job: the input and output parameter set can be used even if they are not filled. This all also applies for additional nested jobs.

· By starting another job using either ActionStartJob or one of the BatchRunner component methods (RunJob, job-method). In this case, the second job does not reside in the same environment as the job that is calling it. But parameters can be passed on to the second job, which means that when the second job needs to use, for example, the same 'data-directory' as the job calling it, it can request the data-directory of the active job by using the BatchRunner.GetJobProperty() method and pass it on as a parameter in, for example, the RunJob method.

If the job being called does not have an input and/or output parameter set, or the sets are different from the parent job, then the job being called can also access the parameter sets of the parent job. However, when the job being called has the same input and/or output parameter set as the calling job, then the job being called can ONLY access its own input and/or output parameter set. The values of the input and/or output parameter set of the calling job will then remain unaffected.