Develop a sample package
Develop your own package and upload it to an Control Room to provide custom actions for bots.
Download and extract the contents from the latest Automation 360 Package SDK release. The newest package contains the necessary sample source code to build your package.
You need to have a project created in a Java IDE. For details about setting up a project, read Set up the Java project.
The following high-level tasks provide the basic workflow for creating a package.
Create a java class.
This class is the action you plan to publish in your package.Important: It is required that the class supports the default constructor.
Add required business logic to the class.
The following are the supported return types:
- Void: Use this return type if your action does not return any value.
- Value: Use this return type if your action returns any type of value.
- Annotate the class with BotCommand and CommandPkg Annotations to make the class eligible to be converted to an action.
- Annotate the variable that accepts values with Idx and Pkg.
- Annotate the entry method with the Execute annotation.
From the action prompt, run
gradlew.bat clean build shadowJar.The JAR file created from the build is located in build/lib.
From the Control Room on the page, click the Add package icon to upload the JAR file.