Hi,
I got a scenario, where need to segregate exceptions based on numbers. For e.g., if there are 3 business exceptions defined, want to map each exception with a number.
This helps to figure out how many times a specific business exception occurred in a month.
Create an asset in the Orchestrator and name it as Business Exception Count and initialize value as 0. Where you are Handling the Business exception in the workflow, in that use Get asset activity to get the asset value from Orchestrator, after that use assign activity to increment the value of BusinessException Count and use Set Asset activity to update the Count in to the asset to the Orchestrator.
By doing this, if you got any Business exception the Count Value in the asset will increments and update it to the asset in Orchestrator and you can check at the end of the month.
In this case you have to update every business exception to excel.
Create an excel sheet Manually with two columns Exception Number and Exception Message.
In the code where you are handling Business exceptions, there follow the below steps,
→ Use Build datatable activity and add two columns as created in excel and create a variable called dt.
→ Use the Asset logic that I posted in the previous post to take the count.
→ After that use the Add Data row activity to add the row to the datatable variable dt.
→ Use the Append range workbook activity to append the datatable to the Manually created excel.
Hi @mkankatala ,
I dont need to write to an excel, I already have a sql db with a Log table in it, where I’ll be inserting logs (success/exceptions).
I didn’t want to write the error numbers for each business exceptions from the UiPath code and was wandering if there is a better approach to map error numbers with exceptions.