Introduction
- JITL Jobs support late substitution of variables.
- Typically, the value of an argument can be assigned a string or a variable using the
${variable}syntax. Such variables are substituted by the JS7 Agent. - In addition, the value of an argument can be assigned a variable using the
%{variable}syntax. Such variables are substituted later by the JITL job interface.
- Typically, the value of an argument can be assigned a string or a variable using the
- This includes support for encrypted variables, see JS7 - Encryption and Decryption. For example
- a workflow variable credential holds an encrypted value.
- The variable can be used for a JITL SSH job that requires a password for execution of some programm or script on a remote machine.
- The related command argument that holds the command(s) to be executed on the remote machine, can reference the encrypted password like this:
echo "use password %{credential}"mysql --user my_account --password %{credential} --database js7
The feature is introduced with JITL-763 - Getting issue details... STATUS
FEATURE AVAILABILITY STARTING FROM RELEASE 2.8.3
Late Substitution of Variables
Variables can be specified:
- from workflow variables that are available for all jobs in the workflow,
- from arguments to an individual job.
The workflow is assigned the Job Resource that holds the decryption information, i.e. the path to the private key used by the JS7 Agent.
Find the following example for download (upload JSON):
- Workflow: pduDecryptArgument.workflow.json
- Job Resource: pdCredentials.jobresource.json
Job: file-exists
The job makes use of the JS7 - JITL FileExistsJob template:
- The value of the
source_fileargument is encrypted. - The encrypted value is provided from the
encrypted_source_filevariable that is declared at workflow level.- No late substitution is required, the variable is referenced from the $ prefix.
- Users can similarly apply the syntax for late substitution from the % prefix.
Job: execute-ssh
The job makes use of the JS7 - JITL SSHJob template:
- The job connects to a remote host specified from the job's arguments.
- The
commandargument references two variables using the%{variable}syntax:- The
credentialvariable is declared with the workflow and holds an encrypted value. - The
job_resource_credentialvariable is declared with the assignedpdCredentialsJob Resource.
Job: rest-client-login, rest-client-logout
Two jobs are provided that makes use of the JS7 - JITL RESTClientJob template and that are used to login and to logout form JOC Cockpit's JS7 - REST Web Service API.
- The
requestargument value holds a header that references the%{encrypted_authentication}variable.- The variable holds the base64 encoded, encrypted value that can be created like this:
echo -n "root:root" | base64
- The
return_variableargument holds a jq query expression that returns the access token used for later jobs, see JS7 - JITL jq Interface.





