SlideShare a Scribd company logo
1 of 25
Development
Best Practices
Final session on UiPath development best practices
which need to be followed during a process
automation journey
2
Agenda
01 Why UiPath Best Practices Matter?
02 Naming Conventions
03 Error Handling
04 Reusability
05 Workflow Design
06 Logging
07 Configurations
08 Security
09 UI Automation Best Practices
10 Some General Tips and Tricks
11 Q&A
12 Quiz
3
Why UiPath Best Practices Matter?
• Quality: Following UiPath best practices can help improve the quality of your workflows. By using consistent naming
conventions, modular design, and error handling, you can create workflows that are easier to understand, maintain,
and scale.
• Maintainability: Best practices can also make workflows easier to maintain over time. By using modular design,
commenting your code, and following consistent naming conventions, you can make it easier for other developers to
understand your code and make updates as needed.
• Scalability: Best practices can also make workflows easier to scale. By using modular design and reusability, you
can create workflows that can be easily modified and adapted for different use cases without having to rewrite the
entire workflow.
• Efficiency: Following UiPath best practices can also help improve the efficiency of your workflows. By optimizing
selectors, reducing the number of activities used, and avoiding unnecessary delays, you can create workflows that
run faster and use fewer resources.
• Consistency: Best practices can help ensure consistency across your workflows. By using consistent naming
conventions, design patterns, and error handling, you can create workflows that are easier for other developers to
understand and work with.
• Compliance: Following best practices can also help ensure compliance with security and regulatory requirements.
By encrypting sensitive data, using secure credentials, and limiting access to workflows, you can help protect your
organization's data and ensure compliance with relevant regulations.
4
Naming Conventions – Why it is important?
• Consistency: Standard naming conventions ensure consistency throughout the project(s), making it easier for
developers to understand and work with each other's code.
• Maintainability: Meaningful names for workflow files, activities, arguments, and variables make it easier to
maintain the project(s) over time.
• Readability: A consistent naming convention improves the readability of the code, making it easier to
understand and troubleshoot.
• Management: A good naming strategy for environments, assets, and queues makes management in
Orchestrator easier.
Overall, standard naming conventions help to improve the quality of the code and make it easier to manage and
maintain UiPath projects.
5
Naming Conventions - Variables
• Upper Camel Case (PascalCase) should be used for variables with
compound words, no other characters between the words, and each
word starting with a capital letter.
• One variable should be used for one purpose only, and global
variables should be avoided to minimize their scope.
• Variables should be kept in the innermost scope to reduce clutter in
the Variables panel and show only relevant options in autocomplete.
• Meaningful names should always be used for variables that fully and
accurately describe the entity they represent, and words should be
used to state what the variable represents.
• Lengthy variable names should be avoided and if the variable
name exceeds 20 characters, longer words can be abbreviated.
Shorter meaningful variable names can be used when using a local
scope, such as in a Foreach activity with variable names like index,
file, or row.
• Boolean variables should be constructed with prefixes - ‘Is’ or ‘Has’
followed by the name which should be meaningful like –
IsLoginButtonExists. Negative names like NotExists should be
avoided.
• Data table variable names should have the prefix or suffix Dt, like
TransactionDetailsDt or Dt_SAPTable.
6
Naming Conventions - Arguments
• All arguments should be defined in Upper Camel Case with a prefix stating the argument type, for example
in_DefaultTimeout, in_FileName, out_TextResult, io_RetryNumber.
• Each argument should have prefix depending on the direction: in, out, io followed by the underscore character
("_"). Examples: in_Config, out_InvoiceNumber, io_RetryNumber.
• You can use default values for arguments for testing individual workflow files. Ensure to delete the default values
for arguments inside the workflow files in the project before publishing the project.
• Lengthy argument names should be avoided. In case of lengthy argument names , longer words can be
abbreviated.
• For readability and maintenance purposes, avoid having too many arguments for a single workflow file / reusable
component.
7
Naming Conventions - Activities
• It is recommended to rename all activities name in a project and not to leave the default name for activities.
• Ensure to rename all activities in a project, including Log Message, Assign, If, and Sequence, to improve readability
and facilitate error handling.
• Activity names should describe the action taken, such as - Click ‘Login' Button or Type Into ‘Account Number’.
• Properly naming each activity is advisable as it helps to easily identify the source of an exception if an activity
throws one.
8
Naming Conventions – Workflow Files
• Use Upper Camel Case naming convention for workflows to improve readability.
• Workflow files should be prefixed with the application name and should also contain a verb to indicate the task
it is performing. For example, SAP_Login.xaml or SAP_SearchTransactions.xaml. when working with SAP.
• All workflow files belonging to the same application or system should be stored in one folder under the project root
folder.
• While creating a test workflow, please use the prefix “Test_” for a test workflow file and all these test workflow files
should be placed in the Test_Framework folder.
9
Error Handling – Business Rule Exceptions
Automation Error can be of 2 types –
 Business Rule Exceptions or Expected exceptions
 System or Application Exceptions or the Unexpected exceptions
 Business Rule Exceptions (BRE) –
 Always related to process data and business logic
 Occurs when some parts of the automation does not follow
the expected route
 Best Practices for Business Rule Exceptions –
 Meaningful messages should be passed as Business
