Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Various changes to text

...

  • The first uses job chain node parameters defined for an order.
  • The second example uses job chain node parameters defined for the job chain itself and also demonstrates referencing of global parameters.

Anchor
example1
example1
Example showing job chain node parameters defined for an order

This example shows how job chain node parameters can be configured in an order and assigned to specific job chain nodes.

In addition, the example shows how these parameters can be called in shell jobs and used together with 'standard' job and order parameters.

Feature Availability

This feature is available with the following releases (See JS-1693 for more information)
 

Example Download

You can download the example:

...

  • The syntax for order parameters that are specific to a job chain node is <node>/<name>.
    (This is in contrast to the 'standard' order parameter syntax of <name>.)
  • Note

...

  • A

    that a leading \ is required before ${ when job chain node

    parameter will be overwritten by

    parameters are defined for an order

    node parameter with the same name.

    (as with this example).

    • For example:

      • <param  name="200/orderNodeParam" value="200 \${jobParam} - \${orderParam}"/>

      The leading \ is not required when job chain node parameters are defined for the job chain itself (as with the second example below).

Note on usage

  • A job chain node parameter will be overwritten by an order node parameter that has the same name.
  • Order node parameters can be used if job chain node parameters Order node parameters can be used if job chain node parameters have not been defined and a job chain configuration file has not been created.

...

Code Block
languagexml
  <job  stop_on_error="no" order="yes" name="job1">
     ....
    <monitor  name="configuration_monitor" ordering="0">
        <script  language="java" java_class_path="" java_class="sos.scheduler.managed.configuration.ConfigurationOrderMonitor"/>
    </monitor>
  /job>

 

Anchor
example2
example2
Example showing job chain node parameters defined for the job chain

This example shows how job chain node parameters can be configured for a the job chain itself and assigned to specific nodes in that chain, independently of the order being run or the jobs specified for individual nodes in the chain.

In addition, the example shows:how these :

  • job chain node parameters can be called in shell jobs and used together with global variables.
  • a configuration monitor and a job chain parameter file are used.

Example Download

You can download the example:

...

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

The Java monitor implementation

...

In the JobScheduler Object Editor, JOE, 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. This parameter file is listed in the Example in detail section below. See the How to configure a Named Monitor article for more information about monitor configuration.

The screenshot below shows the monitor configuration in JOE.

...


The following screen-shot shows the job chain node parameters for the example:

Image Modified

The next screen-shot shows the Details for JobChain form, which can be used to edit the param1 and param2 parameters. This form is opened with the Parameter button shown in the previous screenshot (top right):

Image Modified

Note that the node parameters - param3 and param4 are set and edited using JOE's XML editor, which is accessed using the OpenXML button shown in the screenshot.
(See also the Example in Detail section below.)

Anchor
detail2
detail2
The example in detail:

The configuration monitor looks for the job chain parameter file in the current live folder and expects the name file to be named job_chain_name.config.xml. So in this case, the name of the job chain parameter file is chain_a.config.xml.

...

  • The second <params> element is a child of <process state="second">. It configures parameters for the second node (called "second") of the job chain. It overwrites the param2 parameter and sets it to xyz. param3 is not set at all, thus it doesn't appear in the log for state second
  • param4 is defined in the same way as in state first, but this time the resulting value is different because param2 has been overwritten for this state.

Syntax

Note that the syntax for Job Chain parameters is different to the syntax for Order parameters described in the first example above:

  • <param name="param4" value="${param2}---${global_test_var}"/>
    i.e. without the leading \ .

Scope / Application

In job chain parameter files the ${PARAMNAME}-syntax can be used to reference:

...