Hello All,
I just wanted some more information/opinion about a scenario which i recently encountered while developing a bot.
Here’s the scenario:
- From the initialization to process.xaml, the workflow is fine but when it comes to set transaction part, i have noticed a possible issue.
- If an item is successful and there is an error in the “Try Catch Set Transaction Status (Success)” sequence, it will go in an infinite loop processing the same item until the process is stopped. ~~~ (In my case i have configured my REF for datatable, using an Excel as a log file and the key used to write the success message does not exist in config file - It will trigger a system exception error)
- The first system exception is caught and re-thrown by the “Try Catch Set Transaction Status (Success)” inside SetTransactionStatus.xaml which is OK but it goes back to the process.xaml, the system exception is caught but only logged. The issue with that is that the transaction number does not get incremented and the same item is being re-processed again and again.
Recap: The item is processed successfully but due to an incorrect reference to config file in Set Transaction, the process goes into an infinite loop.
-
Error in Write activity in Try - Set Transaction status Xaml
-
Error is caught in Catch - Set Transaction status Xaml
-
Error is caught in Try catch in Process Xaml but only logged
`
My question is that would not it be wiser to include a rethrow activity in the catch sequence - Process.xaml after the log activity which will skip the current item and as well log the reference error by triggering the final catch activity in the Process.xaml?
I believe the issue is same for Queue Items if the queue orchestrator folder is not well configured.
A possible event of this occuring in Production environment could be, someone has been assigned to perform a maintenance on the robot but unknowingly deleted/modified the reference and uploads the new version and as part of requirement, an item should not be processed more than 1 time. (If successful)
Versions of Studio used:
2023.10
2024.10.1
Grateful if someone can provide their opinion about this. Thank you.