Issue with Code

Hi, I am a beginner. I am using REFramework with Excel (not queues).
I am getting this error:

Error: Cannot assign from type ‘UiPath.Core.QueueItem’ to type ‘System.Data.DataRow’ in Assign activity ‘End Process (Could not get new transaction)’.

What I am trying to do:

  • Use Excel as input (not queue)
  • Replace TransactionItem with DataRow
  • Attached screenshot below

Please help me fix this error. Thank you!


)

Hi @Amal_Tom

Try deleting the transaction item variable and then creating again and adding as data row type.

Also,Please refer below post. It has reframework sample project where you are not using queues.

You are getting this error because REFramework is originally built to work with Queue Items, not Excel rows. Even though you changed TransactionItem to a DataRow in some places, other files still think it is a Queue Item. So UiPath gets confused and shows the error.

To fix this, you must change the TransactionItem type to DataRow in ALL these files:

  1. Main.xaml → open Arguments → change TransactionItem type to System.Data.DataRow
  2. GetTransactionData.xaml → Arguments → change TransactionItem to DataRow
  3. Process.xaml → same → TransactionItem = DataRow
  4. SetTransactionStatus.xaml → same

After doing this, all files will agree on the same type — DataRow.

Then, inside GetTransactionData.xaml, in the error/exception section, keep:

TransactionItem = Nothing

Once everything is DataRow, UiPath will accept this.

In short:
Make TransactionItem = DataRow everywhere in the framework.

In the activity ‘End Process’ there is a ‘Set Value’ as ‘Nothing’ which is correct.
Just remove it. Click on Analyze Workflow (It will throw error). Retype ‘Nothing’ Again in set value.