Versions Compared

Key

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

...

Job Resources can be managed from the Configuration->Inventory view:

Defining Arguments


Explanation:

  • A Job Resource includes any number of name/value pairs that are propagated as Arguments/Environment Variables to JVM Jobs and to Shell Jobs.
  • A Job Resources offers two subtabs for Arguments and for Environment Variables.
  • Arguments and Environment Variables can be assigned constant values and expressions, for details see
  • The example above shows the Default Job Resource with Arguments for JVM Jobs that ships with JS7. 

Defining Environment Variables


Explanation:

  • Environment Variables for Job Resources can be assigned constant values, expressions and Arguments of the same Job Resource (see above).
    • This allows to offer the same Arguments and Environment Variables to both JVM Jobs and Shell Jobs.
    • If both Arguments and Environment Variables use calculated values as e.g. the number of milliseconds since January 1st 1970 until the job starts, it is recommended that only the Argument is calculated and that the Argument is then assigned to the Environment Variable using the argument's name.
  • The example above shows the Default Job Resource with Environment Variables for Shell jobs that ships with JS7. 
    • Assigned values include Arguments as described above.

Example

The below example from the Arguments sub-view defines an argument script_home and assigns the value of the $HOME OS environment variable for Unix by use of the env() function.

For Windows the corresponding assignment is: env('HOMEDRIVE', "") ++ '\' ++ env('HOMEPATH', "\")

Download example (upload .json): pdJobResourceShell.jobresource.json

Image Added


Note:

  • Argument values are expressions, not strings. Arguments do not substitute OS environment variables as from $HOME, instead the env() function is used.
  • Arguments cannot include references to other arguments.
  • The ordering of arguments is not relevant.

The below example explains use of arguments in the Environment Variables sub-view:

Image Added


Note:

  • Environment variables carry values from expressions, not strings.
  • Environment variables can reference arguments as the $script_home argument from the above example.
    • There is no difference if the environment variable is directly assigned: env('HOME', "")
  • Environment variables can be assigned values that concatenate arguments, strings and functions.
    • The concatenation operator is: ++
    • Strings are quoted with single quotes.
    • The function env() can be used.

Assignment to Workflows and Jobs

...

A workflow can be assigned any number of job resources. The right upper corner of the job properties panel provides a "Job Resources" button, which opens a popup window. This window allows job resources to be selected as shown in the screenshot below:Job Resources. The property editor offers a widget to select one or more Job Resources:

Image AddedImage Removed


Explanation:

  • Environment variables from job resources Job Resources are available to all Shell Jobs in a workflow.
  • No mapping at job level is required, environment variables are directly available for job scripts.
  • The sequence ordering of assignment Job Resource assignments is relevant as environment variables with the same name are not overwritten in the order from the first to the last Job Resource assignment.

Assignment to Jobs

The job properties panel provides a list-box for adding any number of job resourcesJob Resources.


Deployment

Job Resources have to be deployed to the Controller operating the workflow, which is referenced by the job resourceJob Resource.

  • Job Resourced Resources are digitally signed for deployment.
  • Job Resources are not maintained in versions. This translates to the fact that deployment of a modified Job Resource will make this resource immediately available for existing workflows.
  • Job Resources cannot be removed as long as a reference is available from a deployed workflow.

...