UiPath Studio Best Practices:
Organizing your project
Reliable - create solid, robust workflows that can handle errors.
Efficient - create a structure that:
Helps to short down development time.
Helps to reduce errors in production.
Maintainable - create a structure that makes it easy to update when needed.
Extendable - new requirements should be able to be implemented easily.
Choose the right layout
The main workflow works best as a Flowchart or a State Machine.
Business logic works best in Flowcharts as it is easier to visualize.
Consider using ReFramework if you are using Orchestrator-queues.
UI interactions work best as sequences as it does not involve much logic.
If one sees that there is a need for much if-else checks and the like, then one should consider
using a Flowchart.
Avoid nested IF statements, use Flowcharts instead; It gives a tidier flow.
Break up your workflow
Keywords: Extract as Workflow.
Makes it possible to develop and test the various parts separately.
Allows you to reuse workflows.
Makes it easier to cooperate in a team when working on different files (use Invoke Workflow File).
Easiest if you send pure string parameters and not lists and the like (is easier to set default parameters on primitive types like string, int32, etc.).
Exception handling and logging
Put problematic workflows in try / catch blocks.
Implement sequences within the Try / Catch blocks that allow you to restore the workflow.
Use the Retry Scope for fragile parts in the workflow.
Give good, explanatory names to all components (workflows, activities, variables, etc.).
Enter notes and comments where necessary. Annotations are very useful.
Log real-time execution.
Have environmental variables in a separate file.
Close applications, windows and web pages. If you do not, many interactions will have numerous instances of these running, which can eventually crash the machine.
Always try soft-close applications first if the kill process is not used.
When creating very large automations, it can be very easy to forget what every variable does. That is why it is important to have a good naming system in place.
We recommend that you always use descriptive and accurate names, such as userName for a variable that stores the name of a user. This allows you easily identify the information the variable stores.
Finally, we recommend that you write variable names in Camel Case, so that you can read them easier
I hope this help
Please free to reply if you have any tips to help one another and help the community become more lively