A/c to me the correct and recommended approach is to load excel data into orchestrator queue in Init.xaml and then use Get Queue Item in GetTransactionData to process one transaction at a time… using transactionNumber or directly passing DataTable rows to Process.xaml is not best practice and should be avoided.
Load the Excel data into an Orchestrator Queue and use Get Queue Item in GetTransactionData to process one transaction at a time; avoid using TransactionNumber logic or passing DataTable rows directly to Process.xaml.
Recommended approach:
Read the Excel file in the Initialization state and add each row to an Orchestrator Queue. You can use Add Queue Item inside a For Each Row loop, or Bulk Add Queue Items if the file is large. After that, Get Transaction Item in the GetTransactionData state will automatically pick one item at a time and Process.xaml will run as usual.
Without using queues (not recommended for production):
If you want to work only with Excel, you can modify REFramework:
Change TransactionItem from QueueItem to DataRow
Read Excel into a DataTable in Init
Fetch one row using: dt.Rows(TransactionNumber - 1) and assign to transaction item
I’d still suggest the first approach because queues give you retries, parallel execution, and better visibility in Orchestrator.
If you are not preprocessing anything on the data from the excel file, I would suggest to read the excel data into datatable and use bulk add queueitem to add all the rows to the queue.