I have a queue that works the transaction items then adds them to another queue. In one instance I may need to postpone the TI in the first queue a week but still need to add it to the second queue for notation processing. My issue is when I rerun the first transaction it will want to add the same reference number to the second queue which will throw an error. If I use a TryCatch will catching System.Transaction.TransactionException be too large of a net? There doesn’t seem to be a catch for Duplicate Reference Error Code: 1300.
This exception is thrown because your queue enforces unique reference.
see Managing Queues in Orchestrator
This option is available when you create the queue.
Is this set on purpose?
Cheers
I know it’s been a while since you posted this question, but in case it’s useful to anyone, here’s an idea:
If you want to make sure you’re catching only this exception, you can catch UiPath.Core.Activities.OrchestratorHttpException
and inside catch section you can check if exception.Message.Contains("Duplicate")
. If exception message does not contain this keyword you can rethrow the exception, else you may only want to log it.
Hi there @AlexandraVeizu,
As a suggestion, it may be worth incorporating a Property into the Add Queue Item Activity called Continue on Duplicate, or something similar.
Frequently, I find that Throwing an Exception is not my preferred response to a duplicate existing, but I fully understand it grants the flexibility to do whatever you need.
Thanks in advance,
Josh