I'm using ONE Automation 2015 - Automation Engine 11.
My goal is to use Post Conditions to automatically restart jobs, and I want all of the automatic restarting of jobs handled in one place if possible.
I have a workflow containing jobs. In these jobs, I use the output scan to set different return codes based on why the job may have failed. For example, if a connection times out, I check the return code in my post conditions and if it matches, I rerun the job. I attached a screen shot below for reference.
I also have cases where I want to cancel a job after it exceeds the maximum run time and restart it in the same fashion. Is there a way to set the return code on a job that is cancelled due to the maximum runtime being exceeded? I know I can cancel and execute the job again from the Runtime tab, but if possible, I would like to do it in Post Conditions as I want to handle all of the automatic rerunning in one place.
Screen shot for reference:
what about an else-clause like below - just an idea...
At Workflow start I define a Threshold timestamp to compare with in postcondition.
:SET &WF_START# = &$PHYS_TIME_HHMMSS#: P "WF_Start: &WF_START#"!Create Threshold to check against:SET &THRESHOLD# = ADD_TIME("HHMMSS;&WF_START#","HHMMSS;000300"): P "Threshold: &THRESHOLD#"