First of all, I am very sorry for I am new at handling errors and I hope you can bear with me. Here’s my situation, I put a try-catch activity in which, It will try to check each row Under Column Date, to see the Date has the same month as the current Month(Month Now = 9, Row1= 7/26/2021, Row2=9/20/2021). If it has the same month, it workflow will go to the next activity. If it is greater than or less than the month, It would remove that datarow then throw an error(I was aiming to do this on the Catches part). Is there a better way of handling this? Thank you.
Try Catch activity should be inside For Each Row activity. Check condition in Try block and it is not met then throw BusinessRule Exception using Throw activity and your catch block should handle that exception.
New BusinessRuleException("Exception Message")
maybe a filtering and general date check would be an option as well
- Filter the datatable on all processable rows and process it
- Check on origin if Any / or for all non processable rows
- Throw an Error if non procesable rows were detected
Thank you!, I’ve just tried it and it works. I just want to ask if it is possible for the “Throw” to just print the Throw Error Message then go the catch, without stopping the Debugging?
If you running it in Debug mode, execution will be pause at Throw activity as you are throwing error. You need to click on Continue button to continue.
I see, thank you very much for your help. I’ll do that instead.
And also note that execution will be pause in Debug mode only but not in normal run.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.