Andrew_Garland_7890

Force Cancel Script for Workflows and Jobs

Discussion created by Andrew_Garland_7890 on Aug 31, 2016
Latest reply on Sep 1, 2016 by Wolfgang_Brueckler_1288
Hello Automic Community!

Occasionally when an error has occurred, a workflow or a single job will not correctly end and deactivate in the activity window. If you are unable to manually modify the task in order to cancel and deactivate it, you may consider creating a script object to cancel the job or workflow.


To cancel a Job, create a script object and place the below code in the Process tab. Replace the &RUNID# with the run ID of the job you wish to cancel. Then simply execute the script to cancel the job.

:SET &RET# = CANCEL_UC_OBJECT(&RUNID#) 


To cancel a Workflow, use the below script and replace the &RUNID# with the run ID of the workflow and execute.

:SET &RET# = MODIFY_TASK(&RUNID#, STOP_MODIFY:smile:


I hope this has been helpful!

Outcomes