I have a for each loop, and would like to instruct it to continue to the next record, if an exception arises. There are approximately 65+ sub-activities in the loop, which I have packaged into “Main Sequence”. I put that Main Sequence into a Try Catch under Try, and then specified the most common exception (NodeNotFound) in Catches, with an activity of Continue for that catch. I also put Continue under Finally. See screenshot below.
When I run the workflow, it still presents an error screen with each exception, rather than moving to the next row.
Am I supposed to package the entire “For Each” activity into Try?
Thank you @muhammedyuzuak. I included system exception instead of the nodenotfound exception, and still get an error popup. I was not sure what you meant by “adding condition in it” though. See screenshot below.
And @Vaibhav_Rajpoot_17, I have included screenshots of the errors below as well.
Thank you. I tried doing what you suggested (leaving the activity blank under the exception), and also tried replacing continue with a message box. I still just get the normal error screen, with a nodenotfound exception. Screenshots below.
Question: Does it matter how many levels of nested sequences within sequences I place in the Try block? I may have as many as 4-5 levels of nesting within that “Main Sequence”.
In addition, can you share the exact moment you receive the exception (red box)? If the loop gives an error before it even goes inside, these operations are meaningless.
Thank you. I tried your test and yes, it worked fine. The process continued even after the throw for index=1.
To answer your question, the error/box appears only after the process enters the loop, not before.
Unfortunately, mine is still not working.
I don’t think this would make a difference, but the way I am getting the app to error out, is by moving the scroll bar in chrome, so that the app cannot find the UI element. It is just a simple scroll, and then a few seconds later I get the error. I don’t think that would make a difference though, it should just continue on no matter how or why the error happens.
Hi again @muhammedyuzuak . I just found something interesting. The other day when I ran your example test, the try/catch/continue worked as expected. But today i opened your same example as a separate file/workflow within my main project, and I received an error screen, indicating that the try/catch did not work. So it must be some kind of setting or design issue within my main project, that is preventing the try/catch from working correctly? I did try resetting all of my Studio settings, but it did not make a difference. Any ideas would be much appreciated!