My goal is to flag the job status as faulted in Orchestrator if an unexpected error occurs so that it can be further investigated. The process is manually triggered from the machine, so if an unhandled error is thrown, it displays the detailed error message. Is there a way to disable this message while still changing the job state in Orchestrator?
Jobs triggered from Orchestrator do not show an error message on the machine. This is the behaviour what I want to accomplish but for locally triggered processes instead.
If your intention is a graceful exit then surround your workflow with a âtry catchâ and in the âcatchâ clock select âSystem.Exceptionâ and there you can log the âexception.messageâ or âexception.sourceâ.
If it is attended then how are you triggering it from orchestrator? Schedules or monitor events⌠If it is monitor events then how can you trigger it from Orch. bit unclear on that part, more details would be easier to diagnose the issue.
I guess if your goal is a graceful exit then try catch with a system exception should fix it.
What I said may have been confusing so Iâll try to clear it up. The process is not triggered from Orchestrator, but I would like to monitor the success of the process from Orchestrator. The process is to be triggered locally from the robot tray.
My intention is in fact a graceful exit when an unexpected error occurs. The local user does not need the specific error details, but someone else can view the logs for any faulted processes and investigate the root cause.
You are correct. The graceful exit will not flag the job as Faulted, so you want the error thrown at the end of the fault.
I donât think there is a feature that will fault the job, but you can put it in the Queue which the individual item can be Failed, however the job would be Successful (not ideal either). On the other hand, you are not using Orchestrator.
So I guess there is a trade-off. Either fault it with an error or donât and have it be Successful. - maybe you can send a notification that it failed. Unless you need it to be in a Faulted state for analytics, then that wouldnât be the best choice.
Additionally, it would be beneficial if you have recovery built in the bot, where if a failure occurs, it will attempt a retry up to a certain amount of retries. This will lower the number of chances an error occurs.
Also, you can only set success or failure in Orch. if you re using queue items, but if you really want whether it failed or succeeded and not actually notify the user then notification for high priority usecase and a logging folder for execution for low priority can be coded.
Hi,
Use Try catch block for your entire code block in UiPath Studio. Catch block dont do anything. The Orchestrator will show the status as âSuccefullâ.