18 total views
In this article, based on our experience we are sharing our knowledge on RPA Best Practices. Which will help you to understand about RPA Coding Standard and Best practices which every RPA Developer should follow while developing the BOT. It helps in improving the quality of the overall software system and improve maintained of the code.
The information which we are sharing is generic and will be applicable for any of the RPA tools and it follows as mentioned below.
Automation Anywhere Coding Standard
UiPath Coding standard
Blue Prism Coding Standard
Power Automate Coding Standard
You can also visit our YouTube Channel EasyWay2Learn to know more about RPA Training and also you can see our Training video on RPA Best Practices.
Lets understand the following points:
What are RPA best practices?
Split Task into different sub tasks
The task should not be more than 500 line otherwise it will take long time understand the code in case if any changes or debug needs to be perform. Make sure your creating Sub Task and integrating with Main Task. For example -Sub Task for reading Configuration file, Sub Task for Login to application, Sub Task for Folder Creation etc.
Use Configuration File
Make sure you are creating and using data from Configuration file to avoid any changes in the code once Bot moved into Production environment. Your Configuration file should contain all the information which may change in future. Your configuration file should contain following information as mentioned below.
- Bot Exception scenario
- Folder structure with share drive path
- Application Name, Application Path
- Debug Mode – Keep debug flag to enable to disable message boxes
- Email Address
- Email Subject
Click Here To Download Sample xml Configuration File.
Proper naming convention should be there
The naming convention is very important for variable and tasks to simplify the large projects to easy maintenance. Make sure while creating Sub Task or Main Task or variables you’re putting proper name. Your task and variable names should be properly define as mentioned below.
Process Name_Task Name_version – EasyWays2Learn_MasterTask_v01
Variable Name – strCustomerName
Comment and Log
The advantage of putting proper comment and Log to understand the flow of the developed code without opening every commands present in the task.All comment and log should be written properly and should be grammatical correct to understand clearly. Log should be add wherever any action happening to track the information and also should have time stamp to understand when the task started and ended.
- Create comment Box using slashes, asterisks or hash symbol
- Use one like comment to explain assumption, know issue or logical information
- Make comment meaningful to understand clearly
Should not keep anything hard-coded in the code
Make sure you’re not keeping any hard-coded information in the code or variables and reading from configuration file to avoid any code changes in the future. Also do not keep any sensitive or client data into code, variables or in configuration file at any cost instead keep securely. Keep in Credentials locker or encrypted mode to avoid any security threads.
Proper Error Handling Mechanism
Proper implementation of Error Handling allow Automation Task to recover from any type of error that could be thrown during Bot executions.If the error handling is not able to recover then proper notification or screenshots or log should be updated pr sent via mail to required person or team to take further actions.Every task should be updated with error handling command with default action to close all the applications in case if the task is stopping due to any error.If you implement this step into your automation it means particular system would be ready for next run without any issue.Error information should be pass from sub task to main task to confirm whether task is going continue or stop due to particular error.
While creating any common tasks make sure you’re creating as reusable components so other developers or in other project this can be used to save time.Example-Common tasks like Login to application, Creating Folder Structure, Read Configuration file should be use by other developers or other process after making minimum changes within the organisations.
You can also read our other Post on RPA..!
1 thought on “RPA Coding Standards and RPA Best Practices”
Itís difficult to find knowledgeable people in this particular subject, however, you seem like you know what youíre talking about! Thanks