My xaml file code logic is too huge. Is it a good practice separate into multiple xaml files and use many invoke worklfows in a single xaml file. If yes, apart from readability does it improve performance as well?
Also,
Is it like separate xaml files are only created when that particular xaml has to be reused in code?
It does not improve performance. It makes things more complicated, not less complicated. The proper use of a separate XAML and Invoke Workflow is only for code that is repeated.
Experience is my guide. Why complicate your code, making yourself have to deal with input and output arguments etc? This makes your code MORE complicated, not less complicated, and introduces a black box for future people who have to maintain or update your automation.
If I am writing all my code in one xaml file, its very slow to open . Seeing buffer circle cursor for quite a long time. Does separating into multiple xamls help to solve this as well?
Thanks for your help
I’m not sure if separating into separate XAMLs speeds up Studio load time. It seems logical that it would, though.
However, I have had very simple single XAML automations take a few moments to open in Studio, and I attribute this to opening it across a network I’m connected to via VPN.
I didn’t say UiPath said it. I said even if they DID say it, it’s just an opinion. “Just an opinion” is not a valid reply, we are all just sharing opinions. Do you have something useful to add to this discussion?
Yeah ofcourse it is a good practice and it depends on the process
Say for example if the process is within single window or application then it is good to have in one xaml
But if it involves multiple applications it is good to have separate xaml or group of separate xaml to handle the process in that application
So that if you face any changes in that application like if there is any upgrade in version of that application then it will require few changes to be done
By that time it will easy for you to manage them and you don’t need to search for long time on where to include the changes being a single xaml
And you can also share with your team member if they are also trying to use the same application but with different process
For example login part of sap or any application will be the same inspite of different process
So that login part can be kept in a separate xaml and it can be used by others as well
The number of changes required to fix this is no different whether you use different XAMLs or not.
Simply organize your code into relevant Sequences (ie “Process Page 1” “Process Page 2” etc) and it’s less difficult to find than with separate XAMLs.
This should be a custom activity, not a separate XAML. If you and I both have “login.xaml” in our projects, when you change yours mine doesn’t change.