Hi,
I know this is a repetitive topic but I had to add this as a new topic as the solutions provided for the similar topic were not helping me out.
I am using a “for each” loop to iterate through the queue items from get transaction but I am getting error(snip below), as a resolution for previous similar posts I already tried changing the argument type of my “For each” loop to “uipath.Core.queueitem” but still the error persists.
Once go to ForEach loop Activity properties and check what you declared argument type. It must be UiPath.Core.QueueItem. Please do changes and then try it.
@Faraz_Subhani, include @lakshman point, and make sure you have the only one For Each activity in your activity pane. If two found then use the another activity. I do handle that same issue before.
@KannanSuresh Absolutely correct and here I want to iterate through the queue items generated by Get Transactions @Michael_Udhaya Property argument type is already set to QueueItem but yes I am using 2 for looops in same activity, one for iterating through Data table and the other for iterating through queueItems. Attaching my workflow, it’s very simple oneMain.xaml (9.5 KB)
I totally get your point and yes it works fine when I am using Get Queue Items, So, please correct me if I am wrong, Get Transaction item’s output will only contain a single queue item and not a collection of Entire Queue items which can be iterated and if we want to iterate through entire Queue items we need to use Get Queue Items.
Please may I know then the exact usage of Get Transaction Items? Is It only used to set transaction status for individual queue items?
It is not Get Transaction Items it is Get Transaction Item. (Item not Items)
Gets an item from the queue so that you can process it (start the transaction) and sets its status to In Progress. Please note that to execute this activity, the Robot role needs to have view, edit, and create permissions on transactions, as well as view and edit permissions on queues. The activity runs under the Robot it executes it.
If the queue is empty, the following error is thrown upon accessing the retrieved TransactionItem : System.Exception: Object reference not set to an instance of an object.