Queue items not getting processed Correctly

Hi There, I am adding items from an Orch queue to a web app. Some items were not getting processed. So I tried in debug mode. I could see that the current transaction is not the one it is typing into the web app fields. This item is a different item. No errors in the logs in Studio. I am new to RPA UiPath. Totally confused here. Any advise will be highly appreciated. Pls see screenshots.





Hello,

As per my understanding you are not able to get the proper values from the Queue. Is that the issue?

If yes, please watch the below video. Also try to print the value in a message box to check whether you are retrieving values properly using Get Transaction item activity

UiPath - Start a job when new items are added to a queue | Queue based Trigger | Practical Demo - YouTube watch from time 20.00

Hi @mail4bobbysam,

Are you sure that the data you have in the screenshot is not real persons? Ignore this post if it is dummy data.

Doxing people with their personal information is not a good practice in any forum.

no jeevith, it is just dummy data.

Hi there @mail4bobbysam,
I hope you are well.

Peculiar, is it possible that the Queue Item reference is mismatched?
Or did you open the Queue Item within Orch to confirm the discrepancy in the specific content?

Apologies if you have already validated this.
Thanks once again for your support,
Josh

Hi @mail4bobbysam,

I cannot see the whole sequence, but the way you describe I think there are some variables or arguments which retain the value from the previous transaction and are not updated in the current transaction.

Go through your code and find places where some of the values are not updated and then reverse engineer why this happened.

My advice to you will be to use the REFramework when handling Queue Items as it ensures that each Queue Item is updated with the correct status and that the values (variables and arguments) are updated for each transaction.

Hi Joshua, thanks, I am doing great, how about you?
I already validated this. I have tried it in debug mode but dont understand what is happening. Totally confused here.

Hi Jeevith, I am new to RPA UiPath, just learning it now, after this will continue to the REFramework.

Hi again @mail4bobbysam,
Fantastic, thank you!

Hmmmm, can you make a small amendment to troubleshoot.
Instead of retrieving Queue Items, then looping through them, can we amend to:
While: TRUE
Get Transaction Item - Output = Customer
If IsNothing(Customer)
- Break

Remove your Get Queue Items, change the For Each to the While described above, move your Get Transaction Item to after your ShouldStop Check, with the If Then Break placed following the Get Transaction Item.

Example:

It is not exactly best practice and I would only introduce this to troubleshoot, but I am curious to see if you experience the same challenge.

Ultimately, your best bet from a future-proofing stand-point is to follow @jeevith’s advice above and leverage the ReFramework, which does the heavy-lifting for you!

Thanks once again,
Josh

You don’t use Get Queue Items. That’s to get multiple items. You use Get Transaction, which only gets ONE, and marks it In Progress. Then you process that item, use Set Transaction Status to mark it success/fail, and then loop back around to do Get Transaction again.

Hi @mail4bobbysam,

Sure, you will get the hang of it very soon. Let me download your sequence image and try to quickly debug it.

First picture: The process you have is not dependent on local variables and you have used SpecificContent of the queue item. That is very good practice.

Second picture: I see that the error occured in Reference : Sherwin , which has been tried 3 times.

  1. What application exception did you get in those tries?
  2. Can you double check if your item data for that queue item is correct. Click on the hamburger menu and see the queue item details.
  3. Check that each of your Customer.SpecificContent(“Key”).ToString is available in your queue item details

The way you use a for each queue item is not a bad idea, but I agree with @postwick that you should rather use the Get Transaction instead of getting all queue items at once.

Hi Jeevith
I am getting all the queue items using the “Get Queue items” activity and assigning it to a “CustomerQueue” variable. Without getting all the queue items atonce, how can u know how many items are there in the queue so that you can loop? The name of the Orch Queue and this variable is the same that is “CustomerQueue”. But i think this should not be an issue. Then I am looping thru each item in the “CustomerQueue” using a for each loop and inside the loop. I am using a “Get Transaction Item” activity and assigning the output of this activity to a variable “Customer”. The foreach variable is “Customer” and the output of the "“Get Transaction Item” activity is the same variable “Customer”. I have a doubt whether this is causing the issue. Not sure whether my understanding is right. Please see this screenshot.

UiPath handles that for you. You use Get Transaction and put it into a variable. If that variable is Nothing, then there are no more new transactions to process.

Trust us. Remove the loop. Remove the Get Queue Items. Just use Get Transaction, check if it is Nothing (if it is, stop processing).

Also, you shouldn’t use a For Each for this. You use a Flowchart. That way you can use a Flow Decision to skip to the end if there isn’t a new transaction.

2 Likes

Will do. Thanks alot for your help.

Hi Josh, thanks alot for your help.

1 Like

followed this. Now working fine. Thanks Joshua.

1 Like