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.
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.
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:
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)