Page History
...
Code Block | ||
---|---|---|
| ||
Usage: manage-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] suspend-order [--workflow] [--folder] [--recursive] [--order-id] [--state] [--date-from] [--date-to] [--time-zone] [--force] 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] Options: --url=<url> | required: JOC Cockpit URL --controller-id=<id> | required: Controller ID --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: 15 --order-name=<string> | optional: name for order, default: <current user> --block-position=<label> | optional: label for block instruction that hold start position --start-position=<label> | optional: label from which the order will be added --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 future scheduled date, default: now --time-zone=<tz> | optional: time zone for the given date, default: Europe/Berlin 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 or orders to be processed --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 related 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 --log-dir=<directory> | optional: path to the directory holding the script's log files Switches: -h | --help | displays usage -v | --verbose | displays verbose output -p | --password | asks for password -r | --recursive | specifies folders to be looked up recursively -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 |
...
add-order
- Adds an order to a workflow. Allows to specify the start position and end position in the workflow in case that specific jobs only should be executed.
cancel-order
- Terminates an order which can include to forcibly terminate running jobs.
suspend-order
,resume-order
- Suspends an order which can include to forcibly terminate running jobs.
- Resumes a previously suspended order, optionally from a different position in the workflow.
letrun-order
- Orders in the pending, scheduled or waiting state for a JS7 - Cycle Instruction or JS7 - Retry Instruction can be forced to run immediately.
transfer-order
- Orders attached a previous version of a workflow for which a newer version exists are transferred to the latest version of the workflow.
suspend-workflow
,resume-workflow
- Suspends the worfklow and freezes orders in the given workflow.
- Resumes a previously suspended workflow. Frozen orders will awake and will continue.
stop-job
,unstop-job
- Stopping a job will prevent the job from running. A stopped job will suspend orders arriving at the job label.
- Unstopping a previously stopped job will allow orders to execute the job. Suspended orders must be resumed to execute the job.
skip-job
,unskip-job
- Skipping a job will prevent the job from running. Orders will skip the job and will continue with the next instruction.
- Unskipping a previously skipped job will allow orders to execute the job.
post-notice
,get-notice
,delete-notice
- Notices can be posted to resolve dependencies similar to use of the JS7 - PostNotices Instruction in workflows.
- Notices can be retrieved to check which workflow dependencies are resolved.
- Notices can be deleted to make workflows wait for dependencies as used with the JS7 - ExpectNotices Instruction and JS7 - ConsumeNotices Instruction.
...
Code Block | ||||
---|---|---|---|---|
| ||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # skip jobs from labels ./manage-workflow.sh skip-job ${request_options[@]} \ --workflow=ap3jobs --label=job1,job2 # unskip jobs from labels ./manage-workflow.sh unskip-job -${request_options[@]} \ --workflow=ap3jobs --label=job1,job2 |
Posting, Reading and Deleting Notices
Code Block | ||||
---|---|---|---|---|
| ||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # post notice for current daily plan date ./manage-workflow.sh post-notice ${request_options[@]} \ --notice-board=ap3jobs # post notice for specific daily plan date and lifetime ./manage-workflow.sh post-notice ${request_options[@]} \ --notice-board=ap3jobs --notice-id=2024-08-26 --notice-lifetime=6h # reading notices from notice board ./manage-workflow.sh get-notice ${request_options[@]} \ --notice-board=ap3jobs # reading specific notice from notice board ./manage-workflow.sh get-notice ${request_options[@]} \ --notice-board=ap3jobs --notice-id=2024-08-26 # reading notices by folder ./manage-workflow.sh get-notice ${request_options[@]} \ --folder=/ap --recursive # delete notices for current daily plan date ./manage-workflow.sh delete-notice ${request_options[@]} \ --notice-board=ap3jobs # delete notices for notice board and notice identifiers ./manage-workflow.sh delete-notice ${request_options[@]} \ --notice-board=ap3jobs --notice-id=2024-08-25,2024-08-26 # delete notices by folder ./manage-workflow.sh delete-notice ${request_options[@]} \ --folder=/ap --recursive |
Resources
...
Overview
Content Tools