I have a ‘for each row’ activity that is working through rows in a datatable before performing an activity based on what is read. Some rows require no action to be taken, so I have put in a flowchart and flow decisions and if the decision is false, then I would like to throw the row as a business exception and move on to the next row. But when I try this, the throw activity makes the entire process stop without moving on to the next row.
- Use Try Catch inside For each row loop
- Or, Use like this
First Workflow contains: For each row -->Inside that use Try Catch----> Inside Try invoke your flowchart workflow.
Did you find any solution for this? I also have a project similar to this. It’ll read the mail subject line and as per the subject it’ll search in an excel sheet and send the mail to that person. If that line is not found I’ve to throw the exception in the end after going through the excel sheet in the end.
Please let me know the solution if any.
Thanks.
do you want to continue after throwing an exception? or you need to stop the process?
Yes I want to continue and go to the next mail.
Thanks for replying
Then you can use try catch inside the loop and when u throw exception in catch just enter log steps or whatever u want to do
so once catch is finished it will go to the next row in that loop
but make sure u don’t put the loop in try catch
let me know if this helps.
the above reply given by sachinbhradwaj is also the same.
Can you tell me which loop? The For each loop(for getting emails) or the Data Table loop(for checking excel sheet if the value is present or not).
If after the exception occurred you don’t want to process anything and directly go to the next email then do it in the loop(getting emails) if you want to process something from excel after throwing exception then add it in loop(checking excel sheet).
@Krutika_Kotkar Thank you so much for replies. I’ve resolved my issue.