Hi @Palaniyappan@lakshman, kindly help.
I have an excel format, but sometimes it comes with the two same column name so in this case, I want to stop the process and send its screenshot and confirm by email also. can you help me how I resolve this issue?
If there is no same name column then I want to proceed it.
One more it will be a Business Exception Right? right me if I am wrong.
No worries
If we are having same column name we can use the column index say 0, 1, 2 where first column starts with index 0
So try to mention the column index instead of column name
—next to take a screen for this kind of error can’t be taken as it occurs inside a application and here the application is excel…
— rather taking screenshot we can use a log message activity with a message like “error occurred with excel”
— or if we want to take screen we can include all the process in try block in try catch activity and mention the a page said log message activity followed by take screenshot activity and get the output of this take screen shot with a variable of type image
—then use save image activity with the variable obtained above from take screenshot and mention the file path where we want tot save the image in .pmg format
I agree with your point bro. But client want to use the header only. Because they want bot informed us whenever two same columns name occur in the excel.
So can you please tell me about this. That time I have to informed us by email and stop the process. If there is no same type Columns in the excel then I want to proceed further.
For this I given a Buisness Exception.
And build like this. Please correct me if I’m wrong.
Pls go ahead as what you have mentioned is correct I.e., if the error occurs it will go to catch where exception is caught and we can even add a activity called send outlook mail activity with a message like “the bot failed unfortunately because of same columnname”or if the workflow doesn’t have any such similar column names then it will continue as it is
Fine
Hope you have the catch block in the Reading excel state
Use a assign activity in the catch block like If_any_error = True
Where If_any_error is a variable of type Boolean
Then in the Transitions mention the condition like
If_any_error = True
Then it should go to close state or to the proceed state
Or even we can use if any business exception variable is used
And mention condition like BusinessException = Nothing
Or
BusinessException =True
(Based on the variable type Boolean or string)
Mention that In transition buddy
Fine keep this assign in the catch block as we want this to be used only when exception occurs else with the default value of SystemError variable (define a default value for it in the variable panel with value as Nothing)
Yes of course we can mention this in transitions as a condition like this
SystemError = Nothing
So if the above condition is true it will go for proceed state or if the condition is
SystemError = exception
Then will go to close state
@Palaniyappan
I given this as BuisnessException as it’s not a SystemException. Bcz It’s error in the exceltemplate right. Please right me If I am wrong. OR should I mention is a SystemExceptionError
And I mentioned in the Catch Block is
I given this as BuisnessException as it’s not a SystemException. Bcz It’s error in the exceltemplate right. Please right me If I am wrong. OR should I mention is a SystemExceptionError
And I mentioned in the Catch Block is
Use final state buddy @balkishan
Because as you have used state which should have at least one transition as how we have for Red Excel state
So nothing very simple take all the activities mention in those two states and place them inside a final state activity instead of a state activity
Other than that everything same
I have done as you suggest me bro.
But here it’s throwing me an error. I want whenever this error occured it intimate the customer and end the process.