You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Next »

Introduction

Parameters can be set for jobs and orders.

Order parameters are available to all the jobs in a job chain. When the value of an order parameter in a job chain is changed then this new value will be applied at the start of the next (persistent) order.

Note that when jobs are programmed using the JobScheduler API, job and order parameters are separate objects. Node and order parameters form the same object, although here node parameters have priority over order parameters of the same name.

Delimitation

Parameters can also be set for job chains and job chain nodes. However these parameters are used differently to job and order parameters and are not described in this article.

For more information about job chain and job chain node parameters see:

Setting Parameters for a Job or an Order in JOE

The Parameter function can be found in the JOE element tree as a sub-element of every Job and Order. Each parameter consists of a name and a value.

Setting a Job Parameter

  • Select a job in JOE's element tree view
  • Select the job's Parameter element as shown in the screenshot below
  • Enter a name-value pair in the Name and Value fields as shown in the screenshot below.
  • Click the Apply button
  • Click the Save Configuration icon (top, left) to permanently save the parameters.

Setting an Order Parameter

Order parameters are set in a similar manner to job parameters, by selecting an order's parameter element (not shown in the screen shot above).

Job and Order Parameters as XML

The next two code blocks show the XML generated by JOE for a typical simple job and order:

A simple job with parameters
<job  order="yes" stop_on_error="no" name="job1">
    <params >
        <param  name="param1" value="Value1-Job1"/>
        <param  name="param2" value="Value2-Job1"/>
    </params>
    <run_time />
</job>
A simple order with parameters
<order  job_chain="shell_with_parameter" id="Order1">
    <params >
        <param  name="param1" value="Value1-Order1"/>
        <param  name="param2" value="Value2-Order1"/>
    </params>

    <run_time />
</order>

Reading and Setting Parameters in Shell Scripts

Parameters can be read and set in shell scripts when they are made available as environment variables.

This is described in detail in: How to pass parameters to subsequent shell jobs in a job chain.

Further References

Job and Order Parameters

 Environment Variables

  • No labels