Page History
...
- The script is available for Linux and MacOS® using bash shell.
- The script terminates with exit code 0 to signal successful execution, with exit code 1 for command line argument errors and with exit code 4 for non-recoverable errors. Exit code 3 signals that no matching objects have been found.
- The script is intended as a baseline example for customization by JS7 users and by SOS within the scope of professional services. Examples make use of JS7 Release 2.7.2, bash 4.2, curl 7.29.0 and jq 1.6.0.
...
Code Block | ||
---|---|---|
| ||
Usage: operate-workflow.sh [Command] [Options] [Switches] Commands: add-order --workflow [--date-to] [--order-name] [--block-position] [--start-position] [--end-position] [--variable] [--force] cancel-order [--workflow] [--folder] [--recursive] [--order-id] [--state] [--date-from] [--date-to] [--time-zone] [--force] [--deep] suspend-order [--workflow] [--folder] [--recursive] [--order-id] [--state] [--date-from] [--date-to] [--time-zone] [--force] [--deep] [--reset] resume-order [--workflow] [--folder] [--recursive] [--order-id] [--state] [--label] [--variable] letrun-order [--workflow] [--folder] [--recursive] [--order-id] [--state] transfer-order --workflow] [--folder] [--recursive] suspend-workflow --workflow [--folder] [--recursive] resume-workflow --workflow [--folder] [--recursive] stop-job --workflow --label unstop-job --workflow --label skip-job --workflow --label unskip-job --workflow --label post-notice --notice-board [--notice-id] [--notice-lifetime] get-notice [--notice-board] [--notice-id] [--folder] [--recursive] [--date-to] delete-notice [--notice-board] [--notice-id] [--folder] [--recursive] [--date-to] encrypt --in [--infile --outfile] --cert [--java-home] [--java-lib] decrypt --in [--infile --outfile] --key [--key-password] [--java-home] [--java-lib] Options: --url=<url> | required: JOC Cockpit URL --user=<account> | required: JOC Cockpit user account --password=<password> | optional: JOC Cockpit password --ca-cert=<path> | optional: path to CA Certificate used for JOC Cockpit login --client-cert=<path> | optional: path to Client Certificate used for login --client-key=<path> | optional: path to Client Key used for login --timeout=<seconds> | optional: timeout for request, default: 60 --controller-id=<id> | required: Controller ID --order-name=<string> | optional: name for order, default: <current user> --block-position=<label> | optional: label for block instruction that holds start position --start-position=<label> | optional: label from which the order will be started --end-position=<label[,label]> | optional: list of labels before which the order will terminate --variable=<key=value[,key=value]> | optional: list of variables holding key/value pairs --date-from=<date> | optional: order past scheduled date --date-to=<date> | optional: order scheduled date or notice date, default: now --time-zone=<tz> | optional: time zone for dates, default: <current-time-zone> see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones --state=<state[,state]> | optional: list of states limiting orders to be processed such as SCHEDULED, INPROGRESS, RUNNING, SUSPENDED, WAITING, FAILED --folder=<path[,path]> | optional: list of folders holding workflows, orders, notice boards --workflow=<name[,name]> | optional: list of workflow names --order-id=<id[,id]> | optional: list of order identifiers --label=<label[,label]> | optional: list of labels for jobs --notice-board=<name[,name]> | optional: list of notice boards --notice-id=<id> | optional: notice identifier, default: <current date> --notice-lifetime=<period> | optional: lifetime for notice --key=<path> | optional: path to private key file in PEM format --key-password=<password> | optional: password for private key file --cert=<path> | optional: path to certificate file in PEM format --in=<string> | optional: input string for encryption/decryption --infile=<path> | optional: input file for encryption/decryption --outfile=<path> | optional: output file for encryption/decryption --java-home=<directory> | optional: Java Home directory for encryption/decryption, default: $JAVA_HOME --java-lib=<directory> | optional: Java library directory for encryption/decryption, default: ./lib --audit-message=<string> | optional: audit log message --audit-time-spent=<number> | optional: audit log time spent in minutes --audit-link=<url> | optional: audit log link --log-dir=<directory> | optional: path to directory holding the script's log files Switches: -h | --help | displays usage -v | --verbose | displays verbose output, repeat to increase verbosity -p | --password | asks for password -k | --key-password | asks for key password -r | --recursive | specifies folders to be looked up recursively -d | --deep | specifies child orders to be subject to cancel/suspend operation -s | --reset | resets instruction for suspend operation -f | --force | specifies forced start or termination of jobs --show-logs | shows log output if --log-dir is used --make-dirs | creates directories if they do not exist |
...
-h | --help
- Displays usage.
-v | --verbose
- Displays verbose log output that includes requests and responses with the JS7 REST Web Service.
- When used twice as with
-v -v
then curl verbose output will be displayed.
-p | --password
- Asks the user for interactive keyboard input of the password used for the account specified with the
--user
option.. - The switch is used for secure interactive input as an alternative to use of the option
--password=<password>
.
- Asks the user for interactive keyboard input of the password used for the account specified with the
-k | --key-password
- Asks the user for interactive keyboard input of the password used for access to a keystore or key file specified with the
--keystore
or--key
options. - The switch is used for secure interactive input as an alternative to use of the
--key-password=<password>
option.
- Asks the user for interactive keyboard input of the password used for access to a keystore or key file specified with the
-r | --recursive
- Specifies that folders will be looked up recursively if the
--folder
option is used.
- Specifies that folders will be looked up recursively if the
-d | --deep
- Specifies that child orders are subject to
cancel-order
andsuspend-order
commands.
- Specifies that child orders are subject to
-s | --reset
- Specifies that the current instruction will be reset when using the
suspend-order
command.
- Specifies that the current instruction will be reset when using the
-f | --force
- Specifies forcible processing. When used with the
add-order
command then JS7 - Admission Times for Jobs will be ignored and the job will be executed. When used withcancel-order
andsuspend-order
commands then a currently running job will be terminated. See JS7 - FAQ - How does JobScheduler terminate Jobs.
- Specifies forcible processing. When used with the
--show-logs
- Displays the log output created by the script if the
--log-dir
option is used.
- Displays the log output created by the script if the
--make-dirs
- If directories are missing that are indicated with the
--log-dir
option then they will be created.
- If directories are missing that are indicated with the
...
Overview
Content Tools