Catch Block on Orchestrator

Hey,

I have an issue while using the “try catch” if the code enters into “catch” block then I have to tell it to orchestrator to repeat the process again or else do not repeat the process because in the orchestrator I have scheduled the process for 5times.
please refer to the catch screenshot. Please give me possible solutions

would you mind elaborating the issue?

As much as I understood, you want the whole process to repeat 5 times in case of an exception. i.e, same transaction has to be re-tried for 5 times.
Is this accurate?

Assuming you are using Queues and queue retry mechanism,
set the “Max # of retries” in of specific queue in orchestrator to 5.
if the Try-Catch block(that you were referring to) is used within another sub flow under process.xaml, you need to throw the exception as SYSTEM EXCEPTION/EXCEPTION and rethrow the same inside catch so that the the Try-Catch block of Process Transaction will Catch the same.
The rest should be taken care by RE-Framework.

Make sure these settings in Confix.xlsx are set to 0
1.MaxRetryNumber
2.MaxConsecutiveSystemExceptions

Regards
SG.

Hi @golla.sandeep ,

So, my entire workflow is developed in “try catch” block so I wanted if my flow enters into the catch block then I want tell the orchestrator to try the process again otherwise don’t try the process. The maximum number of times process can be tried is just 5times and then leave it if it goes into the catch block.
I’m totally sorry I was using the time tiggers. Should I be using queue triggers?
and also can you elaborate this sentence of yours?
“throw the exception as SYSTEM EXCEPTION/EXCEPTION and rethrow the same inside catch”

Thanks in advance.
Regards,
Jyothi

two ways handle this

  1. handle this in code during run time .

In re framework you can add one more try transition in your processing state.

add two variables one is flag for retry and another is retry count initialise with 0

Now as soon as process is inside catch block check the condition of retry counter if less than 5 have one sequence where just log the details increase the country and retry flag to true and in the else part of the counter have your other code of set transition status and all

Now add one transition and connect it to processing state it self
Add condition as retry counter <5 and flag is set to true for retry

Inside this transition log the value or have a log for info and set the retry flag again to false

This will help u to try same transition it self.

  1. In orchestrator in queue retry setting or in configuration file also queue retry count is there
    This will take place only if process goes to catch block for system exception and based on that it will try to retry the same entry

Hope this helps ! @Jyothi31

my advice is to use RE FRAMEWORK since the exception handling mechanism is in-build and is simple to manage what to do when you encounter an exception.
Even if you use queue based trigger or time based trigger, the exception handling mechanism works similar.

“throw the exception as SYSTEM EXCEPTION/EXCEPTION and rethrow the same inside catch”

assuming abc.xaml is a subflow called inside process.xaml.
Try
{
//your workflow call
Invoke workflow “abc.xaml”
}
Catch(Exception e)
{
Rethrow;
}
//