Error handling in Apps from Faulted process

Hello,
after triggering a process using an Apps event Start Process, I want to show an error message taken from the Exception if the process fails (uncaught Exception with no Global Exception Handler set).

This is how it’s configured right now:

It correctly works if the process is started as Attended, but when the type is set to Unattended both variables Error Type and Error Message are always empty, resulting in an empty error message.

How can I make it work for Unattended processes?

@Regina_Stefano ,

Are you returning error message into our argument from process ?

Thanks,
Arvind

No, I’m using the built-in variables in Start Process event.

Hi, have you found any solution for this? I have the same issue, and can’t find a way to display an exception message in Apps for unattended process.

@Vanja ,

Are you not able to drop the error message into message display as below?

Thanks,
Arvind

Hi Arvind,

No, I don’t have the problem to drop it in the message. The problem is that it is not showing anything on the toast. The toast appears in the app when the process fails, meaning that it gets the information of process failure, but built-in variables Error Type and Error Message don’t contain any values so the toast shows empty. Is there any step that I am missing to actually assign the exception message to these variables? I have tried with general out argument, but when exception occurs, nothing can be passed through out argument.

Thank you.

@Vanja ,

Can you handle process exception into Catch block into process and pass error message back into out parameter to apps?

Once that work then you can display error message on apps and write some logic.

Thanks,
Ak

I will try that.

Thanks!

Hi Arvind,

I have tested suggested solution, and still doesn’t solve my problem.

In my process, in End Process state of the RE-Framework, I have added Throw in the Finally of the Try-Catch block. In this case, when the bot fails, it will Throw exception message and the job will get faulted state in Orchestrator. In setup like this, when exception is thrown, any out arguments can’t be passed. But the apps registers that process failed and that exception occurred, it only doesn’t have those values in the built-in vars, but it enters the ‘Error section’ of the Start Process in the Apps. So this part, except empty values in Error type and Error message, is desired.

I have tried to put a Try-Catch around that Throw activity and in that case the out args can be passed out. But the jobs finishes with Successful state, and in the Apps it gets in ‘When completed’ section of Start Process. There I can display argument passed from the process, and the error message provided.

But the problem is that I don’t want that false Successful state . And the ideal solution would be that I can throw the exception, job goes to Faulted state, and in the Apps the popup message shows that job faulted with passed error message.

There must be a simple fix for this, but I can’t find it.