Bulk Upload Option to load the Queue

Hi,

I wanted to share that while uploading the data in to queues, we have only option available to populate the queue would be a different process to do that. Since the record populated in the queue is stored in a single column in SQL DB as JSON data. So it will be good idea to have a same logic if we provide the file upload option which reads each row and populate the queue and fill the column with JSON data.

This requires some control. Exception handling. Logging. (if not all items are uploaded). Too complex.

1 Like

How to use Datatable (or any other object) in Queue (Orchestrator):

Add to queue:

  1. In Studio, import Newtonsoft.Json namespace
  2. Serialize datatable using the following command (output string): JSONConvert.SerializeObject(dt)
  3. Send the string to queue

Consume queue:

  1. Get the string from queue
  2. Use Deserialize json activity (from Uipath.Web.Activities package) using TypeArgument DataTable property
  3. Use the outputed datatable for your workflow.
6 Likes

Thanks Andrei - will try this and keep you posted…

Also, how can we populate the queue rather than constructing this work as a seperate process…

Assume, before my BOT start processing it, i would keep it simple if there is an option to upload the excel file as bulk upload in the queue through screen itself.

1 Like

As a product, you have everything exception handling, logging…so only thing which needs to work on is to get the input as Excel or file path and read the data and populate the queue as bulk upload…

If the screen provides an option to choose the file and upload…internally we can do the same thing what currently the Add Queue item activity does…

1 Like

Getting below error while converting Mail message object using JSONConvert object.

Error
Assign : Error getting value from ‘ReadTimeout’ on ‘System.IO.MemoryStream’.
Kindly help to resolve this.

1 Like

Hi Andrei,
i am able to upload datatable to queue. Now the point is i want to fetch records row by row from the queue? Is there any way to do this ?

1 Like

As a subject line, how do you think if we could add a set of transaction items to Queue instead of adding each item once?

Thanks.
JN.

1 Like

HI @tnguyen449

You have that option… Try out the link below.

2 Likes

If you would have to choose what would you choose?

  • AllOrNothing - in case of error rollback
  • StopAtFirstError - insert till an error is encountered
  • ProcessAllIndividually - insert all that do not throw error and return a list of errors.
1 Like

My first thought is that all of these three options might come useful in specific scenarios. Do we absolutely have to choose?

If I had to, I would say ProcessAllIndividually as the one that seems most flexible out of the three.

1 Like

Hi Rupesh , You can try using this Opition


Bulk Upload using Excel

2 Likes

How to add bulk data to the queue through api ? Please help me out…
Thanks in advance.

1 Like