My requirement is to add a queue item to a Queue. While adding that I have to add all the required information related to that Queue Item. So how can I add any collection/array to the queue item?
Example: I am working on a use case to automate all the Service and Access requests. Here if the request is of type SR’s then I have to add all the available Service Requests Numbers have to be stored in a single Queue Item(SR Queue Item) and if it is of type AR then I have to add all the available Access Requests Numbers have to be stored in a single Queue Item(AR Queue Item).
So please help me out how to store multiple values in a Single Queue Item?
Hi @ManiPrajwal_K
You can use the “Collections” property when adding a queue item using “Add Queue Item” activity, and the SpecificContent property of the QueueItem object when processing the Queue Item.
A detailed example showing activities and properties that you need to use is given on the UiPath Docs page: (Scroll to the example part towards the later half of the document page)
Also, unless your project’s requirement exclusively specifies that you must add all Service Requests under just one queue item, what you could do is add a datatable object with at least two columns (Request Number, Request Type) and add more columns to the table as necessary for your process.
Then when processing the Queue Item, you can use qItem.SpecificContent("Request Type").ToString to access the request type.
Based on this, you can switch to the relevant workflow in your process.
The benefit in doing this is that you will have individual traceable Queue Items for eac incoming request. And if you want to scale your process, multiple robots can process the queue faster, unlike the single queue item for each type where one robot must process all requests once the queue item is acquired.