Transactionitem datatype cannot change from datarow to queueitem

hi guys,

recently, I am refactoring my automation from using tabular data to orchestrator queue. it’s leveraging REFramework template. so I tried to change TransactionItem datatype from DataRow to QueueItem. but after I change it, it automatically changes back to datarow again.
before change:

after change, before click “ok”:

after click “ok” and reopen it:

Hi @haiyan.he

First, change the datatype for all the variables, after that change the datatype for the arguments.

Hope it helps!!

Hi @haiyan.he

You might be doing it after clicking on edit arguments, whereas you need to go inside the workflow and then change it to QueueItem. and then Remap the value.

That’s how you would be able to refactor.

For eg if in_TransactionItem is declared in Process.xaml, you need to open the process.xaml file and then change the argument type from the bottom panel of Arguments.

Happy Automation! :smiley:

1 Like

I’d be glad to provide a comprehensive response to the UiPath error “TransactionItem datatype cannot change from datarow to queueitem”:

Error Analysis:

This error arises when you attempt to modify the TransactionItem variable’s data type within a workflow or between invoked workflows in UiPath. The TransactionItem variable is a central concept in the ReFramework architecture, designed to handle various types of data during automation execution. However, it’s intended to maintain a consistent data type throughout the process.

Reasons for the Error:

  1. Type Mismatch in Arguments: If you’re invoking a child workflow that expects a QueueItem as TransactionItem, but the parent workflow is passing a DataRow, this mismatch will trigger the error.
  2. Incorrect Type Change Within Workflow: Modifying the TransactionItem variable’s type within the same workflow (e.g., from DataRow to QueueItem) is not allowed.


1. Maintain Consistent Data Type:

  • Ensure that the TransactionItem variable retains the same data type throughout the entire workflow execution, including child workflows.
  • If necessary, convert data between DataRow and QueueItem explicitly using appropriate activities like Add Data Row or custom logic to build a QueueItem from DataRow values.

2. Use Appropriate Argument Types:

  • When invoking child workflows, verify that the argument types (including TransactionItem) in both the parent and child workflows match. Make sure they are either both DataRow or both QueueItem.

3. Leverage Data Tables (If Applicable):

  • If you’re primarily working with data in tabular format, consider using a DataTable variable instead of TransactionItem. You can pass the entire DataTable to workflows that need to process multiple data rows at once.

Additional Tips:

  • Double-check the data types of variables in your workflow and invoked workflows.
  • Utilize clear variable names that reflect their data types.
  • Consider using comments or documentation to explain the expected data type for each variable.
  • For complex scenarios, explore the For Each Row activity for iterating through data in a DataTable and handling individual rows.

Example (Maintaining QueueItem Data Type):

// Parent Workflow (passes QueueItem)

QueueItem transactionItem = new QueueItem("..."); // Create QueueItem

// Invoke child workflow (expecting QueueItem)
InvokeWorkflow("ChildWorkflow", new { transactionItem });

// Child Workflow (receives QueueItem)

QueueItem receivedItem = (QueueItem)arguments.transactionItem;
// Process receivedItem ...

By following these strategies, you can effectively address the “TransactionItem datatype cannot change” error and ensure smooth processing of data within your UiPath workflows.

@haiyan.he ,

This is the solution. Follow this.

Ashok :slightly_smiling_face:

1 Like

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