In Automation Anywhere A2019, you can streamline bot creation by creating and distributing common development parts called "packages". Let's summarize the outline while referring to the content explained in Developer Meetup Vol.2 sponsored by Automation Anywhere held online the other day. I did. Since the package is built using Java technology, we will prepare the Java build environment for development.
The following are used as the environment.
Automation Anywhere Enterprise A2019.12 (Build 4111) Commercial Edition
IntelliJ IDEA Community Edition (Integrated development environment such as Java, Eclipse may be used) + Gradle plug-in v.5.x.x
Gradle (Open Source Build Automation System)
Some screenshots are borrowed from the Webiner screen of Developer Meetup Vol.2.
** Articles in the "Creating a Package, a Common Development Part of Automation Anywhere A2019" series **
You can add your own actions to the action panel as shown in the screen below. You can also set the action icon and the input / output arguments of the action.
Source: Developer Meetup Vol.2 sponsored by AA
Package development is carried out according to the following flow.
Next, set up the Java IDE. Product Documentation specifies Eclipse or IntelliJ Community Edition So I'm going to use IntelliJ here.
Please visit the JetBrains page below to download and install the "community" version of the .exe. When you press the .exe button, you will be prompted to enter your email address, but if you do not enter it, the download will start automatically, so you do not have to enter it. https://www.jetbrains.com/ja-jp/idea/download/
It is OK if you can download the following .exe of about 550MB. (idealC-XXXX.X.X.exe, the number in the X part may be different with each version.)
Also, although the IDE is in basic English, it seems that the beta version in Japanese is also being tested, so if you are interested, please download and install it. This is a .jar file of about 1.5MB, which can be seamlessly integrated and installed by setting it up after installing the IDE.
Reference article: "[Starting the IDE and obtaining and installing the Japanese localization plug-in](https://qiita.com/RPAbot/items/282d859344d1e96a953f#ide%E3%81%AE%E8%B5%B7%E5%" 8B% 95% E3% 81% A8% E6% 97% A5% E6% 9C% AC% E8% AA% 9E% E5% 8C% 96% E3% 83% 97% E3% 83% A9% E3% 82% B0% E3% 82% A4% E3% 83% B3% E3% 81% AE% E5% 85% A5% E6% 89% 8B% E3% 82% A4% E3% 83% B3% E3% 82% B9% E3% 83% 88% E3% 83% BC% E3% 83% AB) ”
Run idealC-XXXX.X.X.exe and answer "yes" to "Allow apps to make changes to your device".
Click the Next button on the first screen.
Click the "Next" button.
Check File Association if necessary. Click the "Next" button.
Click the "Install" button.
The installation will proceed, so just wait.
Click the "Finish" button. This completes the installation.
SDK file A2019-package-sdk.2.0.1.zip in advance Download it and unzip it to any location on your computer. In recent versions, it seems that the multilingual function of the UI has been added.
When you open the Windows Start menu, you should see IntelliJ in "Recently Added", so click it to open the IntelliJ IDE.
If the following dialog box is displayed, just click the "OK" button.
The first time you will be asked if you want to customize it, so click "Skip ...".
Click Open or Import.
Select the folder where you unzipped the contents of the zip file. Click the "OK" button.
Then such a screen will open.
Now, in the build log panel at the bottom of the screen, I see the error "Invalid Gradle SDK configuration found". This is displayed because you have not yet installed the appropriate JDK. Click Open Gradle Settings.
Then, the same screen as when "File"-"Settings ..." is specified opens. The Gradle JVM is "
Since it is said that version 11 is required for the JDK, specify 11 of Azul Zulu Community, which is also used in Automation Anywhere. If you specify the "Download" button, the download will start in the specified location.
By the way, in the case of IntelliJ, the build is not done from the IDE's "Build" command, but by calling
gradelew.bat from the Terminal on the command line. (Eclipse seems to be able to compile from the IDE.) In the case of IntelliJ, it seems that it does not fully support building using Gradle.
Therefore, after installing the JDK, you need to specify the root folder of the JDK in the environment variable
In this example
set JAVA_HOME=C:\Users\(User name)\.jdks\azul-11.0.7
And set it as.
After setting the environment variable
JAVA_HOME from Terminal in the IDE, execute the build command
gradlew.bat clean build shadow Jar. Then the build will start.
There may be warnings and cautions along the way, but the build will be completed as follows.
D:\AASDK\A2019-package-sdk-2.0.1>gradlew.bat clean build shadowJar Downloading https://services.gradle.org/distributions/gradle-5.4.1-bin.zip ................................................................................... Welcome to Gradle 5.4.1! Here are the highlights of this release: - Run builds with JDK12 - New API for Incremental Tasks - Updates to native projects, including Swift 5 support For more details see https://docs.gradle.org/5.4.1/release-notes.html Starting a Gradle Daemon (subsequent builds will be faster) > Task :compileJava ... > Task :commandCodeGen mergeJsonFiles: updatePackage: group com.automationanywhere , artifactName A2019DemoPackage , packageVersion 2.0.1-20200607-015603 BUILD SUCCESSFUL in 51s 6 actionable tasks: 5 executed, 1 up-to-date D:\AASDK\A2019-package-sdk-2.0.1>
When the build is complete, the compiled file (.jar file) is output to
(project folder) \ build \ libs.
If you have permission to add packages to the Control Room, you can use the "Add Package ..." menu under "Bot"-"Packages".
Specify the .jar file you built earlier as the "upload package". Then click the "Upload Package" button.
You can see that this package contains 28 actions. You can preview the contents. To enable it as is, click the "Approve, Enable, Set as Default" button.
Now you can use it as a package from the bot construction screen.
On the Bot construction screen, "A2019 Demo Package" has been added to the action palette, and 28 actions have been added below it. If you try to incorporate the action into the flow, you can see that arguments etc. are also specified in the details of each action.
How was it! ?? By now, you should have built the build environment, built the SDK sample file as it is, uploaded it to the Control Room, and confirmed the procedure to use it.
In the sequel, we'll finally see what's inside the SDK sample and how to edit it to create your own package!