Editing Xaml File

The idea is to change the variable names using the xaml file rather than opening through studio. For this purpose i have created a python script through which am doing it.

The variable names are getting changed and also getting reflected in the variables panel inside the stdio but the changes are not reflecting inside the activities. This happens when i try manually as well.

After making the changes either through script or manually, when i open the studio, i get to see the msg as shown in the screenshot. I want to understand the reason for this and how it can be sorted so that my changes to variable names by editing xaml files also reflects inside the activities.

Thanks in advance!

This is standard message and has nothing to do with your XAML file manipulation.

Likely you did not cover all possible variants of variable representation in XAML file in your script.

It could be:
[var1] - single variable
[var1+var2] - two variables in an expression
["www"+var1] - fix text and variable in an expression
["www"+cstr(var1)] - fix text and variable as parameter of function
and likely many more…

Happy reverse engineering :slight_smile:

Cheers

in this case, can you tell me how do i find all the xaml nodes/ XPath where the variable is referenced or used ?

Reverse engineering :slight_smile: or find XAML reference book (if such exists)

Variable could be in (almost) any property of any activity.
So I would

  • focus on patterns (like the four above)
  • simulate any possible variant in a simple process and check result in XAML

Cheers

BTW - you may have a look into “Workflow Inspector” available in Connect

It is UiPath framework for workflow validation.
It contains a “Unused Variables” which is searching XAML files using XPath
To determine “unused” it should be able to find all “used” I guess :slight_smile:

Cheers

2 Likes