Get Exception Type of Queue Item

Hi,

Is there any way to get the type of Exception from Queue Items?
Like for example from below Queue item I need to know that Queue failed due to Application exception of business Exception

Hi @Shreya_Rao1
Hi,

you can now access processing exception as well directly from a queue item variable.
in this example is used GetQueueItems and just got the first one, but using a loop should not be a problem.

image
image

Cheers

I tried using Processing Exception function, but using that I get the message assigned with that failure not the type of Failure i.e whether it is “Business” or “Application”

Did you try using a Rest API call for that?

no but cant we do without using api?

@Shreya_Rao1 Have you try this one?
You can set the details of the exception with Set Transaction Status. You can later fetch those details with MyQueueItem.ProcessingException.Details , where MyQueueItem is a QueueItem object.

In the UiPath API / implementation we do have an ENUM: ProcessingExceptionType
grafik
This ENUM has two forms: ApplicationException, BusinessException
grafik
similar what do see in short in Orchestrator Table

An Access can be done by:
YourQueueItemVar.ProcessingException.Type

More detail information on which detail Exception occurred we can retrieve by
YourQueueItemVar.ProcessingException.GetType
(System.Exception, SelectorNotFoundException…)

Kindly note:
when the QueueItem was not failing then the YourQueueItemVar.ProcessingException is NULL.
In such a case, access would result in the typical Reference not set… Exception

So we would check in advance with isNothing(YourQueueItemVar.ProcessingException) if it is null or not. If it is set then we access as described above.

so with already mentioned Get Queue Items (maybe with additional set filter options) then QueueItems can be retrieved and evaluated / postprocessed with:

  • for each
  • LINQ

depending on what is needed. By the Processing with we check defensive if the ProcessingException is set or not (as described above) before accessing its Properties / Methods.

Also note:
When setting e.g. the status on a QueueItem (e.g. with Set Status activity) and later in the flow, the MyQueueItem.ProcessingException is accessed it will be always null also when the QueueItem failed and the status was set.
There is no Round-Back / Refresh on the local QueueItem variable and therefore we cannot refer to the ProcessingException.

Discussion in the Feedback Category here: