Getting the name of the current workflow that the bot is running

Hi, is there an activity, VB script or other methods in which we can log the current workflow that the bot is currently executing. I have searched the forums for a solution to this problem and I am aware of the Alphabets package with the custom activity and I have used it before. However one of the current user requirement is to only use UiPath Packages or Microsoft Packages, etc.

So i was wondering if there is any native method to getting the current workflow name.
Thank you.

Hi, yes i have seen that post, but the solution provided for that is to use the Alphabet Workflow Activities. That would not be possible for me in this case. I have been testing out a method though, purposely throw an error in an invoked workflow and then catch that in the main. Then logging the exception.Source, however that doesnt seem to work as it returns “Throw” a the activity instead.

Are there any other solutions?

then im not sure, maybe at the start of each workflow you can write the name of the current xaml in a text file, then when you handle the error just retrieve the current workflow from that text file


Do you need it in exception handling? If so, the following will help you.

We can get workflow name using the following expression.

faultedDetails.GetType().GetProperty("WorkflowFile").GetValue(faultedDetails, Nothing).ToString


Yeah, thats the way i’m currently doing this without the alphabet workflow, but i’m trying to make a more automated way of getting the name of the currently executing xaml file. I’m currently looking at maybe running a vb or c# code snippet that could work maybe.