is there any way i can add a dictionary to a queueitem (the dictionary may have different number of values for each queueitem)?
then when retrieiving transaction item, retrieve back the dictionary and do our own splitting?
is there any way i can add a dictionary to a queueitem (the dictionary may have different number of values for each queueitem)?
then when retrieiving transaction item, retrieve back the dictionary and do our own splitting?
Yes, you can use the Item Collection property.
Hi @TyraS
Can you follow the below steps
queueData
. You can define this variable in the Variables panel or by using the Assign activity with the followingnew Queue(Of Dictionary(Of String, Object))()
This creates an empty queue that can store dictionaries with string keys and object values.
Create a dictionary that you want to add to the queue. Let’s call it dictData
. Populate it with the desired key-value pairs.
To add the dictionary to the queue, use the Add To Collection activity. Configure the activity as follows:
queueData
dictData
System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.String,System.Object>>
This adds the dictionary to the queue.
retrievedDict
. Use the following expression:retrievedDict = queueData.Dequeue()
retrievedDict
) in subsequent activities.Assign activity : queueData = new Queue(Of Dictionary(Of String, Object))()
Assign activity:
dictData = new Dictionary(Of String, Object)()
dictData.Add("Key1", "Value1")
dictData.Add("Key2", 123)
Add To Collection activity:
Collection: queueData
Item: dictData
CollectionType: System.Collections.Generic.Queue(Of System.Collections.Generic.Dictionary(Of String, Object))
Assign activity:
retrievedDict = queueData.Dequeue()
Message Box activity:
"Retrieved Dictionary : " + retrievedDict("Key1").ToString() + ", " + retrievedDict("Key2").ToString()
Regards
Gokul
Hi, is it adding to queue in orchestrator?
Each time will only add 1 dictionary though, will we still need the Add to Collection?
sry is a little confusing