Find Specific location of an activity/command in your code based on Activity ID or errorinfo.activityinfo

I would like to be able to look up the specific location of an activity/command in your code based on Activity ID or errorinfo.activityinfo. This will be helpful for finding activities/commands that are named the same like “assign to” or “Log Message” (if the names have not been changed to something unique).

Right now i have exceptionActivityInfo being logged in the global handler; so when an error hits, the very first activity info should be where the error occured at (it will then continue to log activity info for activities outside the initial activity error location until it hits a try/catch).

The problem is i don’t know how to Quickly reference the id or instanceid back in studio to find where the error happened. I can eventually find it based on other exception info; but it would be nice just to use an ID to go directly to the location without having to rename every activity/command to something unique when you are building.

version 2019.10.4

2 Likes

Hi @Jvonarx

Speaking generally - the best practice is to rename all your activities in a way that will help you find them back upon crash.

I will add your idea to our internal tracker though :slight_smile:

1 Like

Hey @Jvonarx

+1 to this idea please :blush:

This idea would assist with universal faster debugging. (I’ve had the same idea for a while :sweat_smile: )

I agree with @loginerror that it is best to rename every activity to something unique but that standard isn’t always abided by other developers (for various reasons) :frowning_face:. This feature should not replace the practice of renaming activities.

This is why your organisation @Jvonarx should create standard development standards and guidelines to avoid this.

In instances where its hard to debug, a unique ID and fast “search and retrieve” method would be ideal :innocent: as revisiting code isn’t always seen as a business priority and without good logging/annotations/notes technical debt increases and decreases the agility of a team. in my opinion, features like this make UiPath a standout RPA product.

I would like to see this implemented into the standard details tab/window within the ‘Jobs’ tab in Orchestrator.

image

Side note: I like to include some logs (particularly ‘trace’ level) when a workflow gets complicated with heavy nesting/heavy logic with future debugging in mind.

Thank you

1 Like

I found the solution! Create a Global Exception Handler, and there you can get all this information via errorInfo.ActivityInfo.Id, error information.ActivityInfo.Name , Error information.ActivityInfo.InstanceId, etc.!
It’s a pity that UiPath support doesn’t know about this information and couldn’t answer!

Can you share an example of the errorInfo.ActivityInfo.Id and Error information.ActivityInfo.InstanceId? I am trying desperately to find the activity causing the error using either of these. My project has many activities with the same name so that errorInfo.ActivityInfo.Name will not help