Is there a way to change the reference field of a Queue Item in runtime

orchestrator
queue
studio

#1

Hello,

I was wondering if there is a way to change the unique reference of an already existing Queue Item to something else.

For example I am using an add Queue Item Activity to add an item to the queue with the reference set as “123”. In a separate sequence I am using Get Transaction Item, store the output in a variable (UiQueueItem) and within an assign I use UiQueueItem.Reference = “1234”.

This does not throw any exceptions and I am able to run the process, but the reference is not changed in Orchestrator.

Can this be achieved?


#2

Hi,

Whatever you do with QueueItem object on runtime does not get propagated to Orchestrator, unless you use one of the activities.
Change you’re doing is just modifying a local representation of a queue item, it does not have a direct link to queue table in DB.

I’d have to ask - why do you want to change a UniqueReference of a queue item? That seems like an odd scenario.


#3

Thanks. That clears it up.

With regards to why I want to do this I have a scenario where I have a queue of tickets with the exact same details in terms of identification (Ticket Number, subject etc.). I have added the Ticket Number as the reference in the Add Queue Item activity, but that only adds the first one and not the second (which is working as designed). But at a second load attempt, even though the transaction status has been changed from New to Successful in Orchestrator, the ticket is still in the queue and will not be picked up by the Add Queue Item Activity.

Therefore after a succesful transaction I figured I could just change the reference field of that Queue Item to be “123 (completed)” or something like that.

The idea is how to make the robot ignore certain items that seem as duplicates but are not.


#4

You could try setting the Unique Reference flag for the queue to False.
It seems that in your case it’s not unique, so that would make sense.

Otherwise you’ll probably need to generate your own UniqueReference value (TicketNumber + timestamp of request?).


#5

Yeah…I’ve done something similar where I use a counter to keep track of the number of items that need adding in the queue and just use a concatenation of the Ticket Number, Timestamp and the counter to add it, while the counter is decreased after every entry.

Thanks for the help
:slight_smile: