Does anyone see any problem with putting a Pick around the process.xaml in the REFramework, with one Pick Branch being the Process.xaml, and the other being a delay of x minutes that triggers a system exception if process.xaml has been running for longer than expected in a transaction.
Usually I set the timeout to double the maximum expected transaction length.
Process.xaml is one transaction. If the process gets stuck in a loop then after 6 minutes it times out with a system exception and moves onto the next transaction.
@andrewjames
As I understand the pick branch works based on whichever branch occurs first. So if it picks up the Process xaml branch and executes it, it will not go back and pick the other incase of any exception occurring. In other words, once it enters the Process branch, it will execute all activities in that branch.
If you want to set the timeout limit, you could easily set in in the Orchestrator, if you are using one. If not, need to figure out how to accomplish that.
As a simple example, let us assume you are automating a sign-up process. If its a new user, the next step in the process is to fill up the the sign-up form. If the user already exists, then a error message shows up. Let us assume only these two expected outcomes. Now using the pick branch activity, one branch will have trigger set as, say, “Sign up New user” text appears and the new user signup form appears in “Action block”. And if its an existing user, the trigger can be set as “User already exists” text/element appear and in Action block, it will redirect to forgot password (or any such) page. So depending on which ever screen, i.e.; either of the two scenarios above, shows up first, the following Action block executes and it will not go back to the other pick branch.
Hope this helps.
As I understand, it is whichever trigger completes first. So if after 6 minutes the activities within Process.xaml are still executing, the pick branch that contains the 6 minute delay will complete, and execute it’s action.
If the Process.xaml complete before 6 minutes, the empty action it triggers will happen, and the action in the delay branch will not happen.
This would repeat for every transaction.
We had a process today which ran for 3hrs stuck in a loop within one transaction, meaning no subsequent transactions completed, and we had to kill the process. As far as I can see, the above would prevent this from happening.
Ah I see. So it means both (or all the pick branch activities) will run in parallel so as to execute the Action part of whichever pick branch activity finishes first?
What if there are other activities instead of 6 min delay, how that will execute?
Appreciate your help, as this is a good learning experience for me.
I have this same setup for something I am doing because Excel will sometimes stop responding without throwing an error. I have it throwing a system exception if the timeout is reached like you do. The timeout is obviously more time than any one transaction should ever take. In my case, I know that a transaction should never take more than a minute or two, so I have my timeout set to 10 minutes to be absolutely certain it’s a timeout error even though 5 minutes is probably enough. It’s very rare that I have gotten this error, so I haven’t had to really tighten those numbers.
The only issue that I have had is that the delay and throw does not appear to work if they’re separated in the trigger/action. I have both in the trigger portion because, for some reason, the action portion sometimes doesn’t happen.
I’ve not had that issue. It’s always moved onto the action, but when using the pick in this way, there’s no other reason for/against having it in the action. I will likely move mine into the trigger too. Thank you.