Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Screenshot added

...

  • JobScheduler parses a temporary file for name/value pairs each time the status of a job chain changes. 
    • The name of this temporary file is held in the SCHEDULER_RETURN_VALUES environment variable.
    • The name/value pairs are automatically added as order parameters.
    • A parameter set in one job shell script can be written to this temporary file and made available to subsequent jobs using the following (for Windows):
      • myParam=myValue >> %SCHEDULER_RETURN_VALUES%
    • A task parameter set in one job can be written to this temporary file and thereby made available to subsequent jobs in a job chain using the following (for Windows):
      • myParam=%SCHEDULER_PARAM_MYPARAM% >> %SCHEDULER_RETURN_VALUES%
    • A parameter set in one job is called in the shell script of a subsequent job using the following (for Windows):
      • echo myParam = %SCHEDULER_PARAM_MYPARAM%

The following code blocks show two jobs that demonstrate the setting and retrieval of shell script parameters:

...

Code Block
languagexml
titleExample Job Chain
collapsetrue
 <job_chain>
    <job_chain_node state="100"
                    job="job1_shell_with_parameter_set"
                    next_state="200"
                    error_state="error"/>
    <job_chain_node state="200"
                    job="job2_shell_with_parameter_get"
                    next_state="success"
                    error_state="error"/>
    <job_chain_node state="success"/>
    <job_chain_node state="error"/>
 </job_chain>

Example Behavior

The screen shot below shows the log file for the example order and the values for the environment variables.

Image AddedImage Added

The log file shows that:

  • The param1 task parameters set in both the first and second jobs are only valid within the respective jobs.
  • The param2 task parameter set in the first job and which is forwarded as an environment variable to the second job overwrites the param2 task parameter set in the second job.
  • The param3 shell script parameter set in the shell script in the first job is passed to the script in the second job.

...