Tutorial: Building An Automation 360 Package

  • 14 April 2021
  • 2 replies
  • 843 views

Userlevel 6
Badge +9

Tutorial: Building An Automation 360 Package

Automation 360 brings with it the ability for developers to create, publish, and share their own custom packages. For those not familiar with the Automation Anywhere platform, a package is a collection of configurable actions that can be used as the building block of bots. Out of the box, Automation 360 includes hundreds of actions contained within 70+ packages. In addition to those packages which ship with the product, the Automation Anywhere Bot Store makes 50+ additional packages available that are all free to download and use within your Automation 360 control room. Essentially these packages form the tools of the proverbial toolbelt that an RPA developer has at their disposal when building bots. But what if I want to integrate with an application that is native to my organization? Or an application that is not represented in the default package set or via Bot Store? Fortunately, the Automation 360 Package SDK provides the framework for developers to create and test their own custom packages. In the tutorial above, we cover many of the key points of getting started in package development. To supplement those details, we're also including some resources and links below to dig deeper into several of the topics mentioned. (Note: if you're just looking for the solution from the project from the video, scroll to the conclusion section on this page)

Pre-Work: Machine Setup

If you haven't done so already, getting your machine set up with the required installations/files is the first thing to take on. We have a video dedicated just to that topic alone because getting this part right is that important to your success in being able to build and compile your package. In short, you'll need the Java Developer Kit (JDK 11), a Java IDE (we're using IntelliJ IDEA), Gradle 5.x (included with IntelliJ), and the Automation Anywhere Package SDK (we'll be using the .19 version of the SDK for the video above, but any version compatible with your Control Room should work)
     

Package Level Attributes

  1. Package level attributes allow developers to set values that appear at the package level within the Automation 360 Control Room. (Remember: a package is a container of actions, so when we think package level - we should be thinking of just how that collection itself is named/labeled/described)
  2. File: settings.gradle Attribute: rootProject.name
    1. This is the root name for the project. This value appears in the Java IDE as the name of the project, and is also used for the name of the jar file that gets created as a result of building the project.
  3. File: package.template Attribute: name
    1. This is the name of the package - and really only shows up on the Packages page of the Control Room. This is not the name that you see in the actions pane of the bot developer interface.
  4. File: package.template Attribute: label
    1. This is the label for the package - and controls how the package will be displayed/listed in the package list and in the actions pane of the bot development interface. This is how users will find/see your package, so make sure the value you give here is meaningful. Spaces are permitted.
  5. File: package.template Attribute: description
    1. This is the description for your package - which shows up on mouse-over of the package name in the actions pane in the development interface as well as on the packages page.

Annotations

  1. We won't seek to re-invent the wheel here. The documentation portal does an excellent job of explaining some of the SDK annotations.
  2. In short, the session above focuses on the following annotations:
    1. Action Level
      1. @BotCommand - makes the class eligible as an action
      2. @CommandPkg - establishes the GUI label elements for the action
      3. @Execute - serves as the entry point for the action's operations
    2. Input Field Level
      1. @Idx - the index position of the field (each must be unique per action)
      2. @Pkg - UI labels including the field title and description for the input field
      3. @NotEmpty - Optional annotation for requiring a field value to be set
  3. As mentioned above, this is not an exhaustive list of all available SDK annotations, for more details on additional annotations, see the Automation Anywhere documentation portal.

@CommandPkg Labels - Action-level Attributes

  1. name: Internal name for the action which must be unique within the package
  2. label: Name of the action as it appears in the package details and bot building screens
  3. node_label: Sub-label that displays under the action label in the bot development interface
  4. description: Description of the action that displays in the package interface and on hover of the action in the bot development interface
  5. return_label: Label used for the return value field
  6. return_description: Optional description of the returned value - used for giving additional context to the user on what to expect on the return
  7. icon: name of the svg used as the icon in displaying the action on the bot building screens
      1. Note: reference the "pkg.svg" as the icon, but include an "iconwhite.svg" in the same directory should you wish to replicate the look of the out-of-box packages.

@Pkg - Field-level Attributes

    1. label: Label of the field which appears above the input in the action configuration pane
    2. description: Text that appears below the field giving the user further context on the format/expected use of this field.
    3. Note: the screenshot below shows the field-level attributes, as well as several other attributes mentioned in previous sections of this tutorial.

Package Development Checklist

  • Validate the build.gradle of your project - ensuring that repositories that are not ultimately needed are referenced in the dependencies section.
  • Be sure that the project name is set in the settings.gradle file - as this will determine part of the name of the package upon build.
  • Validate that all intended names/labels are set properly in the package.template file
  • Validate that the local JSON has all of the action and field level labels and descriptions
  • Ensure that a test class has been set up with a test case that has been executed in the IDE (or can alternatively can be executed on build)
  • Finally - build the jar file with the clean build shadowJar in the IntelliJ IDE or by navigating to the project root directory in a command prompt and entering
    gradlew.bat clean build shadowJar

Conclusion

The Automation Anywhere Package SDK enables developers to extend the capabilities of the Automation 360 RPA platform - and empower bot builders to leverage reusable, custom-built solutions. The code from the video above can be found on the Automation Anywhere GitHub repo. If you enjoyed this session and want to see more content like this, let us know by contacting us on Linkedin or by getting in touch on Twitter. Best of luck with your package-building endeavors and go be great!


2 replies

Badge

Very Help Full 

Badge +1

Thankyou

Reply