Versions Compared

Key

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

...

Code Block
languagebash
titleExample for Exporting and Importing/Deploying for High Security Level
linenumberstrue
# common options for connection to JS7 REST API
request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)

# export objects from folder for signing
./deploy-workflow.sh export ${request_options[@]} \
    --file=export.zip --folder=/myFolder --recursive --for-signing

# digitally sign objects
rm -fr ./temp/*
unzip -d ./temp ./export.zip
./js7_sign_workflow.sh --dir=./temp --key=./ecdsa.key --cert=./ecdsa.crt --hash=sha512
rm -f ./import-from-signing.zip
cd ./temp
zip -r ../import-from-signing.zip *
cd -

# import/deploy objects
./deploy-workflow.sh import-deploy ${request_options[@]} \
    --file=import-from-signing.zip

Deploying and Revoking Objects

Code Block
languagebash
titleExamples for Deploying and Revoking Objects
linenumberstrue
# common options for connection to JS7 REST API
request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)

# deploy objects from folder recursively and update daily plan
./deploy-workflow.sh deploy ${request_options[@]} \
    --folder=/ap/Agent --recursive --date-from=now

# deploy workflows and update daily plan
./deploy-workflow.sh deploy ${request_options[@]} \
    --path=/ap/ap3jobs,/ap/apEnv --type=WORKFLOW --date-from=now

Releasing Objects



# revoke workflows
./deploy-workflow.sh revoke ${request_options[@]} \
    --path=/ap/ap3jobs,/ap/apEnv --type=WORKFLOW

# revoke objects from folder
./deploy-workflow.sh revoke ${request_options[@]}  \
    --folder=/ap/Agent --recursive

Releasing and Recalling Objects

Code Block
languagebash
titleExamples for Releasing and Recalling Objects
linenumberstrue
# common options for connection to JS7 REST API
request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)

# release objects from folder and update daily plan
./deploy-workflow.sh release ${request_options[@]} \
    --folder=/ap/Agent --recursive --date-from=now

# release schedules and update daily plan
./deploy-workflow.sh release ${request_options[@]} \
    --path=/ap/Agent/apAgentSchedule01,/ap/Agent/apAgentSchedule02 --type=SCHEDULE --date-from=now

# recall objects from folder
./deploy-workflow.sh recall ${request_options[@]} \
    --folder=/ap/Agent --recursive

# recall schedules
./deploy-workflow.sh recall ${request_options[@]} \
    --path=/ap/Agent/apAgentSchedule01,/ap/Agent/apAgentSchedule02 --type=SCHEDULE

Storing and Removing Objects

  • Objects can be added to the inventory from files in JSON format related to the object type such as a workflow, schedule.
  • Objects can be removed from the inventory.

Code Block
languagebash
titleExamples for Storing and Removing Objects
linenumberstrue
# common options for connection to JS7 REST API
request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)

# store object
./deploy-workflow.sh store ${request_options[@]} \
    --path=/ap/NewFolder01/NewWorkflow01 --type=WORKFLOW --file=NewWorkflow01.workflow.json

# remove object, update daily plan
./deploy-workflow.sh remove ${request_options[@]} \
    --path=/ap/NewFolder01/NewWorkflow01 --type=WORKFLOW --date-from=now

# remove objects from folder, update daily plan
./deploy-workflow.sh remove ${request_options[@]} \
    --folder=/ap/NewFolder01 --date-from=now

Restoring and Deleting Objects

  • Objects that have previously been removed reside in the trash.
  • Objects can be restored and can be permanently deleted from the trash.
    • To restore an object the path, object type and new path must be specified. Optionally a prefix or suffix can be added to restored object names.
    • To permanently delete objects they can be specified from their path & object type or from a folder.

Code Block
languagebash
titleExamples for Restoring and Deleting Objects
linenumberstrue
# common options for connection to JS7 REST API
request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)

# restore object from trash, using suffix for restored objectd
./deploy-workflow.sh restore ${request_options[@]} \
    --path=/ap/NewFolder01/NewWorkflow01 --type=WORKFLOW --new-path=/ap/NewFolder01/NewWorkflow01 --suffix=restored

# delete object from trash
Code Block
languagebash
titleExamples for Releasing Objects
linenumberstrue
# common options for connection to JS7 REST API
request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)

# release objects from folder and update daily plan
./deploy-workflow.sh releasedelete ${request_options[@]} \
    --folderpath=/ap/AgentNewFolder01/NewWorkflow01 --recursive --date-from=nowtype=WORKFLOW

# releasedelete schedulesobjects andfrom updatetrash dailyby planfolder
./deploy-workflow.sh releasedelete ${request_options[@]} \
    --pathfolder=/ap/Agent/apAgentSchedule01,/ap/Agent/apAgentSchedule02 --type=SCHEDULE --date-from=nowNewFolder01

Resources

...