Get UiPath Robot environment name, and Process name at runtime at the Robot client

Hi All,
I wanted to read the current running process’ Environment name, Process name, package version which are configured at the Orchestrator from Client machine. I could these information already getting logged in the log file, which means Orchestrator sending there information while robot is scheduled/executed via Orchestrator.

Your suggestion on this please

Regards,
Nivas Kanann

Hi Nivaskannan

We have the same issue and decided to reading it from the “project.json” file in the project folder. Which contains id, version, name and description of the robot.

Best regards
Mikkel

I’ve found a roundabout solution to this question because it was also plaguing me. The thing is that it only works if you are running the project from Orchestrator

If you assign your variable to environment.currentdirectory when running off of the Orchestrator, the directory it creates "looks like this:

C: \ Users \ username \ .nuget \ packages \ projectname \ projectversion \ lib \ net45

If you want the process name just use split(environment.CurrentDirectory,"\ ")(5)

If you want the package version just use split(environment.CurrentDirectory,"\ ")(6)

Hope this helps!

(sorry, I am not sure why, but I am having some formatting issues when I try to post this response, the backslashes in the quotes of those split statements shouldn’t have a space after them)

4 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.