RPA Coding Standards and RPA Best Practices


RPA Coding Standards and RPA Best Practices

Based on our experience, we are imparting our knowledge about RPA Best Practises in this blog. which will assist you in comprehending the RPA Coding Standards and Best Practises that each RPA Developer should adhere to when creating BOTs. It aids in enhancing the overall software system’s quality and the code’s maintenance. The information we are providing is general in nature and will apply to all RPA tools, as seen in the list below.

  • Automation Anywhere Coding Standard
  • UiPath Coding standard
  • Blue Prism Coding Standard
  • Power Automate Coding Standard

What are RPA best practices?

Split Task into different sub tasks

Write modular code: Break your code into smaller, more manageable modules that can be reused in other parts of the project. This will make it easier to maintain and update the code in the future.

Use Configuration File

To prevent any code modifications when the bot is transferred into the production environment, make sure you are creating and using data from the configuration file. All the information that might change in the future should be in your configuration file. The information listed below should be in your configuration file.

  • 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

Follow a standardized naming Convention

Use a standardized naming convention for variables, functions, and objects to make your code more readable and maintainable.

Example – Process Name_Task Name_version – EasyWays2Learn_MasterTask_v01

EasyWays2Learn_SAPLoginTask_v01

Variable Name – strCustomerName

Proper use of Comment and Logs

The benefit of adding adequate comment and log entries is that they make it easier to understand the flow of the created code without having to open every command in the task. To ensure clarity, every comment and log should be correctly formatted and grammatically sound. To keep track of information and to identify when a task began and concluded, a log should be added wherever action is taking place.

  • 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

To prevent future code modifications, make sure there are no hard-coded variables or information in the code. Instead, read from the configuration file. At all costs, avoid storing sensitive or client data in code, variables, or configuration files; instead, preserve it safely. To prevent any security threads, keep in encrypted or credential locker mode.

Implement Proper Error Handling Mechanism

When error handling is implemented correctly, automation tasks can bounce back from any kind of error that might occur while a bot is being executed. The appropriate notification, screenshots, or logs should be updated or emailed to the necessary person or team to take additional action if the error handling is unable to recover. Every task needs to be updated with an exception handling command that, by default, closes all open programmes when the task encounters an error. If you include this step in your automation, the specific system will be fault-free and ready for the subsequent run. To determine whether the main job will continue or stop due to an error, error information should be passed from the subtask to the main task.

No comment

Leave a Reply

Your email address will not be published. Required fields are marked *