GetQueueItem or GetTransaction

Team,

I have a situation where I’ve stored the data in Queue with a specific field called Date. I have 4 robots running and pulling information from the same queue.

I want to retrieve only items from the queue with today’s date, but unique record amongst 4 robots.

Is this possible?

I thought about this for a few minutes, and could you simply just change the status of all the items that are over due? You can use Get Queue Items with the To property to store all items up to Today.AddDays(-1). - You would use a ForEach with that enumerable and a Set Transaction Status inside to change them all to Failed or Successful.

Then, you can just use the Get Transaction Item as you would normally, because the only ones available would be for today, and the status will change to In Progress.

There might be a few other ways too, but I am unsure because you would want to change the status to In Progress as you get a transaction so the bots don’t fumble on the same transaction.

Regards.

1 Like

Thanks @ClaytonM - i think i have a different problem. Let me explain further.

Today I enter 10 records with today’s date, tomorrow I add 10 more items, but I have to only process items from yesterday. My queue has a column, date, and I have 4 robots running.

I’m being told that if I start my robots and I use get queue item, all 4 robots will get same record. This sounds bit crazy to me.

So, what I’m looking at is something similar to “GetTransactionItem” with filter “date” one unique item per BOT. Possible?

I’m not sure that’s a good approach to be honest. What happens if yesterday’s batch doesn’t process? you would basically skip that day. Ideally, you would design it in a way where it can process every day including the days it missed. In that approach, you would just get each transaction item as normal and let it become either Failed or Successful.

If yesterday’s batch of items are set to a status, not New or In Progress, then the next day will only process the available items, most likely the 10 items you added for that day. So, as long as you are changing the status for the items, it will keep the correct items being processed each time. - You can also, if you choose, use an If condition to check the date of the item. See image for how to do that:
image
i am not sure which one to choose for creation date, but you can check each one in a Write Line to figure what you need to look at.

As far as I know, the only way to filter the items is with the Get Queue Items activity. However, like I mentioned, it won’t change the status to In Progress when you use it, so I’m not sure it’s a viable method for Queue processing.

Let me know if I need explain this better. And, I’m still learning Queues myself.

Regards.