REFrameWork Disptacher

I am working with the REFramework.

  • I commented out the Get Queue Item activity in the GetTransactionData state.

  • Instead, I am using an If condition based on TransactionNumber to control the transaction flow.

  • I am reading data from an Excel file into a DataTable.

  • In the Process state, I am using a dt_Row variable for transaction processing.

My requirement is:

  • To fetch only the first row from the DataTable (based on TransactionNumber).

  • Pass that row data to the Process.xaml workflow.

  • Add the row data to Orchestrator Queue using the Add Queue Item activity.

Could you please confirm:

  • Whether this is the correct approach in REFramework?

  • What is the best practice to get one row at a time from a DataTable and add it as a Queue Item without using Get Queue Item?

Any guidance or sample implementation would be helpful.

Hey @S_Yuvaraj,
You can find that link helpfull:

Hi @S_Yuvaraj

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.

Happy Automation

Hi @S_Yuvaraj

Try this

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.

Hi @S_Yuvaraj

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.

The reframework template is dedicated to acting as a perfomer for consuming the transaction and executing a process passed in process.xaml.

To create a dispatcher, you can use a simple process:
1-read the csv activity
2-for each row in the datatable
3- Add queue item activity

or instead of steps 2 and 3, you can simply use Bulk add Queue Items

1 Like

Hi @S_Yuvaraj

Skipping Get Queue Item is possible, but not the usual REFramework practice.

The best way is:

  • Read the Excel into a DataTable in Init.
  • In GetTransactionData, pick one row at a time (by index) from the DataTable.
  • Pass that row as the transaction item to Process.
  • Add Queue items before processing if you want Orchestrator to track them.

Make sure you handle the row index correctly to avoid duplicates or missing rows.

@S_Yuvaraj

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.

@S_Yuvaraj

if you are looking for best practice then bulk add queue item is what you need to do

if some preprocessing si involved or you want to try then what you are following is correct

cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.