Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

This example configures a job chain with jobs that use a special monitor to read parameters from job chain parameter files. The parameters in these files can reference other (global) parameters.

Downloads

Instructions

  • Unzip all files into the ./config folder of your JobScheduler installation.
  • Open config/scheduler.xml and add the following lines right before the <security> element:

    Code Block
    <params> 
      <param name="global_configuration_params" value="config/scheduler_global_vars.xml"/> 
    </params>

...

Nothing special so far. The next section explains how these resulting parameters were configured.

How it works

The job chain chain_a is very simple. It consists of two steps, "first" and "second". Both steps use the same job readparam. The readparam job is a small JavaScript job which reads all order parameters and logs them on info-level.

The Java monitor implementation

The sos.scheduler.managed.configuration.ConfigurationOrderMonitor is configured as a monitor for the job. This is a special pre/post-execution script which is included in the JobScheduler distribution. It can be used for all jobs.

In the JobScheduler Object Editor, JOE, it the monitor implementation is called under JobScheduler Objects.Jobs.Jobname.Pre-/Post-Processing as a Java configuration_monitor. The monitor reads special job chain parameter files which set parameters for a job chain and are able to configure each node of a job chain individually. These parameter files are named by default according to the pattern myJobChain.config.xml.
The following screen-shot shows the job chain node parameters for the example:Image Added

Note:

This cannot be done using normal order parameters. It could be achieved by using job parameters, but if the same job is used at multiple steps in a job chain or in different job chains you would have to define multiple instances of that job, although it is the same job implementation.
(For example, if a job chain consists of three steps:

...

You could use the same job for steps 1 and two, but you would need different parameters.) So, in this example we use the same job twice, but as you have seen from the log, with different parameters.

The example in detail:

When using hot folders, the configuration monitor looks for the job chain parameter file in the current hot folder and expects the name job_chain_name.config.xml. So in this case, the name of the job chain parameter file is chain_a.config.xml.

...