How to display Process Name and Main Xaml and Error activity name and error flow name

Hi All ,

i have invoked two files . I applied try catch to my main file .
in log file i want to show the process name and main file and where the error occurs that activity name and it’s flow name(means it’s sub flow).

Please help me o this.

Thanks
Srinivas

Hello!

Take a look in this

Hope It Helps!

Regards,

I may have found a partial solution for you here:

Not sure how to get the XAML file though

Best way of retrieving the process name for me is to Deserialize the project.json with the UiPath.Web.Activites Library.

jsonString = System.IO.File.ReadAllText(Directory.GetCurrentDirectory() + “\project.json”)

and then assign from the jObject you get from the Deserialize-Activity

NameOfProcess = jsonObject(“name”).ToString

I’m still not sure how to retrieve the Environment though. Any ideas? I ran into the same problem

The problem is when you have a library… I have my project called test, but uses a library and calling GetCurrentDirectory, I get the library’s folder

image

Solved it with

Process.GetCurrentProcess.MainWindowTitle
3 Likes

For the record, this line right there worked for me.
Situation: not on orchestrator but needed a workaround for a logging.