Hi, I am facing issue, here in the first sequence I am reading an excel which is corrupted so it’s executing the Catch Block fine. In catch I defined SystemError = exception
But in the next I given the Flow Condition I don’t want to continue I want to execute the Right activity false to stop the process. If my excel is fine so my Catch won’t execute so in that case I want to left which Is True.
So my question is SystemError is not accepted in the flow condition because it’s not a boolean type.
If I take the boolean type SystemError and assigned in the Catch Block like
SystemError = False
in that case it’s not executing because it’s not find where is the error Right as error in our Excel itself. So can you help on this,
Simple que what condition I give in the flow if my catch execute then I want to execute the False activity if no error and Try is executing only then I want to execute the True left sided activity. As flow decision accepted boolean type only. If I use the boolean type in Catch block it will not catch the error because it’s a system exception error right. Plz help
Instead of taking the exception as value to SystemError we can take a Boolean value like true or false like once it reaches to catch block assign the SystemError values as A Boolean
so the flow should be like this
–in the try catch activity, include the assign activity with SystemError with Boolean value as True, (where the default value of systemerror is false defined in the variable panel as global variable with scope as whole sequence)
–so when the process reaches the catch the variable SystemError will be assigned as True
–next in the flow decision put a conditin like SystemError= True
so here we need to change the direction along with the current process (as per your image)
–so if its true it should go to message box with value as “Stop”
–or if its false it should go to message box with value as “Continue”
Hi @Palaniyappan I assigned SystemError is False in default variable panel. In the Catch Block I assigned it to True. I didn’t put/assigned anything in the Try Block. But it’s not working wheather my excel correct or corrupted it’s always going into the True condition. Tell me If I miss anything here in the Try Block
I think its getting corrupted with the excel
try to print the value of systemerror in the catch block with a write line
–next to the assign activity use a write line inside the catch block and mention as SystemError.ToString
lets check that
and make sure the scope of the variable is with whole sequence making it as a global variable
Cheers @balkishan