A queue is a container that enables you to hold an unlimited number of items. Queue items can store multiple types of data, such as invoice information or customer details. A queue is usually considered as a list of pending jobs, executed by priority or other criteria related to the underlying order several jobs are executed. However, in UiPath, queues are related to information obtained or generated by the bot, that is, inputs and outputs. The bot stores the information in a queue, where the information remains stored by the Orchestrator so that it can be retrieved later by other bots. So, a queue is a container of data held so other bots or applications can use it.
How to use UiPath Queues
While developing the workflow for any process the Queues are managed by the RPA developers. There are various activities that help the UiPath Studio to communicate with the Orchestrator Queues.
So the studio activities that helps in communicating with the Orchestrator Queues are as follows:
Add Queue Item
Add Transaction Item
Bulk Add Queue Items
Get Transaction Item
Delete Queue Items
Get Queue Items
Postpone Transaction Item
Set Transaction Status
Set Transaction Progress
Wait Queue Item
These can be found in the Activities panel under Orchestrator -> Queues as shown below:
Pre-Requisite
To work with these activities the Orchestrator should be connected with the Robot.
Add Queue Item
This activity helps to add data (item) in the Queue in Uipath. The status of the item will be New in the Queue.
`UiPath.Core.Activities.AddQueueItem`
ConfigurationsinProperties Panel:
Queue Name: The queue where the QueueItem object is to be added. The Queue Name should be same as the Queue created in the Orchestrator.
Reference: The reference can be used to link your transactions to other applications used within an automation project.
ItemInformationCollection: This field accepts the dictionary variables. This enables importing an entire dictionary of information for a queue item. Dictionary<string, object>
Deadline– The date before which the queue item should be processed. This property can be filled in with relative dates such as DateTime.Now.AddHours(2), DateTime.Now.AddDays(10) and DateTime.Now.Add(New System.TimeSpan(5, 0, 0, 0))
Here you need to take care of Few properties as shown above, Which can be referenced from the Queue you have created in Orchestrator.
Add Transaction Item
This activity adds an item in the queue, starts the transaction, and sets the status to In Progress. It can also be configured to add a custom reference to each transaction. The status of the item is set to **InProgress**. Returns the item as a `QueueItem` variable.
`UiPath.Core.Activities.AddTransactionItem`
Bulk Add Queue Items
This activity adds the items from a specified Datatable to the queue in the orchestrator. The items once added in the Queue the statuses are changed to New.
UiPath.Core.Activities.BulkAddQueueItems
Get Transaction Item
This activity is used to get the item from the orchestrator queue to process and sets its status to In-progress. Starting its processing makes it a transaction.
‘UiPath.Core.Activities.GetQueueItem’
Delete Queue Item
Enables you to delete items with the ‘New’ state from a specified queue.
‘UiPath.Core.Activities.DeleteQueueItems’
Set Transaction Status
This activity is used to set the transaction status of item to Failed or Successful.
Inputs:
Output– A collection of additional information about the specific TransactionItem whose status is to be updated.
Status– The status that is to be set to the TransactionItem (Failed/Successful).
TransactionItem– The TransactionItem whose status is to be updated.
Get Queue Items
This activity is one of the important activity to work with the list of transactions at a time. This activity is used to get the list of 100 transaction items from the orchestrator Queue to process, according to priority, state, reference, etc.
These are some of the important activities that are mostly used while working with the orchestrator Queue.
Manage Queues in Orchestrator
The first step is to create the Queue in the Orchestrator.
Navigate: Login to Orchestrator > Click on the Queue Option > Click on the Add (+) icon.
Enter the mandatory Queue Name, Description, Unique Reference (Y/N), Auto Retry (Y/N), enter Max Retry if yes and Enable/Disable SLA.
Click on the Add button -> Queue Created Successfully.
You can Edit, Monitor, Remove the Queue at any time by clicking on the actions icon.
To view the items in a specific queue you have to click View Transactions. On clicking the Transactions page is displayed where you can view all the items with its status.
Queue Understanding with example
The example is to add the data into the Queue and process the data. So let’s build the process from the studio.
Pre-Requisite: Make sure that the robot is connected with the orchestrator.
We have some data in the Excel and we have to add the data to the Orchestrator Queue that we have created (i.e – TestQueue).
Let’s build the workflow in studio
Create the new blank process and take Simple Sequence with name (GetDataDetails).
Now from Activity panel take Read range activity and give the path of the sheet and store it in Data table (DataDT)
Then to iterate every row in the datatable use For Each row activity
Now take the “Add Queue Item” activity and give the Item Information (collection) as shown below. This is the key value for the items.
Now provide the Queue name as created in the orchestrator (Same name – “TestQueue”) as string.
Now Run this activity and check. – Execution successful.
Now Go to the Orchestrator and Click on the Queue > Refresh > Actions (View Transactions). Here all the items are added that were in the Data table and will be in “New” state. If you see in the below screenshots all the five records are shown.
Now to process the data from the Queue we have to use the “Get Transaction Item” activity. So now let’s see how it works
Take a New sequence and Drag an activity “Get Transaction Item”
Give the “Queue Name”. With the Queue name it matches the queue and look for the items that are in “New” status.
Create variable and store the output as a single item in “TransactionItem” – .
Now take an Assign activity and take one variable as “Dob”
Now Check the orchestrator you will observe that the “New” state becomes “In progress”
Now we need to check whether the transaction is successful or failed. Take an activity “Set Transaction Status” and set Status – Failed/Successful.
Run the activity you will notice in orchestrator that the status of the transaction is “successful” as shown below.
Now Click to see the Values with the Key
Now if you see the records the items are as per the excel the third item is processed successfully.
So this is the small example by which you can work with the Queues in the UiPath.
That’s all! Happy Automation!
Conclusion
Queues enable to create of large automation projects underlies by complex logic. The Item Statuses are controlled by the developers of UiPath and the Revision Status are controlled I, Orchestrator.
By Default, the Queue items that have been processed successfully are archived on a daily basis, while the others remain in the queue so that you can decide what to do with them.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Subscribe to receive exclusive content and notifications