Best Practices for designing automation in 'RPA Desktop Design Studio'.Issue Best Practices:1) Image Based Automations: Ensure to use same resolution which is used during Development for UAT and PROD environments. For Unattended automation use the method directly from studio Use the GetResolution component from studio to know the 'Display Resolution' of the machine. https://docs.servicenow.com/bundle/utah-integrate-applications/page/product/rpa-studio/task/use-utilities-screen-getresolution.html Use the ChangeResolution component from studio to set the 'Display Resolution' for the machine https://docs.servicenow.com/bundle/utah-integrate-applications/page/product/rpa-studio/task/use-screen-changeresolution.html For Attended automation use the 'Screen Resolution' option available on RPA Hub https://docs.servicenow.com/bundle/utah-integrate-applications/page/product/rpa-hub/reference/bot-process-form.html2) Use Folders for each application/variables/connector and create activities respective to that application interactions, which helps in easy accessibility. Ex: create folder for "Facebook" application and add all activities related to Facebook app automation and similarly for "LinkedIn" application3) Divide functionality into multiple activities rather than keeping everything in one activity.4) Ensure each out port is connected as applicable. Ex: WaitForCreate False port should be linked to exception handling or retry mechanism as applicable5) Return Success / Failure for each activity by using End Parameters. Success / Failure can be checked before proceeding to next activity 6) Before looping, ensure to check if the loop input object is nothing or not. 7) During looping, ensure not to connect to "END of activity within the Loop and also add Break component if required with in the loop and not outside of loop. 8) Add comment to "Start" for each activity and provide information on what this particular activity is going to perform. 9) Use WaitForCreate or IsCreated before performing some action on Screen / Element to ensure that Screen / Element is created.10) Use Retry mechanism using variables instead of making automation to go on an infinite loop by passing control back to initial component wherever applicable. Ex: If some application is not launched properly / Not navigated to expected screen etc, retry the logic only for few times like 3 - 5 times instead of making automation to loop thru till required screen is found. 11) Use Assets to make configurable instead of hard coding in the automation wherever possible. Ex: For shared drive paths / email addresses etc SharedParameters: https://docs.servicenow.com/bundle/utah-integrate-applications/page/product/rpa-studio/concept/shared-parameters.html ProcessParameters: https://docs.servicenow.com/bundle/utah-integrate-applications/page/product/rpa-studio/concept/process-parameters.html12) Use Try Catch component to handle exceptions properly.13) Ensure to have proper exception flow along with Positive flow.14) During looping, ensure loop gets continued to process next records as per requirements. If automation is unable to process due to some unhandled case / exception, it should be designed in such a way to mark this particular record as exception and continue with next record. Ex: If each record processing is simple and can be designed in single Activity, then use Try Catch component within the loop. If each record is processing is complex and involves multiple activities, then segregate by starting Loop in one activity and processing logic in other activities, so that looping gets continued in case if any activity gets failed where in particular activities don't have Error handler as STOP 15) Ensure system state is same before and after executing the automation. Make sure to close all the applications / excels/ word etc which are opened by automation after execution of automation as well. Ensure proper exception handling to close applications in case of exceptions. 16) While using loops, ensure to validate the conditions and it doesn't go on infinite loop. Not recommended to use the back port connection as it leads to infinite loop and stack overflow exception. 17) Ensure to check the PickWorkItem component output WorkItemID is NullorEmpty before further processing.18) Use PickWorkItem in While Loop for processing all the work items unless if the requirement is to pick a specific work item. PickWorkItem by default the picks the work item in FIFO (First In First Out)19) Application Credentials should not be maintained in Process Parameters / hardcoded in code. Use Application Credentials option to store app credentials. ApplicationCredentials: https://docs.servicenow.com/bundle/utah-integrate-applications/page/product/rpa-hub/task/create-application-credential.html 20) All error messages should have proper meaningful information.21) When using Terminate component make sure to use "Markaserror" property for errors. 22) Use WaitForCreate component and validate the result instead of using "Delay Before execution" property. Naming Conventions to be followed: 1) Use lower camelcase for elements and variables. Ex: For Elements: - textboxes: txtUserName, buttons: btnSubmit, dropdown: ddlCountry, link: lnkSubmit etc For Variables: - Integer type: intCount, String Type: strResult, Boolean: isSuccess, Table: tblResults etc Button – btn Radio Button - rbtn Check box - chk Combo box - cmb Label - lbl List box - lst Text box - txt Windows form - frm 2) Use upper camelcase for screen names along with application short names. Ex: FB_AccountOverview (Account overview screen of Facebook), FB_Settings etc3) Use Capital Letters for Applications names. Ex: FACEBOOK, LINKEDIN etc