A360 Coding Standards and Guidelines

A360 Coding Standards and Guidelines

In this post, we have listed some of the Automation Anywhere A360 coding standards and guidelines for bot development on the A360 RPA cloud environment.

When developing automation bots using Automation Anywhere A360, it is important to follow coding standards and guidelines to ensure consistency, readability, and maintainability of your code.

A360 Coding Standards and Guidelines

We are discussing A360 coding standards and guidelines from the bot development aspect.

Naming Conventions

Follow these naming conventions while building a bot in A360:

  • Use descriptive and meaningful names for variables, bots, sub-bots, and files.
  • Use camelCase or PascalCase for naming variables (for e.g. if your variable is of type string then sEmployeeName).
  • Use uppercase for constant values (e.g., MAX_ATTEMPTS).

Variable naming convention as per the variable types

Sr.No.Variable TypeInitialsExample
1anyaaDynamicResults
2StringssEmployeeName
3NumbernnEmployeeId
4DatetimedtdtDueDate
5BooleanbbIsLoggedIn
6FileffEmployeeDetails
7WindowwwCelonisLoginScreen
8CredentialccMyCredentials
9ListlstlstDepartments
10DictionarydictdictConfigValues
11RecordrrCurrentRow
12TablettCustomerDetails
13FormfrmfrmEmployeeOnboarding
14SessionsessesCurrentUser

Comments

  • Include comments to explain the purpose, logic, and any important details of your code.
  • Comment on complex or critical sections of code for better understanding.
  • Use inline comments sparingly and only when necessary.

Indentation and Formatting

  • Use Step package and Step actions for better readability, and format your code consistently.
  • Step containerizes or groups various actions together.

Error Handling

  • Implement proper error handling to gracefully handle exceptions and errors.
  • Include appropriate error messages and log them for debugging purposes.
  • Use the Error handler package for handling runtime exceptions.
  • Use try-catch blocks to handle exceptions and prevent unexpected bot failures.

Reusability

Break down complex tasks into reusable components or sub-bots for better maintainability.

  • Avoid duplicating code and use helper bots or loops instead.
  • Encapsulate repetitive tasks into reusable bot snippets.

Variable Usage

  • Use meaningful variable names that accurately represent their purpose.
  • Avoid using single-character variable names except for loop counters.
  • Initialize variables with appropriate default values.
  • Remove all the unused variables.

Modularity

  • Divide your bot into smaller modules or tasks to improve maintainability.
  • Each module should have a clear purpose and perform a specific task.
  • Minimize dependencies between modules to enhance reusability.

Exception Handling

  • Implement error-handling mechanisms to handle expected and unexpected exceptions.
  • Log errors and exceptions for troubleshooting and debugging.
  • Include appropriate error messages and handle exceptions gracefully.

Testing and Validation

  • Test your bots thoroughly on different scenarios to ensure accuracy and reliability.
  • Validate input data and handle edge cases appropriately.
  • Use logging or reporting mechanisms to track the bot’s execution and identify issues.

Version Control

  • Use a version control system (e.g., Git) to manage your code and track changes.
  • Commit and push your code regularly to keep a record of changes and enable collaboration.
  • Use meaningful commit messages to describe the purpose of each change.

Conclusion

Remember, these guidelines are not exhaustive, and you may need to adapt them to suit your specific project requirements. Following these coding standards will help improve the quality and maintainability of your Automation Anywhere A360 bots.

Hope that you learned something new and will be able to implement and follow these A360 Coding Standards and Guidelines if not following already.

Happy Automation 🤖

Share with your friends:

Leave a Reply

Scroll to Top