Hi.
You can build all sorts of things using Automic Script, this is oftentimes the workarround for these things I see people in my company use.
For instance, you can run your three hour event with ACTIVATE_UC_OBJECT with the added "WAIT" keyword. This would execute your EVENT and pause the script in the mean time. You can then evaluate the return code, likewise activate a CALL object to notify your support team and set a variable, say for the sake of example "&ERROR_ON_FIRST_TRY#=1". You can then conditionally rerun the EVENT from the same script with an IF statement, and if it fails again, while logical AND also has &ERROR_ON_FIRST_TRY#=1, send the second mail to your support telling them it failed twice.
Unless I'm missing something in your requirements, this should be fairly straight forward code in not too many lines of SCRI.
However, I also like to issue a word of caution against the general practice. Please do consider if your events really need to run for three hours. Is it not possibly sufficient to check for a file at, say, 8am and then again at 11am? In some cases it may be. And I can tell you from our own experience that long running events that "do stuff" is the path down to overcomplicated system design. It's okay while you have a hand full, but if you some day end up with dozens or hundreds of these type of solutions, possibly even snatching away each other's files as I have seen people do, this is a recipe for headaches.
Hth,
Original Message:
Sent: 08-20-2019 05:58 PM
From: Prakash Subramanian
Subject: Re: how to automatically rerun a workflow task and unblock it
But my requirement is below.
Run EVNT object for 3 hours if no file then rerun the same EVNT object and inform to support team that no file in the first try.
If no file in 2nd try then create incident and inform to support team.
Can you provide some suggestion?
Original Message:
Sent: 08-20-2019 05:36 PM
From: Pete Wirfs
Subject: Re: how to automatically rerun a workflow task and unblock it
1942 = ENDED_TIMEOUT - Ended untimely
Apparently ENDED_TIMEOUT is not a restartable state.
Alternative to consider:
If your EVNT task is only watching for the arrival of a file, try doing it with a Precondition/CheckFile process instead.