How To Add And Obtain Complex Data Types While Working With Queues

How to add complex datatypes in Queues and how to get complex datatypes from Queues?

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.


Example: Sample workflow to add datatable to queue and retrieve the same. Note this workflow is being created in UiPath Studio version 2019.4.3. Hence, it can be opened with version 2019.4.3 or higher.
Click here to download

2 Likes