Simulating QueueItem during debugging

I have a workflow (XAML) file that is part of a larger process. The process retrieves a queueitem from the orchestrator queue for processing and, during the process, passes that queue item in as an argument to my workflow for use within the workflow.

My question is, while debugging, if I want to simply debug that file without running my larger process from the beginning, how can I edit the Locals tab or set up a default value in my argument to simulate a queueitem for debugging purposes?

1 Like

Are you actually using a queueitem, or transactionitem? You should be using a transactionitem and storing it in a variable. You can just disabled the “get transaction item” activity and then manually set the values of yourTransactionVariable.SpecificContent like any other dictionary.

The argument type is “QueueItem”. The activtiy type (Get Queue Items vs Get Transaction Item) is immaterial as the resulting individual item is the same.

You say “set the values…like any other Dictionary”.

If you have screenshots or step-by-step that would be helpful. The screenshot below demonstrates what I’m trying to do… to edit the “testTransactionItem” argument in the locals panel to facilitate debugging.

Hi @tristaanogre

Assign to your testTransactionItem:

New QueueItem() With { .SpecificContent = New Dictionary(Of String, Object)  From
{
	{"key1", "value1"},
	{"key2", "value2"},
	{"key3", "value3"}
    ...
}}

E.g:

New QueueItem() With { .SpecificContent = New Dictionary(Of String, Object)  From
{
	{"Site", "Google"},
	{"Year", 2021},
	{"Date", Today}
}}
2 Likes

The difference between queueitem and transactionitem is not immaterial, as far as the correct way to use queues. transactionitem automatically sets it to In Progress as soon as you get it, etc.

Anyway, yourTransItemVar.SpecificContent is a dictionary like any other. Set the values the same as you would for any dictionary.

Assign yourTransItemVar.SpecificContent(“Name”) to “Jim”

Edit: I realized your point, sorry it’s early. Yes the datatype is the same, the difference is how you’re getting the data from the queue (which activity)

Thanks! I’ll give that a try and see if it works for me.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.