I am using RE framework. I am inserting each record after processing into a data table whether Success or Failed with Biz exception.
How and where should I enter a Failed record with System Exception ? Because after any exception it will retry the same and then it will pick the next item. If I enter in Set Transaction Status, then there will be multiple entries for the same record. ( Let say first two times it failed and in 3rd retry its Success. So there will be 3 entries.)
How can I have a single entry for any System Exception in the data table ?
As the Problem is with multiple entries, you can Check if the Retry Number of Transaction Item has reached it’s Limit using an If Condition and then Add the Transaction as a Failure in the datatable.
Suppose, TransactionItem is a QueueItem type variable.
Then, TransactionItem.RetryNo will provide you the Retry Number of the Current Transaction, it will increase upto the Retry Number that you have provided during the Queue Creation.
You can use if Condition and Check if the TransactionItem.RetryNo has reached it’s limit and then Add the Transaction as failure in Datatable.
Play around with if and Retry Number of Transaction Item along with logging of the Retry Number. It should help you figure out the solution