The error “Value of Type Integer cannot be converted to UiPath.Core.Queue item” means that you are trying to assign an integer value to a variable of type UiPath.Core.QueueItem. This is not possible because the two types are not compatible.
To fix this error, you need to cast the integer value to a UiPath.Core.QueueItem type. Casting is the process of converting one data type to another.
To cast the integer value to a UiPath.Core.QueueItem type, you can use the following code:
out_TransactionItem = new UiPath.Core.QueueItem(in_TransactionNumber.ToString());
Where out_TransactionItem is of type UiPath.Core.QueueItem type
The new keyword is used to create a new instance of an object. The UiPath.Core.QueueItem() constructor takes a string value as input and creates a new UiPath.Core.QueueItem object from the string value.
Once you have cast the integer value to a UiPath.Core.QueueItem type, you can then assign it to the out_TransactionItem variable.
An updated version of your GetTransactionData.xaml workflow:
* in_TransactionNumber = 1
* Value: new UiPath.Core.QueueItem(in_TransactionNumber.ToString())
* To: out_TransactionItem
This code will cast the value of the in_TransactionNumber variable to a UiPath.Core.QueueItem type and assign it to the out_TransactionItem variable. You can then use the out_TransactionItem variable in your linear process.
Note: You do not need to change any of the Reframework states to fix this error.
I have tried to implement but now receiving a new error:
“Compiler error encountered processing expression new UiPath.Core.QueueItem(in_TransactionNumber.ToString) too many arguments to Public sub new”