Hi, As per the last post we discussed. I want to excel rows reduction value. I got it perfect.
Now my question is I invoked this workflow in the Try Block and use write activity to check the counter value and I got 0 print value as it is my last value. Here it’s fine.
Next in the Catch Block I assigned counter = 0 to stop my process and go to the end process state.
But it’s working fine. I just want to know then why it’s not going into the Catch Block If I gave the condition counter = 0 in the Catch as I am get the last 0 value of counter from the Try Block. @Palaniyappan@Lahiru.Fernando
This is Try Block where I got the 0 value
But I want to know why it’s not going inot the Catch Block as I defined the condition counter = 0 in the Catch block.
It’s working fine as I want, I want when the counter value 0 it end of the process. But in the Try Block it’s get 0 value. And in the Catch Block it’s checking the value 0. Then it decide but why it’s not executuing the write query in the Catch Block.
Hi
usually the catch block will get executed only when any exception occurs in the TRY block
so thats why we are not able to get into catch with 0
Cheers @balkishan
this implies the same, only when any process fails in try block it will go to catch block and take the counter as 0 and goes to end process
Cheers @balkishan
As @Palaniyappan explained, catch will only execute in case you get into any error in the try section. If the try section completes without any issue your catch will be ignored.
Are you trying to check kind of a condition here? To run something when the counter is equal to zero or something? It looks to me like that.
If so, you might need to use a IF activity for that instead of the try catch
@Lahiru.Fernando@Palaniyappan understood, I thought I assigned 0 in the Catch Block and same I get the 0 value in the Try Block. So thought once get 0 it will check in the Catch Block and decide to continue or stop the process. Anyway bro’s understood.
For testing I give the corrupted excel file then only my Catch Block Executed.