Attended process start/finish time?

Hello

I’m currently building a robot, that needs to collect Start time and End time of different processes.

It is going fine with unattended robots - I’m just getting the values through an API requests.

However the problem is with attended robots, that are not present in orchestrator.

I could place a log message at the start, and end time and get the values like that for the processes that were successfully completed. The problem is when the process is not successfully completed, and is for ex crashed half way through.

How do I know when the process ended?

Looking for any ideas, thanks.

@LimitlessUi

Use a try catch around the process and in finally block set the end time…as finally will be executed always even if it fails or successful you will have a log of end time

cheers

How are you collecting that information for unattended jobs currently? Is it from the Start Time and End Time properties of the Job? The same information should be available for attended jobs.

image

@yikwen.goo
Currently im getting the values through API requests with endpoint to orchestrator jobs. The thing with attended processes is - they’re not appearing in orchestrator jobs, so I can’t get any info about them through an API :frowning:

Hi @LimitlessUi

Implement comprehensive exception handling within your process. Use try-catch blocks to catch and handle any errors or exceptions that may occur. In the catch block, you can include a log entry with the current timestamp, indicating that an exception was encountered. This can help you identify the approximate time when the process encountered an issue.

Thanks!

That is strange though - both Attended and Unattended jobs should appear in Orchestrator. In the Orchestrator Folders where the Processes are created, you should fine the Jobs that are run, whether Unattended or Attended.

Perhaps you could check if there are any filters on the Jobs page that are filtering out Attended Jobs? See example below of a Jobs page with both Attended and Unattended job runs.

@Anil_G @Nitya1
Thank you both for suggesting a try-catch operations, however in my org we have over 100 bots running, so this would be extremely time consuming to add appropriate try-catch blocks for every scenario for each of them.

I have to find other, less time consuming solution, but thank you very much.

@LimitlessUi

No appropriate catch…system.exception is ehat you would add for all

Cheers

Your processs shouldn’t crash halfway through. You should be using error handling to avoid that.

Anyway, attended processes still show up in Orchestrator. The user should be connected to Orchestrator via UiPath Assistant.