Retry scope and try catch

I am not using reframework for processing here .
I have list for messages for example say
1
2
3
4
5,
here I have used iteration in separate workflow and am calling it in main.
How to use try catch and retry scope- when I have an exception in 3 rd message, I have to retry to 3 times and then move on 4th message and then 5th message

Hi @joe2

In the main workflow, you can iterate through the message list that you have. For each iteration, you can invoke the workflow associated with each message processing. Now, you can design this workflow like this:

β†’ Retry scope in the outermost part, which has a condition Success = True condition.

β†’ Inside the Retry Scope, start placing the actions in the Try Catch activity.

β†’ For success message case, everything in the Try block will work & in the end of the Try block, assign Success = True expression, so it will pass through the outer Retry Scope as well.

β†’ For failure message case, Try block fails & the control flows to the Catch block. Here, use an If condition to check the counter variable value. If it’s less than 3, set the Succces = False & increment the counter by 1, so that the Retry Scope will be unsatisfied in the outer branch & the Try block will be executed again for the same message. If the counter reach <= 3, then you can explicitly turn the success flag to True, which will bypass the Retry & moves with the next message.

Hope this helps,
Best Regards.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.