Setting Transaction Status in Global Exception Handler

Hey all,
I am working with the queue and trying to set the status as failed whenever the automation fails anywhere in the main.xaml.

Inside of GlobalExceptionHandler, the errorInfo variables have these information -

So I put errorInfo.Variables[“TransactionItem”] inside of Set transaction status activity under TransactionItem input. However, I am getting an error message saying that it cannot convert type object to uipath.core.QueueItem even though errorInfo.Variables[“TransactionItem”].GetType() returns uipath.core.QueueItem


Am I missing something?
Is there a better way to do this by adding more arguments into the global exception handler workflow?

1 Like


Are you using REFramework template ? If yes then set the Transaction Item status in SetTransactionStatus workflow.

Hey @jkwon

Could you please show how are adding into the error info as well as how are passing it to set transaction?


Hey @jkwon,

You may have found a solution by now. I came across this same issue and your post helped me identify the solution so I wanted to post it here.

You just needed to cast it to a UiPath.Core.QueueItem since the error.Variables() returns an Object.

CType(errorInfo.Variables(“TransactionItem”), UiPath.core.QueueItem)

Also remember to set the Folder Path on the Set Transaction Status activity