Rule Exception. For Example – New
BusinessRuleException( "The sum of transaction items,
"+ TransactionSum + ", exceeds the maximum allowed
value of "+ManualTransactionThreshold)
 It is NOT recommended to retry a transaction in case of
any Business Rule Exception.
 Appropriate Log Message activities and Throw activities
should be used to log the business rule exceptions with
the correct exception message.
10
Error Handling – System or Application Exceptions
 Application Exceptions –
 Related to applications that robot interacts with. It can be due
to application stops responding or No internet connection.
 Occurs when automation fails unexpectedly.
 Best Practices for Application Exceptions –
 Identify the activities which might fail with system
exceptions and wrap them inside a Try/Catch activity to
catch these kind of errors.
 Appropriate Log Message activities should be used to
log the exception message with the correct exception
message.
 Set Transaction Status activity should be set to
ApplicationException and the Auto Retry option in the
Create Queue page should be set to Yes when the
queue is created – this will ensure that the queue item
will get retried.
 If you do not use Queues, ensure you have a logic to
auto-retry the failed transactions.
11
Error Handling – General tips for exception handling
 Proper logging levels should be used in Log Message activities in
case of exceptions.
 Retry scope activity to be used to try a block for a predefined
number of times in case there are any exceptions, or a particular
condition is not met.
 Retry Scope will throw an exception if the retry number is exceeded.
Therefore, it should be placed in a Try Catch, with a proper Log
Message in the Catch section.
 Global Exception Handler should be used to retry failed activities. It
can be created from the project panel.
12
Reusability
 Design workflows to be modular and self-contained, with clear inputs and outputs that can be easily configured for
different use cases.
 While designing the library components, it is always best practice to keep the business logic separate from Library
components. For example – In the below example, "Change Customer Info" should not be invoked from within "Get
Customer Info" - as this will make it more difficult to test, handle exceptions and reuse.
 Use descriptive and meaningful names for workflows, activities, and variables to make it easier for others to understand
and reuse them.
 Use the UiPath Library feature to store and manage reusable workflows and components, making it easier to share them
across the organization.
 Test reusable workflows thoroughly to ensure they work as expected in different scenarios and use cases.
 It is recommended to have a library for every application.
13
Workflow Design – Sequences Vs Flowcharts
 Choose the right layout type - Flowcharts or Sequences - for your workflow to make it easier to understand and maintain.
 Sequences :
 Sequences are best suited for simple scenarios where activities follow each other in a linear fashion, such as UI
automation tasks.
 Lengthy sequences should be avoided as they can become difficult to understand, debug, and maintain over time.
 Instead of building lengthy sequences, aim to split the logic into atomic workflows containing no more than 15 to 20
activities.
 Each workflow should contain only one piece of logic to avoid mixing different types of logic in the same file. For
example, instead of combining navigation, file downloading, and data filtering in the same workflow, build separate
workflows for each atomic piece of logic.
 Flowcharts :
 Flowcharts are more flexible than sequences and are best suited for workflows that involve multiple decisions.
 Sequences of steps should be grouped into workflows and invoked from the flowchart to improve readability and
maintainability.
 The flowchart should be designed to be similar to the TO BE diagram in the PDD for even better readability.
 By using flowcharts in the right way, workflows can be designed to be more flexible, easier to understand, and
more maintainable over time.
14
Workflow Design – Best Practices
 Avoid using nested IF conditions as they can make the workflow
hard to read and understand.
 If you have more than two levels in the nested IF condition,
consider using a Flowchart or breaking the conditions into
multiple conditional statements on the same level.
 Avoid using nested Flowcharts as they can make the workflow
hard to read and manage.
 Use a Sequence when using UI Automation as the actions get
executed sequentially, making it easier to understand and
maintain.
 Avoid overloading a workflow file with too many actions; instead,
break it into multiple workflows. Break the workflow into subtasks
or subprocesses to improve readability and maintainability.
 Use separate workflow files for subprocesses and use Invoke
Workflow activities to invoke them from a central control workflow
when necessary.
By following these best practices, workflows can be designed to be
more modular, easier to understand, and less prone to errors and
bugs.
15
Logging – Best Practices
 Log Message activities should be used to trace a running process
for supervising, diagnosing and debugging a process. Messages
should provide all relevant information to accurately identify a
situation, including transaction ID and state.
 As a best practice, logging should be used:
 at the beginning and the end of every workflow (Log level =
Information)
 each time an exception is caught in a Catch block (Log level
= Error);
 each time a Business Rule Exception is thrown (Log Level =
Error);
 when data is read from external sources (for example, log a
message at Information level when an Excel file is read) (Log
Level = Information);
 in Parallel or Pick activities, log messages on every branch,
in order to trace the branch taken (Log Level = Information);
 in If/Flowchart Decision/Switch/Flow Switch activities
16
Configurations – Best Practices
 Different types of configurations need to be stored differently in UiPath projects –
 Configurations with values that never change, such as static selectors or application labels, should be
hardcoded in the workflows.
 Configurations that are unlikely to change but used in multiple places or important settings not meant
to be changed by anyone else except the development team should be stored in a config file for
extensibility, reusability, and readability. Examples include - file or folder paths
 Configurations that are likely to change from one environment to another, such as application paths or
queue names, should be stored in Orchestrator assets to allow values to be changed without modifying
the code.
 Runtime settings should be set during runtime using Orchestrator assets or queues for unattended
robot and input dialogs for attended robots.
 Configurations with different values for different robots should use Orchestrator assets with per-
robot values. For example –Storing different user login credentials for the same application for different
processes
 The final solution should be extensible to allow changes in input data without developer intervention.
 Configuration files can be stored in Excel or JSON files or even as assets in Orchestrator.
By following these best practices, workflows can be designed to be more modular, easier to understand
and maintain, and less prone to errors and bugs.
17
Security – Storing of Credentials
 Application Credentials should not be stored inside workflow files or config files in plain text.
 Credentials should be stored as Orchestrator Credential Assets either in Orchestrator Assets
or Windows Credential Store.
 Following are the ways in which credentials should be stored –
 Orchestrator Credential Assets (Most Recommended)
 If Orchestrator is not available, Windows Credential Store is the next best option.
 To fetch the credentials from Orchestrator Assets, Get Credential activity should be used
which returns the credentials as SecureString datatype and it should be kept confidential.
 To fetch the credentials from Windows Credential Store, Get Secure Credential activity should
be used
 The scope of the credential variable returned through these activities should always be limited
to where it’s needed.
18
Using Annotations/Comments
 Every workflow should have annotations at the top describing the purpose of that workflow. It
should contain the following sections –
 Description of the task being performed
 Input Arguments and their data type
 Output Arguments and their data type
 Pre-Conditions describing the expected state before starting the steps.
 Post-Conditions describing the expected state after completing the steps.
Courtesy : https://www.c-sharpcorner.com/article/uipath-rpa-design-best-practices/
19
Using Annotations/Comments (contd..)
 Comments activity should be used where necessary to explain the details of the process
steps.
 Annotations can also be used for variables and arguments describing their purpose and usage
within the workflow. You can also add annotations for variables through the variables panel
and for arguments through the arguments panel.
20
Ui Automation Best Practices
 Avoid Delays in workflow :
 Avoid using any hardcoded values in the workflow files unless it is specifically required for the workflow to
run.
 All timeouts should be kept in the config file.
 Avoid using Delay activity in a workflow where the application takes time to respond.
 In scenarios where an application takes time to respond to robot interactions, following activities should be
used to check the state of application before proceeding with further steps –
 ElementExists, ImageExists, Text Exists, OCR Text Exists
 FindElement, Find Image, Find Text
 WaitElementVanish, WaitImageVanish
 Try to perform UI Automations in Background :
 For scenarios where an automation is intended to share the desktop with human user, all UI Interactions
must happen in background. Following strategies help the automation to run in background meaning
automation will work with UI objects even when the window is minimized –
 Use the SimulateType, SimulateClick and SendWindowMessages options for navigation and data
entry via the Click and TypeInto activities
 Use the SetText, Check and SelectItem activities for background data entry
 GetText, GetFullText and WebScraping are the output activities that run in the background
 Use ElementExists to verify application state
21
Ui Automation Best Practices (contd..)
 Keep the Selector as dynamic and steady as possible :
 Recommended to use attributes which are steady and meaningful.
 Remove all attributes which are having all wildcard (e.g. name=’*’) since it would not contribute to
restricting the search for the element.
 Avoid using idx parameter in a selector of any element as it is prone to change in future.
 Use wildcards to make the selector dynamic. For example, if the title of a window is represented by
title='Calendar July 30, 2023', the selector will not work if the date changes.
 Use dynamic selector for scenarios where you need to match an element based on runtime values. For
example, using the same selector, all of the data in a table can be identified, using the column and the row
variables.
22
Some General Tips and Tricks
 For scenarios where robot needs to perform certain steps iteratively for set of
transactions in an application – Launching of application and login of
application should be performed only once outside the for each loop.
 Once the entire process is complete for all the transactions, make sure you
close the target applications (browsers, apps) after the robots interact with
them.
 For Excel automation –
 Always choose Workbook activities instead of Excel Scope, since they
do not require Excel to be installed on the machine.
 Excel Scope might be more helpful in certain cases as it provides more
functionalities.
 If Excel reporting is required, avoid updating it after each transaction and
choose to have a separate process to gather the data at the end of the
process and update the excel report.
 Don’t overuse Try-Catch activity for error catching –
 In case of Data table filtering operation in an assign activity, the activity
will throw and exception in case the table is empty. Instead of putting
this assign activity in Try block, it can be checked by using a simple If
condition.
 In case of UI automations, instead of performing all operations in a Try
block, it’s a good practice to check availability of target elements using
Element Exists, Find Element, Check App State etc.
23
Some General Tips and Tricks (contd..)
 Remove unused dependencies from the through the Dependency Manager.
 Clean up all the unused variables from the solution using the Remove Unused Variables option.
 Use the Workflow Analyzer to build your design rules and standards to address all the best
practices. The Workflow Analyzer can be accessed from the Design ribbon in UiPath Studio.
Workflow Analyzer consists of multiple rules which you can configure according to your best
practices followed.
24
Quiz
1. Go to https://www.menti.com/
2. Type the code : 4831 0772
OR
Scan the QR code below :
25
Q&A

More Related Content

What's hot

Unlock the Power of UiPath AI Center API
Unlock the Power of UiPath AI Center APIUnlock the Power of UiPath AI Center API
Unlock the Power of UiPath AI Center APIDianaGray10
 
UiPath Automation Cloud - Best Practises session1.pptx
UiPath Automation Cloud - Best Practises session1.pptxUiPath Automation Cloud - Best Practises session1.pptx
UiPath Automation Cloud - Best Practises session1.pptxRohit Radhakrishnan
 
RPA Interview Questions and Answers | UiPath Interview Questions and Answers ...
RPA Interview Questions and Answers | UiPath Interview Questions and Answers ...RPA Interview Questions and Answers | UiPath Interview Questions and Answers ...
RPA Interview Questions and Answers | UiPath Interview Questions and Answers ...Edureka!
 
Ui path online training ppt
Ui path online training pptUi path online training ppt
Ui path online training pptThenmozhiC
 
RPA Developer Kickstarter | Day 3: UI Automation and UiPath Selectors
RPA Developer Kickstarter | Day 3: UI Automation and UiPath SelectorsRPA Developer Kickstarter | Day 3: UI Automation and UiPath Selectors
RPA Developer Kickstarter | Day 3: UI Automation and UiPath SelectorsRohit Radhakrishnan
 
UiPath Automation Cloud Robots - Best Practises session 2.pptx
UiPath Automation Cloud Robots - Best Practises session 2.pptxUiPath Automation Cloud Robots - Best Practises session 2.pptx
UiPath Automation Cloud Robots - Best Practises session 2.pptxRohit Radhakrishnan
 
UiPath Community Event - Build more mature automations with Unattended Robots
UiPath Community Event - Build more mature automations with Unattended RobotsUiPath Community Event - Build more mature automations with Unattended Robots
UiPath Community Event - Build more mature automations with Unattended RobotsTomaszGaczynski
 
UiPath Excel Automation | UiPath Excel Activities | UiPath Training Essential...
UiPath Excel Automation | UiPath Excel Activities | UiPath Training Essential...UiPath Excel Automation | UiPath Excel Activities | UiPath Training Essential...
UiPath Excel Automation | UiPath Excel Activities | UiPath Training Essential...Edureka!
 
RPA Developer Kickstarter Day 11 Best Practices and RPA Lifecycle.pdf
RPA Developer Kickstarter Day 11 Best Practices and RPA Lifecycle.pdfRPA Developer Kickstarter Day 11 Best Practices and RPA Lifecycle.pdf
RPA Developer Kickstarter Day 11 Best Practices and RPA Lifecycle.pdfRohit Radhakrishnan
 
Introduction to UiPath licensing model
Introduction to UiPath licensing modelIntroduction to UiPath licensing model
Introduction to UiPath licensing modelVibhor Shrivastava
 
Introduction To UiPath Studio | Edureka
Introduction To UiPath Studio | EdurekaIntroduction To UiPath Studio | Edureka
Introduction To UiPath Studio | EdurekaEdureka!
 
UiPath 23.4 Product Release Updates
UiPath 23.4 Product Release UpdatesUiPath 23.4 Product Release Updates
UiPath 23.4 Product Release UpdatesDianaGray10
 
Introduction To UiPath | RPA Tutorial For Beginners | RPA Training using Uipa...
Introduction To UiPath | RPA Tutorial For Beginners | RPA Training using Uipa...Introduction To UiPath | RPA Tutorial For Beginners | RPA Training using Uipa...
Introduction To UiPath | RPA Tutorial For Beginners | RPA Training using Uipa...Edureka!
 
UiPath Email Automation | UiPath Tutorial | RPA Training Using UiPath | Edureka
UiPath Email Automation | UiPath Tutorial | RPA Training Using UiPath | EdurekaUiPath Email Automation | UiPath Tutorial | RPA Training Using UiPath | Edureka
UiPath Email Automation | UiPath Tutorial | RPA Training Using UiPath | EdurekaEdureka!
 
What is Robotic Process Automation?
What is Robotic Process Automation?What is Robotic Process Automation?
What is Robotic Process Automation?Chris Zechmeister
 
UiPath Test Suite Overview
UiPath Test Suite OverviewUiPath Test Suite Overview
UiPath Test Suite OverviewErik Leaseburg
 
UiPath Community Event - UiPath Action Center and UiPath Apps - human in the ...
UiPath Community Event - UiPath Action Center and UiPath Apps - human in the ...UiPath Community Event - UiPath Action Center and UiPath Apps - human in the ...
UiPath Community Event - UiPath Action Center and UiPath Apps - human in the ...TomaszGaczynski
 
Automation Vidyalaya - Introduction to RPA & UiPath.pptx
Automation Vidyalaya - Introduction to RPA & UiPath.pptxAutomation Vidyalaya - Introduction to RPA & UiPath.pptx
Automation Vidyalaya - Introduction to RPA & UiPath.pptxApurbaSamanta9
 

What's hot (20)

Unlock the Power of UiPath AI Center API
Unlock the Power of UiPath AI Center APIUnlock the Power of UiPath AI Center API
Unlock the Power of UiPath AI Center API
 
UiPath Automation Cloud - Best Practises session1.pptx
UiPath Automation Cloud - Best Practises session1.pptxUiPath Automation Cloud - Best Practises session1.pptx
UiPath Automation Cloud - Best Practises session1.pptx
 
RPA Interview Questions and Answers | UiPath Interview Questions and Answers ...
RPA Interview Questions and Answers | UiPath Interview Questions and Answers ...RPA Interview Questions and Answers | UiPath Interview Questions and Answers ...
RPA Interview Questions and Answers | UiPath Interview Questions and Answers ...
 
Ui path online training ppt
Ui path online training pptUi path online training ppt
Ui path online training ppt
 
RPA Developer Kickstarter | Day 3: UI Automation and UiPath Selectors
RPA Developer Kickstarter | Day 3: UI Automation and UiPath SelectorsRPA Developer Kickstarter | Day 3: UI Automation and UiPath Selectors
RPA Developer Kickstarter | Day 3: UI Automation and UiPath Selectors
 
UiPath Automation Cloud Robots - Best Practises session 2.pptx
UiPath Automation Cloud Robots - Best Practises session 2.pptxUiPath Automation Cloud Robots - Best Practises session 2.pptx
UiPath Automation Cloud Robots - Best Practises session 2.pptx
 
UiPath Community Event - Build more mature automations with Unattended Robots
UiPath Community Event - Build more mature automations with Unattended RobotsUiPath Community Event - Build more mature automations with Unattended Robots
UiPath Community Event - Build more mature automations with Unattended Robots
 
UiPath Excel Automation | UiPath Excel Activities | UiPath Training Essential...
UiPath Excel Automation | UiPath Excel Activities | UiPath Training Essential...UiPath Excel Automation | UiPath Excel Activities | UiPath Training Essential...
UiPath Excel Automation | UiPath Excel Activities | UiPath Training Essential...
 
RPA Developer Kickstarter Day 11 Best Practices and RPA Lifecycle.pdf
RPA Developer Kickstarter Day 11 Best Practices and RPA Lifecycle.pdfRPA Developer Kickstarter Day 11 Best Practices and RPA Lifecycle.pdf
RPA Developer Kickstarter Day 11 Best Practices and RPA Lifecycle.pdf
 
Introduction to UiPath licensing model
Introduction to UiPath licensing modelIntroduction to UiPath licensing model
Introduction to UiPath licensing model
 
Introduction To UiPath Studio | Edureka
Introduction To UiPath Studio | EdurekaIntroduction To UiPath Studio | Edureka
Introduction To UiPath Studio | Edureka
 
RPA Uipath Presentation.pptx
RPA Uipath Presentation.pptxRPA Uipath Presentation.pptx
RPA Uipath Presentation.pptx
 
UiPath 23.4 Product Release Updates
UiPath 23.4 Product Release UpdatesUiPath 23.4 Product Release Updates
UiPath 23.4 Product Release Updates
 
Introduction To UiPath | RPA Tutorial For Beginners | RPA Training using Uipa...
Introduction To UiPath | RPA Tutorial For Beginners | RPA Training using Uipa...Introduction To UiPath | RPA Tutorial For Beginners | RPA Training using Uipa...
Introduction To UiPath | RPA Tutorial For Beginners | RPA Training using Uipa...
 
UiPath Email Automation | UiPath Tutorial | RPA Training Using UiPath | Edureka
UiPath Email Automation | UiPath Tutorial | RPA Training Using UiPath | EdurekaUiPath Email Automation | UiPath Tutorial | RPA Training Using UiPath | Edureka
UiPath Email Automation | UiPath Tutorial | RPA Training Using UiPath | Edureka
 
What is Robotic Process Automation?
What is Robotic Process Automation?What is Robotic Process Automation?
What is Robotic Process Automation?
 
UiPath Test Suite Overview
UiPath Test Suite OverviewUiPath Test Suite Overview
UiPath Test Suite Overview
 
UiPath Community Event - UiPath Action Center and UiPath Apps - human in the ...
UiPath Community Event - UiPath Action Center and UiPath Apps - human in the ...UiPath Community Event - UiPath Action Center and UiPath Apps - human in the ...
UiPath Community Event - UiPath Action Center and UiPath Apps - human in the ...
 
Ui path| RPA
Ui path| RPAUi path| RPA
Ui path| RPA
 
Automation Vidyalaya - Introduction to RPA & UiPath.pptx
Automation Vidyalaya - Introduction to RPA & UiPath.pptxAutomation Vidyalaya - Introduction to RPA & UiPath.pptx
Automation Vidyalaya - Introduction to RPA & UiPath.pptx
 

Similar to UiPath Development Best Practices.pptx

Qtp important frameworks
Qtp important frameworksQtp important frameworks
Qtp important frameworksprs0302
 
Best practice adoption (and lack there of)
Best practice adoption (and lack there of)Best practice adoption (and lack there of)
Best practice adoption (and lack there of)John Pape
 
Introduction To Apache Camel
Introduction To Apache CamelIntroduction To Apache Camel
Introduction To Apache CamelKnoldus Inc.
 
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedJoão Pedro Martins
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready AppsVMware Tanzu
 
Test Automation using UiPath Test Suite - Developer Circle Part-4.pdf
Test Automation using UiPath Test Suite - Developer Circle Part-4.pdfTest Automation using UiPath Test Suite - Developer Circle Part-4.pdf
Test Automation using UiPath Test Suite - Developer Circle Part-4.pdfDiana Gray, MBA
 
Software Test Automation - Best Practices
Software Test Automation - Best PracticesSoftware Test Automation - Best Practices
Software Test Automation - Best PracticesArul Selvan
 
Implementing test scripting Ian McDonald updated (minor changes) 26-04-2013
Implementing test scripting   Ian McDonald updated (minor changes) 26-04-2013Implementing test scripting   Ian McDonald updated (minor changes) 26-04-2013
Implementing test scripting Ian McDonald updated (minor changes) 26-04-2013Ian McDonald
 
Serverless Solutions for developers
Serverless Solutions for developersServerless Solutions for developers
Serverless Solutions for developersJuan Pablo
 
Enhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptxEnhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptxRohit Radhakrishnan
 
Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comIdexcel Technologies
 
Pros and Cons of key test automation frameworks.pdf
Pros and Cons of key test automation frameworks.pdfPros and Cons of key test automation frameworks.pdf
Pros and Cons of key test automation frameworks.pdfkalichargn70th171
 
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...CodeScience
 
Database performance management
Database performance managementDatabase performance management
Database performance managementscottaver
 
Final Automation Testing
Final Automation TestingFinal Automation Testing
Final Automation Testingpriya_trivedi
 

Similar to UiPath Development Best Practices.pptx (20)

Qtp important frameworks
Qtp important frameworksQtp important frameworks
Qtp important frameworks
 
Best practice adoption (and lack there of)
Best practice adoption (and lack there of)Best practice adoption (and lack there of)
Best practice adoption (and lack there of)
 
Spring batch overivew
Spring batch overivewSpring batch overivew
Spring batch overivew
 
Introduction To Apache Camel
Introduction To Apache CamelIntroduction To Apache Camel
Introduction To Apache Camel
 
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Test Automation using UiPath Test Suite - Developer Circle Part-4.pdf
Test Automation using UiPath Test Suite - Developer Circle Part-4.pdfTest Automation using UiPath Test Suite - Developer Circle Part-4.pdf
Test Automation using UiPath Test Suite - Developer Circle Part-4.pdf
 
Software Test Automation - Best Practices
Software Test Automation - Best PracticesSoftware Test Automation - Best Practices
Software Test Automation - Best Practices
 
Implementing test scripting Ian McDonald updated (minor changes) 26-04-2013
Implementing test scripting   Ian McDonald updated (minor changes) 26-04-2013Implementing test scripting   Ian McDonald updated (minor changes) 26-04-2013
Implementing test scripting Ian McDonald updated (minor changes) 26-04-2013
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programming
 
Reusability
ReusabilityReusability
Reusability
 
Lecture 5 reusability
Lecture 5 reusabilityLecture 5 reusability
Lecture 5 reusability
 
Serverless Solutions for developers
Serverless Solutions for developersServerless Solutions for developers
Serverless Solutions for developers
 
Enhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptxEnhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptx
 
Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.com
 
Pros and Cons of key test automation frameworks.pdf
Pros and Cons of key test automation frameworks.pdfPros and Cons of key test automation frameworks.pdf
Pros and Cons of key test automation frameworks.pdf
 
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
 
Database performance management
Database performance managementDatabase performance management
Database performance management
 
Final Automation Testing
Final Automation TestingFinal Automation Testing
Final Automation Testing
 
Functional spec
Functional specFunctional spec
Functional spec
 

More from ApurbaSamanta9

Exception Handling in UiPath.pptx
Exception Handling in UiPath.pptxException Handling in UiPath.pptx
Exception Handling in UiPath.pptxApurbaSamanta9
 
Debugging in UiPath.pptx
Debugging in UiPath.pptxDebugging in UiPath.pptx
Debugging in UiPath.pptxApurbaSamanta9
 
UI Automation with UiPath.pptx
UI Automation with UiPath.pptxUI Automation with UiPath.pptx
UI Automation with UiPath.pptxApurbaSamanta9
 
Introducing Excel Automation.pptx
Introducing Excel Automation.pptxIntroducing Excel Automation.pptx
Introducing Excel Automation.pptxApurbaSamanta9
 
Variables, Arguments & Imports.pptx
Variables, Arguments & Imports.pptxVariables, Arguments & Imports.pptx
Variables, Arguments & Imports.pptxApurbaSamanta9
 
Types of Workflow.pptx
Types of Workflow.pptxTypes of Workflow.pptx
Types of Workflow.pptxApurbaSamanta9
 
Familiarization with UiPath Studio.pptx
Familiarization with UiPath Studio.pptxFamiliarization with UiPath Studio.pptx
Familiarization with UiPath Studio.pptxApurbaSamanta9
 

More from ApurbaSamanta9 (9)

Exception Handling in UiPath.pptx
Exception Handling in UiPath.pptxException Handling in UiPath.pptx
Exception Handling in UiPath.pptx
 
Debugging in UiPath.pptx
Debugging in UiPath.pptxDebugging in UiPath.pptx
Debugging in UiPath.pptx
 
UiPath Logs.pptx
UiPath Logs.pptxUiPath Logs.pptx
UiPath Logs.pptx
 
UI Automation with UiPath.pptx
UI Automation with UiPath.pptxUI Automation with UiPath.pptx
UI Automation with UiPath.pptx
 
Email Automation.pptx
Email Automation.pptxEmail Automation.pptx
Email Automation.pptx
 
Introducing Excel Automation.pptx
Introducing Excel Automation.pptxIntroducing Excel Automation.pptx
Introducing Excel Automation.pptx
 
Variables, Arguments & Imports.pptx
Variables, Arguments & Imports.pptxVariables, Arguments & Imports.pptx
Variables, Arguments & Imports.pptx
 
Types of Workflow.pptx
Types of Workflow.pptxTypes of Workflow.pptx
Types of Workflow.pptx
 
Familiarization with UiPath Studio.pptx
Familiarization with UiPath Studio.pptxFamiliarization with UiPath Studio.pptx
Familiarization with UiPath Studio.pptx
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 

Recently uploaded (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 

UiPath Development Best Practices.pptx

  • 1. Development Best Practices Final session on UiPath development best practices which need to be followed during a process automation journey
  • 2. 2 Agenda 01 Why UiPath Best Practices Matter? 02 Naming Conventions 03 Error Handling 04 Reusability 05 Workflow Design 06 Logging 07 Configurations 08 Security 09 UI Automation Best Practices 10 Some General Tips and Tricks 11 Q&A 12 Quiz
  • 3. 3 Why UiPath Best Practices Matter? • Quality: Following UiPath best practices can help improve the quality of your workflows. By using consistent naming conventions, modular design, and error handling, you can create workflows that are easier to understand, maintain, and scale. • Maintainability: Best practices can also make workflows easier to maintain over time. By using modular design, commenting your code, and following consistent naming conventions, you can make it easier for other developers to understand your code and make updates as needed. • Scalability: Best practices can also make workflows easier to scale. By using modular design and reusability, you can create workflows that can be easily modified and adapted for different use cases without having to rewrite the entire workflow. • Efficiency: Following UiPath best practices can also help improve the efficiency of your workflows. By optimizing selectors, reducing the number of activities used, and avoiding unnecessary delays, you can create workflows that run faster and use fewer resources. • Consistency: Best practices can help ensure consistency across your workflows. By using consistent naming conventions, design patterns, and error handling, you can create workflows that are easier for other developers to understand and work with. • Compliance: Following best practices can also help ensure compliance with security and regulatory requirements. By encrypting sensitive data, using secure credentials, and limiting access to workflows, you can help protect your organization's data and ensure compliance with relevant regulations.
  • 4. 4 Naming Conventions – Why it is important? • Consistency: Standard naming conventions ensure consistency throughout the project(s), making it easier for developers to understand and work with each other's code. • Maintainability: Meaningful names for workflow files, activities, arguments, and variables make it easier to maintain the project(s) over time. • Readability: A consistent naming convention improves the readability of the code, making it easier to understand and troubleshoot. • Management: A good naming strategy for environments, assets, and queues makes management in Orchestrator easier. Overall, standard naming conventions help to improve the quality of the code and make it easier to manage and maintain UiPath projects.
  • 5. 5 Naming Conventions - Variables • Upper Camel Case (PascalCase) should be used for variables with compound words, no other characters between the words, and each word starting with a capital letter. • One variable should be used for one purpose only, and global variables should be avoided to minimize their scope. • Variables should be kept in the innermost scope to reduce clutter in the Variables panel and show only relevant options in autocomplete. • Meaningful names should always be used for variables that fully and accurately describe the entity they represent, and words should be used to state what the variable represents. • Lengthy variable names should be avoided and if the variable name exceeds 20 characters, longer words can be abbreviated. Shorter meaningful variable names can be used when using a local scope, such as in a Foreach activity with variable names like index, file, or row. • Boolean variables should be constructed with prefixes - ‘Is’ or ‘Has’ followed by the name which should be meaningful like – IsLoginButtonExists. Negative names like NotExists should be avoided. • Data table variable names should have the prefix or suffix Dt, like TransactionDetailsDt or Dt_SAPTable.
  • 6. 6 Naming Conventions - Arguments • All arguments should be defined in Upper Camel Case with a prefix stating the argument type, for example in_DefaultTimeout, in_FileName, out_TextResult, io_RetryNumber. • Each argument should have prefix depending on the direction: in, out, io followed by the underscore character ("_"). Examples: in_Config, out_InvoiceNumber, io_RetryNumber. • You can use default values for arguments for testing individual workflow files. Ensure to delete the default values for arguments inside the workflow files in the project before publishing the project. • Lengthy argument names should be avoided. In case of lengthy argument names , longer words can be abbreviated. • For readability and maintenance purposes, avoid having too many arguments for a single workflow file / reusable component.
  • 7. 7 Naming Conventions - Activities • It is recommended to rename all activities name in a project and not to leave the default name for activities. • Ensure to rename all activities in a project, including Log Message, Assign, If, and Sequence, to improve readability and facilitate error handling. • Activity names should describe the action taken, such as - Click ‘Login' Button or Type Into ‘Account Number’. • Properly naming each activity is advisable as it helps to easily identify the source of an exception if an activity throws one.
  • 8. 8 Naming Conventions – Workflow Files • Use Upper Camel Case naming convention for workflows to improve readability. • Workflow files should be prefixed with the application name and should also contain a verb to indicate the task it is performing. For example, SAP_Login.xaml or SAP_SearchTransactions.xaml. when working with SAP. • All workflow files belonging to the same application or system should be stored in one folder under the project root folder. • While creating a test workflow, please use the prefix “Test_” for a test workflow file and all these test workflow files should be placed in the Test_Framework folder.
  • 9. 9 Error Handling – Business Rule Exceptions Automation Error can be of 2 types –  Business Rule Exceptions or Expected exceptions  System or Application Exceptions or the Unexpected exceptions  Business Rule Exceptions (BRE) –  Always related to process data and business logic  Occurs when some parts of the automation does not follow the expected route  Best Practices for Business Rule Exceptions –  Meaningful messages should be passed as Business Rule Exception. For Example – New BusinessRuleException( "The sum of transaction items, "+ TransactionSum + ", exceeds the maximum allowed value of "+ManualTransactionThreshold)  It is NOT recommended to retry a transaction in case of any Business Rule Exception.  Appropriate Log Message activities and Throw activities should be used to log the business rule exceptions with the correct exception message.
  • 10. 10 Error Handling – System or Application Exceptions  Application Exceptions –  Related to applications that robot interacts with. It can be due to application stops responding or No internet connection.  Occurs when automation fails unexpectedly.  Best Practices for Application Exceptions –  Identify the activities which might fail with system exceptions and wrap them inside a Try/Catch activity to catch these kind of errors.  Appropriate Log Message activities should be used to log the exception message with the correct exception message.  Set Transaction Status activity should be set to ApplicationException and the Auto Retry option in the Create Queue page should be set to Yes when the queue is created – this will ensure that the queue item will get retried.  If you do not use Queues, ensure you have a logic to auto-retry the failed transactions.
  • 11. 11 Error Handling – General tips for exception handling  Proper logging levels should be used in Log Message activities in case of exceptions.  Retry scope activity to be used to try a block for a predefined number of times in case there are any exceptions, or a particular condition is not met.  Retry Scope will throw an exception if the retry number is exceeded. Therefore, it should be placed in a Try Catch, with a proper Log Message in the Catch section.  Global Exception Handler should be used to retry failed activities. It can be created from the project panel.
  • 12. 12 Reusability  Design workflows to be modular and self-contained, with clear inputs and outputs that can be easily configured for different use cases.  While designing the library components, it is always best practice to keep the business logic separate from Library components. For example – In the below example, "Change Customer Info" should not be invoked from within "Get Customer Info" - as this will make it more difficult to test, handle exceptions and reuse.  Use descriptive and meaningful names for workflows, activities, and variables to make it easier for others to understand and reuse them.  Use the UiPath Library feature to store and manage reusable workflows and components, making it easier to share them across the organization.  Test reusable workflows thoroughly to ensure they work as expected in different scenarios and use cases.  It is recommended to have a library for every application.
  • 13. 13 Workflow Design – Sequences Vs Flowcharts  Choose the right layout type - Flowcharts or Sequences - for your workflow to make it easier to understand and maintain.  Sequences :  Sequences are best suited for simple scenarios where activities follow each other in a linear fashion, such as UI automation tasks.  Lengthy sequences should be avoided as they can become difficult to understand, debug, and maintain over time.  Instead of building lengthy sequences, aim to split the logic into atomic workflows containing no more than 15 to 20 activities.  Each workflow should contain only one piece of logic to avoid mixing different types of logic in the same file. For example, instead of combining navigation, file downloading, and data filtering in the same workflow, build separate workflows for each atomic piece of logic.  Flowcharts :  Flowcharts are more flexible than sequences and are best suited for workflows that involve multiple decisions.  Sequences of steps should be grouped into workflows and invoked from the flowchart to improve readability and maintainability.  The flowchart should be designed to be similar to the TO BE diagram in the PDD for even better readability.  By using flowcharts in the right way, workflows can be designed to be more flexible, easier to understand, and more maintainable over time.
  • 14. 14 Workflow Design – Best Practices  Avoid using nested IF conditions as they can make the workflow hard to read and understand.  If you have more than two levels in the nested IF condition, consider using a Flowchart or breaking the conditions into multiple conditional statements on the same level.  Avoid using nested Flowcharts as they can make the workflow hard to read and manage.  Use a Sequence when using UI Automation as the actions get executed sequentially, making it easier to understand and maintain.  Avoid overloading a workflow file with too many actions; instead, break it into multiple workflows. Break the workflow into subtasks or subprocesses to improve readability and maintainability.  Use separate workflow files for subprocesses and use Invoke Workflow activities to invoke them from a central control workflow when necessary. By following these best practices, workflows can be designed to be more modular, easier to understand, and less prone to errors and bugs.
  • 15. 15 Logging – Best Practices  Log Message activities should be used to trace a running process for supervising, diagnosing and debugging a process. Messages should provide all relevant information to accurately identify a situation, including transaction ID and state.  As a best practice, logging should be used:  at the beginning and the end of every workflow (Log level = Information)  each time an exception is caught in a Catch block (Log level = Error);  each time a Business Rule Exception is thrown (Log Level = Error);  when data is read from external sources (for example, log a message at Information level when an Excel file is read) (Log Level = Information);  in Parallel or Pick activities, log messages on every branch, in order to trace the branch taken (Log Level = Information);  in If/Flowchart Decision/Switch/Flow Switch activities
  • 16. 16 Configurations – Best Practices  Different types of configurations need to be stored differently in UiPath projects –  Configurations with values that never change, such as static selectors or application labels, should be hardcoded in the workflows.  Configurations that are unlikely to change but used in multiple places or important settings not meant to be changed by anyone else except the development team should be stored in a config file for extensibility, reusability, and readability. Examples include - file or folder paths  Configurations that are likely to change from one environment to another, such as application paths or queue names, should be stored in Orchestrator assets to allow values to be changed without modifying the code.  Runtime settings should be set during runtime using Orchestrator assets or queues for unattended robot and input dialogs for attended robots.  Configurations with different values for different robots should use Orchestrator assets with per- robot values. For example –Storing different user login credentials for the same application for different processes  The final solution should be extensible to allow changes in input data without developer intervention.  Configuration files can be stored in Excel or JSON files or even as assets in Orchestrator. By following these best practices, workflows can be designed to be more modular, easier to understand and maintain, and less prone to errors and bugs.
  • 17. 17 Security – Storing of Credentials  Application Credentials should not be stored inside workflow files or config files in plain text.  Credentials should be stored as Orchestrator Credential Assets either in Orchestrator Assets or Windows Credential Store.  Following are the ways in which credentials should be stored –  Orchestrator Credential Assets (Most Recommended)  If Orchestrator is not available, Windows Credential Store is the next best option.  To fetch the credentials from Orchestrator Assets, Get Credential activity should be used which returns the credentials as SecureString datatype and it should be kept confidential.  To fetch the credentials from Windows Credential Store, Get Secure Credential activity should be used  The scope of the credential variable returned through these activities should always be limited to where it’s needed.
  • 18. 18 Using Annotations/Comments  Every workflow should have annotations at the top describing the purpose of that workflow. It should contain the following sections –  Description of the task being performed  Input Arguments and their data type  Output Arguments and their data type  Pre-Conditions describing the expected state before starting the steps.  Post-Conditions describing the expected state after completing the steps. Courtesy : https://www.c-sharpcorner.com/article/uipath-rpa-design-best-practices/
  • 19. 19 Using Annotations/Comments (contd..)  Comments activity should be used where necessary to explain the details of the process steps.  Annotations can also be used for variables and arguments describing their purpose and usage within the workflow. You can also add annotations for variables through the variables panel and for arguments through the arguments panel.
  • 20. 20 Ui Automation Best Practices  Avoid Delays in workflow :  Avoid using any hardcoded values in the workflow files unless it is specifically required for the workflow to run.  All timeouts should be kept in the config file.  Avoid using Delay activity in a workflow where the application takes time to respond.  In scenarios where an application takes time to respond to robot interactions, following activities should be used to check the state of application before proceeding with further steps –  ElementExists, ImageExists, Text Exists, OCR Text Exists  FindElement, Find Image, Find Text  WaitElementVanish, WaitImageVanish  Try to perform UI Automations in Background :  For scenarios where an automation is intended to share the desktop with human user, all UI Interactions must happen in background. Following strategies help the automation to run in background meaning automation will work with UI objects even when the window is minimized –  Use the SimulateType, SimulateClick and SendWindowMessages options for navigation and data entry via the Click and TypeInto activities  Use the SetText, Check and SelectItem activities for background data entry  GetText, GetFullText and WebScraping are the output activities that run in the background  Use ElementExists to verify application state
  • 21. 21 Ui Automation Best Practices (contd..)  Keep the Selector as dynamic and steady as possible :  Recommended to use attributes which are steady and meaningful.  Remove all attributes which are having all wildcard (e.g. name=’*’) since it would not contribute to restricting the search for the element.  Avoid using idx parameter in a selector of any element as it is prone to change in future.  Use wildcards to make the selector dynamic. For example, if the title of a window is represented by title='Calendar July 30, 2023', the selector will not work if the date changes.  Use dynamic selector for scenarios where you need to match an element based on runtime values. For example, using the same selector, all of the data in a table can be identified, using the column and the row variables.
  • 22. 22 Some General Tips and Tricks  For scenarios where robot needs to perform certain steps iteratively for set of transactions in an application – Launching of application and login of application should be performed only once outside the for each loop.  Once the entire process is complete for all the transactions, make sure you close the target applications (browsers, apps) after the robots interact with them.  For Excel automation –  Always choose Workbook activities instead of Excel Scope, since they do not require Excel to be installed on the machine.  Excel Scope might be more helpful in certain cases as it provides more functionalities.  If Excel reporting is required, avoid updating it after each transaction and choose to have a separate process to gather the data at the end of the process and update the excel report.  Don’t overuse Try-Catch activity for error catching –  In case of Data table filtering operation in an assign activity, the activity will throw and exception in case the table is empty. Instead of putting this assign activity in Try block, it can be checked by using a simple If condition.  In case of UI automations, instead of performing all operations in a Try block, it’s a good practice to check availability of target elements using Element Exists, Find Element, Check App State etc.
  • 23. 23 Some General Tips and Tricks (contd..)  Remove unused dependencies from the through the Dependency Manager.  Clean up all the unused variables from the solution using the Remove Unused Variables option.  Use the Workflow Analyzer to build your design rules and standards to address all the best practices. The Workflow Analyzer can be accessed from the Design ribbon in UiPath Studio. Workflow Analyzer consists of multiple rules which you can configure according to your best practices followed.
  • 24. 24 Quiz 1. Go to https://www.menti.com/ 2. Type the code : 4831 0772 OR Scan the QR code below :