UI path queues

i have 20 items in queue in orchestrator. And i want to get only current date transaction to process them.

How to get only current date get transaction items from orchestrator queues?

You can apply date filter using Get queue items.

Hello,

Get Queue Items activity will not start the transaction. If you execute multiple times, and/or multiple robots the same process (same configuration of Get Queue Items) on the same Queue, you’ll get the same result.

If you want to be able to process the items and make sure you process an item one single time, even if you run the process on multiple robots, or if you run the process multiple times on the same robot, you need to use Get Transaction Item activity. This activity will start a transaction and that item will not be sent for processing to another job. At the end, you need to set the status with Set Transaction Status activity.

To control the order in which items are processed, you have 3 parameters:

  • Priority
  • Postpone date
  • Deadline date

Those parameters can be set when items are added in the queue using the Add Queue Item activity.

Basically, you can use the Postpone parameter when adding items to queue to make sure that item is not processed until a date. For example, if you set Postpone date as “DateTime.Now.AddDays(2)”, that item will be available for processing only after two days.

Another way, if you haven’t set the postpone parameter when added the items in the queue, is to use the Postpone Transaction item activity. You get a transaction item and if it shouldn’t be processed according to business login, you can postpone it until a due date.

Best regards
Silviu

4 Likes

i have 10items in queue with status new now when i start my workflow get transaction item get null value why? there are 10 items in the queue but it returns null…

Check the following:

  • If Orchestrator instance is the same where you checked in the browser and the one UiRobot is connected to.
  • If Queue Name for the Get Transaction Item is exactly the queue where you have the items.
  • If you have Postpone date set for those item.

My workflow is in attach document. my queue name is same as in orchestrator.

I have change the status of transaction to postpone date and they appear in NEW state in queue but get transaction items haven’t get them it return null.

i change the status of transaction to failed state and items are also present in queue with failed state but get transaction item haven’t get any single item from queue.

And one bot is connected.

Help required

Postpone date means that item will not be scheduled for execution until after that date.

Let’s say that you have items in your queue with Postpone date set as 2018-11-01. If you run the process today, 2018-10-29, the Get Transaction Item will return null, as all items are postponed (delayed) until 2018-11-01. If you run the process on 2018-11-01 or later, Get Transaction Item will retrieve one item from Queue.

In your initial post you said you want to process items from current date. But what should you do with the other items? Discard them (set as Failed with a Business Exception) or postpone for later?

Here is a draft on how your process could look like:

1 Like

my scenario is to first insert all items in the queue then get items from the queue if queue item date =current date than process it and change its status to successful.

And other items which are of future date i extract them with get transaction item and check them if it is of current date then process them if not then change their status to pending and again and again.i have to process all the items on their respective date. But when i initially use get transaction item it return null i am stuck there

In this case, the solution is to use the Postpone field when you add the items in the queue. Set it to the date when you want them to be processed.
Something like this:


But, of course, you need to set the value according to your business needs.

Where do you get this date from? In the previous comment you mentioned “queue item date =current date”. What exactly do you mean by “queue item date”?

i am getting item date from excel sheet. i am attaching my workflow.

One more question in add Queue item u have mentioned set the postpone date ok i set that date. Now i want to check all the items in the queue which are in postpone state to verify them or to check them in my process. in my knowledge i get them all by get transaction items to check remaining postpone items in the queue. am i right ?Main.xaml (29.0 KB)

these are items in my queues. i change their status to failed if these are not of current date and also i postpone some to items with future date for test purpose but i haven’t get any record i get null when i debug my code.

Get Transaction item will not get items which have postpone date set to a future date.
In the workflow you attached you are not using the Postpone property when adding items to queue. You should use that property and then you don’t need to use Postpone Transaction item anymore. Also, the Postpone property is of DateTime type, which means it has a time as well, not only a date. If you hover the postpone field in Orchestrator, you can see the exact timestamp.

1 Like

ok i got your point. just answer this question. how can i get items from queues from orchestrator using get transaction items?

which state of queue items data “get transaction item” show?

Why transaction item show null ?

To get a item from queue, you just use Get Transaction Item activity. If there are transactions with status New and without Postpone date or with Postpone date in the past, one of those items will be send to robot for processing and the status will be changed to In Progress.
After that, you should always use Set Transaction status to either set it as Success, or Failed. If you don’t do that, the transaction will remain In Progress for 24 hours and then changed to Abandon.

Transaction item can be null when:

  • you don’t have any item with New status, or
  • you don’t have items without Postpone date or with Postpone date in the past.
1 Like

but if i have an item which i have to process after 5 days then it means if it is present in NEW i can get it with get transaction but i need it after 5 days then i need to process it how will i manage then.

Because you said i can only get transaction with new status. Then with in 24hours i have to change its(transaction) status to failed or success otherwise it will be abandon. so my question it if i change its status within 24 hours it is then present in queue with success/failed status.then how can i get this item after 5 days for processing ? Because i have list of items with different future dates i have to perform some transaction on that different future dates that is my an issue i am stuck in. if i set transaction during adding queue to postpone . then how will i execute my code of transaction for these specific items ? because i already set them to postpone during adding into queue so how can i get these items in my code for processing their transaction with my workflow for different type of items which are present in queue with different future date.

@Silviu?

The items with status New will stay in queue until it will be requested by a robot after it’s postpone date, it is not affected by the “24h to abandon”.
The “24h to Abandon” will apply only to items with status In Progress. Which means that if you start a transaction (status = In Progress), working on a queue item by a request with Get Transaction item, and if you don’t set back the statue either as Success or Failed, it will be automatically set to Abandon after 24h. This assumes that something unexpected happened with the Robot machine, for example a system crush in the middle of the transaction.

For more details about queue item statuses, please check this page - Queue Item Statuses.

ok for example i add item in queue and set postpone time to future date than i have to process that item for example on 1 November then how can i get this queue item in my code with get transaction item? because i have to pass each queue item to separate workflow based on specific condition.

Usually, the queue is a storing mechanism for similar items and all items are consumed by the same process. Of course, you can have a decision based on a property in the item to do something or something else…
Like, If ( transactionItem.SpecificContent(“Type”).ToString.Equals(“Oranges”) ) { Invoke ProcessOranges } else {Invoke SomethingElse}.

Postpone property together with Priority and Deadline are used to prioritize the items. The processing order is defined by those properties, and not by insert order only.