"Bulk Add Queue Items" and "Unique Reference" Queue

“Buld Add Queue Items” activities currently cannot be used for unique reference queues (doing so seems to create an “Bad Request” error). Most likely multiple empty reference from the input datatable are causing unique conflicts.

Can we please exclude empty reference from the unique definition? Or better, add an additional input parameter for the “Buld Add Queue Items” to choose an “Index Column” which will be filling the reference field?

Hi @huangsuixi,
Are you able to show potential example or use case?

Thanks for getting back so fast.

First I want to update my observations.

When a queue has “Unique Reference” enabled, it seems like “Bulk Add Queue Items” activities simply won’t work even with single row datatable as input. It will either say “Bad Request” (if commit type is AllOrNothing) or “Unable to Add” (if commit type is “ProcessAllIndepently”). Similar response can be observed by manual upload through Orchestrator website:

image

Update Suggestion

Add an index column (or a formula utilizing certain column value of the datatable) as input for “Bulk Add Queue Items” is first and foremost a way to ensure compatibility of these two features. Ideally, we should probably also add an option to change the behavior of “Unique Reference” to instead overwrite (or auto deletion) of the old item.

Use Cases.

Think about a routine case with following sequence:

  1. Dispatcher A add queue items requesting updates on certain attributes of some entities; each such entity has its own unique ID.

  2. Performer B process the queue at fixed time of day and send revelent users (linked to entity) confirmation emails.

Note that A can be triggered multiple times throughout the day, thus may target same entity. However, the content of such requests may be different. In case of a duplication, the earlier request should be voided.

Also note that B needs to be scalable, so queue items created in A must be decentralized.

Solution:

Due to the limitation mentioned earlier, my current solution requires me to use a combination of “Get Queue Items” (reference = entity ID) and “Delete Queue Items” prior to “Add Queue Item” in Dispatcher A. And I must loop through the input DataTable to create each Queue Item.

If the suggested updates can be implemented, all I need to do is to apply a “Bulk Add Queue Items” with “Unique Reference” set as overwrite.

1 Like

Thank you for your suggestion. I added it to our internal ideas tracker for our team to consider.

Thank you Pablito.

1 Like

If this is what’s happening we have a bug. @huangsuixi could you please upload a dummy CSV file for testing?

Thanks Badita, I believe any CSV would trigger that error, as a reference is required for an unique reference queue, yet the current interface for Bulk add does not provide a way to provide that information.

Here is an basic example (sorry forum does not allow csv upload, so I just screenshot it):

Prior to upload:
image

After clicking upload:
image

What happens if you add a Reference column and put some unique ids into?

3 Likes

Ah you are right - adding a “Reference” column fixed that. I cannot believe I have not thought of that. :frowning:

That is good news indeed, as I can simply append a “Reference” column to the datatable prior to adding to queue. Thanks a lot.

Please close the topic.

3 Likes
3 Likes

Thanks, it is very well documented here. Not sure how I missed that. Will be more thorough next time.

2 Likes