UiPath Best Practices


  • Use RE Framework to make skeleton of your process
  • 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.

2. 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.

3. 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.).

4. 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 86 for fragile parts in the workflow.

5. Readability

  • 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.

6. Cleanup

  • 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 killing process is not used.

7. Naming conventions

  • When creating very large automation, 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.
  • I 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 to easily identify the information the variable stores.
  • Finally, I recommend that you write variable names in Camel Case so that you can read them easier

Leave a Reply