Versions Compared

Key

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

...

  • by creating a key/value pair with the syntax: key=value.
  • The key/value pair is appended to a temporary file that is provided by JS7 and that is indicated by the JS7_RETURN_VALUES environment variable.
  • The key provided is the name of the workflow order variable that can be used by subsequent jobs.
    • If the variable does not yet exist then it is created on-the-fly.
    • If the variable exists then the value is overwritten

...

Second Job: Read Variables

Shell jobs access workflow order variables and order variables from a mapping to environment variables.

  • The JOC Cockpit GUI offers to add the mapping per job from the right lower corner with the sub-tab Environment Variables.
  • The mapping includes to freely choose the name of an environment variable that is used in the job script and to assign an existing workflow variable or order variableorder variable.
  • The spelling of variable names is case-sensitiveesensitive.


The job script implementation looks like this:

...

Code Block
languagebash
titleExample of a Windows Shell job passing variables
linenumberstrue
@rem read results
@echo FIRST_RESULT = %FIRST_RESULT%
@echo SECOND_RESULT = %SECOND_RESULT%

Considerations

Scope of Order Variables

The above examples create order variables on-the-fly. Such variables can be overwritten by any job or instruction in a workflow.

However, if variables are declared with the workflow, then they are considered arguments that cannot be overwritten:

  • When clicking to the background of the middle panel without selecting any object such as a job then the right panel shows the workflow properties.
  • Workflow properties offer to add variables that
    • can carry no default value: such variables are considered mandatory and values have to be added when submitting orders.
    • can carry a default value: such variables leave it up to the order to provide a value that would overwrite the default value.

If a variable is declared at workflow level then it cannot be overwritten by subsequent jobs.

Image Added

Historic Outcome of Order Variables

The above examples create an order variable on-the-fly. Such variables can be overwritten by any job or instruction in a workflow..

  • The JS7 keeps track of the historic outcome of variables with an order's position in the workflow and restores values if a job is repeated.
  • You can make the second job fail and use the Resume parameterized operation offered by the JOC Cockpit GUI.

Image Added


This operation makes a popup window appear that looks like this:

  • Most recent values of order variables are displayed and are offered for modification.


Image Added


Modifications include to change values of order variables and to modify the order's position in the workflow:

  • Drag & Drop the order by holding the red bullet of the failed order to move the order to a different position.
  • Drag & Drop operations are limited within a logical scope:
    • they allow to select a position within a sequence of jobs and instructions in a workflow.
    • they do not allow to jump into a JS7 - Fork / Join Instruction or other instructions that checks an initial condition that might be met by the current order.

Image Added