Versions Compared

Key

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

...

The JITL FileOrderVariablesJob template can be used to read variables from incoming files:

...

  • this applies to any files that are accessible to jobs in a workflow.

The following prerequisites are valid for incoming files:

  • The incoming file can hold pairs of names and values similar to the temporary file available from the JS7_RETURN_VALUES environment variable for return values of shell jobs: <name>=<value>.
    • pairs of names/values are separated from each other by EOL which can be CR, CRLF or LF.
    • The <value> can include any Unicode characters.
  • For the handling of incoming files the following applies:
    • If the incoming file holds pairs of names and values for variables then they are added to the order as return values from the JITL FileOrderVariablesJob template.
    • If the incoming file is empty then no return values are created and no error occurs.
    • If the incoming file includes content that does not match name/value pairs then an error is raised.

The JITL job does not use any arguments to specify its processing mode. Instead, users can add any arguments to this job that are expected to match the name of a name/value pair in the incoming file:

  • Arguments that are not assigned a value are considered optional for the incoming file. Respective return values are created only if the incoming file provides the variable. This includes that the incoming file specifies an empty value for the variable.
  • Arguments that are assigned a value are considered optional.
    • If the incoming file does not provide the variable then a return value with the JITL Job's default value is created.
    • If the incoming file provides a variable - optionally with an empty value - then a return value with the value from the incoming file is created.
  • For pairs of names/values for which no arguments are specified the JITL Job will raise an error.
  • Example of an incoming file:

    var1=value1
    var2=value2
    var3=

    • The variables var1 and var2 will be created with their respective values. For var3 an empty value will be returned from the JITL Job

...

    • .

Display feature availability
StartingFromRelease2.4.0

...

Download (upload .json): pdMaintenanceWindowpdfFileVariables.workflow.json

You can use the job wizard like this:

Image RemovedImage Added


Explanation:

  • Add an empty job from the instruction panel.
  • Specify a name and a label for the job.
  • Select an Agent.

In a next step invoke the job wizard that you find in the upper right corner of the job property editor. The wizard brings up the following popup window:

Image RemovedImage Added


Explanation:

  • From the list of available job templates select the MaintenanceWindowJob FileOrderVariablesJob.

Then hit the "Next" button to make the job wizard display available arguments:

Image RemovedImage Added


Explanation:

  • There are optional arguments for this job to identify the file carrying variables:
    • if the job is used in a workflow to which orders are added from JS7 - File Watching then the job will use the internal file variable that specifies the incoming file and does not require an argument.
    • if the job is used in a workflow not subject to File Watching then the js7_source_file argument is used to specify the path to the file carrying variables.
  • Any additional arguments specify variables that are expected from the incoming file. The example makes use of the var1 argument which translates to the fact that from the incoming file a line is expected to specify the variable like this: var1=some value
  • Required arguments include the state argument to specify 
    • inactive:  indicates a switch-over by which the component is set to the inactive state.
    • active:  indicates a switch-back by which the component is set to the active state.
  • The controller_host and joc_host arguments specify the host name of the Controller and JOC Cockpit for switch-over or switch-back.
    • One of the arguments can be used and both arguments can be used.
    • The controller_id argument has to be used if the JOC Cockpit is connected to more than one Controller. The Controller ID is the unique identifier of a Standalone Controller or Controller Cluster.
  • The agent_ids and subagent_ids arguments specify Agents that should be disabled during switch-over and enabled during switch-back.
  • The controller_host, joc_hostagent_ids and subagent_ids arguments can be used at the same time to perform switch-over and switch-back operations for all components from a single job.
  • Select the check box provided with each argument if you want this argument to be added to the arguments of the MaintenanceWindowJob FileOrderVariablesJob template.

When hitting the Submit button the wizard adds the required arguments to the job which should look like this:

Image RemovedImage Added

Documentation

The Job Documentation including the full list of arguments can be found under: https://www.sos-berlin.com/doc/JS7-JITL/MaintenanceWindowJobFileOrderVariablesJob.xml

The MantenanceWindowlJob FileOrderVariablesJob class accepts the following arguments:

...

Specifies the unique identifiers of Subagents that should be disabled during switch-over and enabled during switch-back operations.
NameRequiredDefault ValuePurposeExample
js7_source_filenostateyes

Desired state of the JS7 component: 

  • inactive:  indicates a switch-over operation by which the component is set to the inactive state.
  • active:  indicates a switch-back operation by which the component is set to the active state.
inactive/tmp/file/some_file.csv

<variable>

yes

controller_id

no

Specifies the identifier of a Standalone Controller or Controller Cluster

  • if the controller_host argument is used and
  • if the JOC Cockpit is connected to more than one Controller.
controller_prod

controller_host

no

Specifies the host name of the Controller should a switch-over or switch-back operation for a Controller be performed.

controller-2-0-primary

joc_host

no

Specifies the host name of the JOC Cockpit instance should a switch-over or switch-back operation for JOC Cockpit be performed.

joc-2-0-primaryagent_idsnoSpecifies the unique identifiers of Agents that should be disabled during switch-over and enabled during switch-back operations.subagent_idsnovar1

Further Resources

...