“If a System Error is encountered and within the max retry limit, the robot tries to initialize one more time before it moves on to the End Process.” ---- Where in the Initialization state do we set the max retry limit for Initializing all the applications if they fail to start?
If there is a
System Exception in the
Process block then the flow will be redirected to
INIT block which will restart the apps only once & if successful will continue processing transactions else it will just
When there are consecutive system exceptions, again the same is handled in the latest release of framework.
We handle this by verifying the queue before initialising all applications.
→ get queue items with status ‘new’. If the count = 0 the get thransaction item will not trigger any work, so we skip initAllApplications.
Hello @Nithinkrishna & @Jeroen_van_Loon,
My question means, suppose while initializing any application, it fails. So that means it will go directly to End Process due to system exception right.
So, if at first try i want to try initializing application again and then in 2nd time when system exception occur it goes to end process…how to do that?
Yeah we built in an extra transition from the init state on a system exception.
1st init error transitions into an init retry flow, returning upon itself, restarting the init phase.
A second init error will result in a transition into the end process.
The 1st init error is reset if the init succesfully transits into the get transaction item.
I get it about the transitions.
Successful–> Get Trasaction Data state
System Exception T1 → Initialization State
System Exception T2 → End Process State
But how will the Bot know that the System Exception that occurred is 1st time and it has to retry it again to Initialization?
Hello @BlackCurrant ,
As per the Re-framework, if there is a system error at the INIT state, then the flow will directly go to End Process stage. There is no retry mechanism to verify the initialization of Application.
So if you want to add a retry machanism, what you can do is, Put all the Initialization of applications inisde INIT state inside a Try catch. and use a flag value.
For example there is a variable named “Status”, with default as True
in the Try you dont need to set any assignment to “Status”, but in the catch you can set the “status” to False. Then outside of Try catch add a counter (
Then add a if condition and check (if Status=“False” and i>1), then use throw activity and inside that use System exception. In the else part, use assign activity, i=i+1…
Hope you are clear about it.
So instead of using transition we can use a try catch block to try opening the applications in Initialization.
But won’t this run again and again?
What i want is when the system Exception occurs first time in INIT state instead of going to END PROCESS it should again go to INIT for the first time
And when the 2nd time the System Exception occurs, then it should go to END PROCESS.
Now even if I change the transitions and add another transition, how come the bot will understand whether the SYSTEM EXCEPTION that occurred is for the first time or 2nd time?
Hello @BlackCurrant ,
Thats why we are checking the value of variable “Status” and the value of counter i.
If status=false and i>1 then it has to throw the system exception using Throw activity. Then it will directly go to end process instead of looping.
Loop will work only if i=1 and status =false
Okay, understood it now. I can do it in this way.
Cool, thanks again.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.