Yeah, in case you are only considering this to be built within one workflow, yes, flow chart is a very good option to loop through as you already know… However, when it comes to the sequence, you will need to use loop activities to loop through the items.
So, when thinking of looping, the main concern is how many iterations should the loop run because we do not know how many items are available in the queue. So for that, I would suggest to use a infinite while loop. Why I say that is because you don’t know how many items are there in the queue (well obviously t his can be calculated using Get Queue Items), but the main point is, we do not know whether a item will be retried or not. And if retried, how many times each will retry. So we cannot limit our loop to a specific count until we are fully done with all the items though they get retried or not.
So, within the while loop, you can use the Get Transaction item activity to access each item from the queue. Then after that use a IF condition to check whether it has any value or not. Why do that is because we need to find the point to exit the loop if there are no more transactions to be processed So you can use the IF condition and depending on the result, we can break the loop if there are no items to process, else we can continue… Once the processing of the item is done, make sure to update its status as well accordingly… The status should be updated as successful if the processing is successful for the item. If it ends of in an error, mark it as failed with application exception so that it will automatically allow the retry.
Additionally, in the queue, enable automatic retry and set the retry count as well…
Hope it helps.