Suppose we have a Process that runs whenever a certain email is received (therefore it does NOT run on a schedule). Now, suppose this Process has to execute some action, then validate the action outcome (e.g. script has completed successfully) and then proceed according to this outcome.
If said action takes too long to complete (in my book, anything > 5 mins is too long) it is unacceptable to keep the Process waiting because that would be wasting valuable resources (in this context, the valuable resource being the Robot, which could be executing some other Process instead of just waiting for an action to complete).
Therefore, in this case, the proper thing to do is have the Process, somehow, suspended after it executes the action, so that it frees up the Robot to do something else, and then at a later time have the Process resume its operation, check the action outcome and proceed accordingly…
After all, that is exactly what a human operator would do. Nobody keeps staring at the screen just waiting for a script to complete its execution.
My question is, what is the best practice for handling this scenario? A quick and dirty way of handling it would be to create a “one use only” schedule, but that does not sound like a best practice to me.