After processing all queue items, even when there are no more transactions.
the workflow doesn’t stop. It keeps looping through the states, again it loading queues and keep on looping
What I’ve checked:
I’m using the “Get Transaction Item” activity inside GetTransactionData.xaml.
The output is assigned directly to out_TransactionItem.
In Main.xaml, the transition condition is: TransactionItem IsNot Nothing.
Question:
What is the correct way to end the REFramework process once the queue is empty?
Thanks in advance!
The REFramework process, when using Orchestrator Queues, should end automatically when the queue is empty. This happens because the “Get Transaction Item” activity, within the GetTransactionData.xaml file, returns “Nothing” when no more queue items are available. The transition condition TransactionItem IsNot Nothing in Main.xaml then evaluates to False, causing the workflow to move to the “End Process” state.
If your process is looping infinitely, the most common reason is that the out_TransactionItem variable is not correctly becoming Nothing. You should:
Verify Get Transaction Item is the sole source of out_TransactionItem: Ensure no other activities or default values prevent out_TransactionItem from being Nothing when the queue is empty.
Check “Get Transaction Item” properties: Confirm the “Orchestrator Folder Path” and “Queue Name” are exact matches to your Orchestrator setup.
Debug: Use breakpoints after Invoke GetTransactionData in Main.xaml to inspect the value of TransactionItem. It must be Nothing when the queue is empty.
In addition to what I suggested above, would also be worth checking that your add queue item’s functionality is not part of the loop.
Also, under initialization state, it should be inside the block - if config is nothing.
Otherwise what can happen in reframework is whenever system exception occurs, control goes back to initial state for initialization applications, and if your add queue items is outside of it config nothing, it will keep adding items to the queue and hence remain in loop.
I guess that might be what is happening in your case.