There's no need to reinvent the wheel when you're developing a robotic process in Appian RPA. Developers can leverage existing code to integrate common operations into their robotic processes. These pieces of code are known as libraries and help you develop robotic processes more quickly and predictably.
This page describes libraries in the context of Appian RPA, including how and where libraries are used in a robotic process lifecycle. Throughout the Appian RPA documentation, you'll see libraries mentioned during development and within the RPA console.
A library is a set of code and classes to complete common tasks. Sometimes referred to as "nanobots," libraries are designed to be reusable in a robotic process or across multiple robotic processes. You can develop libraries for your specific use case or use libraries built by other developers. Think of libraries as building blocks to help you code a robotic process faster.
In the file system, libraries appear as
In Appian RPA, you'll work with workflow libraries often. You can develop custom workflow libraries to use in your robotic processes.
You'll also use code libraries, such as traditional Maven dependencies, in Appian RPA processes. You are probably familiar with these if you've done Java development before.
In Appian RPA, you'll use workflow libraries and code libraries for different purposes. Workflow libraries are useful when you have reusable Java functions that need to be shared across robotic processes. Instead of having duplicate code within your bots, you can define a workflow library and define actions within your robotic process workflow that reference that library. For example, if you have multiple robotic processes that need to get the same information out of your customer relationship management (CRM) system, that is a good candidate to be defined as a workflow library. Code libraries are used to help developers do the things they need to do in Java. An example of a code library is Log4j, which is a Maven Central library that can be used to help with Java logging.
Keep in mind that Appian RPA's bundled export feature only includes libraries and other artifacts that are kept in the Console's designated repository. If your robotic process references libraries elsewhere, you'll need to do some additional configuration when you import the robotic process to another environment.
Like any piece of a big project, you'll need to edit or maintain library code from time to time. Maven requires artifacts to have certain metadata declared in the file when deployed to the repository. This metadata assists in better organization, dependency management, and version control. Maven uses this metadata with the pom.xml file to assemble and manage the pieces of your project. More on artifacts and metadata.
Each time you create or update a library, you'll need to push it to the console repository for the changes to appear in Appian RPA. Development practices may require you to update the version number to help track when major changes are introduced.
In Appian RPA, a library's version comprises three digits:
When you share a robotic process to another Appian RPA environment, libraries are bundled to help streamline the process. When you import a workflow library or robotic process package, Appian RPA inspects the package on import to the new environment to determine if any of the libraries already exist.
Manage workflow libraries within the Robotic Processes tab in the Appian RPA console. Here, you can see the list of existing workflow libraries, edit a workflow library, or add a workflow library. You can also import and export libraries to share them without using an IDE.
You can export a workflow library from Appian RPA to share. The export feature packages the project along with all private dependencies, eliminating the need to use an IDE or Maven.
To export a workflow library:
Click Workflow libraries in the toolbar.
<groupId> - <artifactId> - <version>.zipto provide key version-control details.
Appian RPA lets you quickly and easily import a workflow library from the AppMarket or other sources, without needing to use an IDE or Maven.
To import a workflow library:
Your imported workflow library may overwrite an existing one under certain conditions. Specifically:
See Versioning your workflow library for a description of how to increment your workflow library's version numbers to properly anticipate import behavior.
By now you know a library is a set of code used to achieve a smaller common task in your overall robotic process. After you identify or develop the library you want to use in your robotic process, it's time to set it up in the workflow.
As you learn more about libraries, you might find it helpful to integrate logging to detect when issues occur in the execution of a robotic process. Add logging to your code to print informative messages in the execution log. You can then refer to the execution log if your robotic process doesn't execute successfully.
If you're comfortable working with Java and want to create a set of reusable workflow libraries and custom methods, follow the steps in this section.
src/main/java/com/appian/robot/core/templatefolder, open the
.javafile. You can also create a new one. If you create a new java file, delete the original one.
INanointerface and add the
@Nanoannotation to the class.
@JidokaMethod annotation to create a method in your custom workflow library. The
description you add here will be visible in the console when you associate the method with an action in the workflow. For example:
1 @JidokaMethod(name = "Set Cell Value", description = "Initializes Excel to Powerpoint workflow.")
@JidokaParameter annotation to create custom parameters which also appear in the console. For example:
1 2 3 4 5 @JidokaParameter(name = "File Location") String fileLocation, @JidokaParameter(name = "New File Location") String newFileLocation, @JidokaParameter(name = "Sheet Name") String sheetName, @JidokaParameter(name = "Cell Reference") String cellReference, @JidokaParameter(name = "Value to Set") String valueToSet
If you update an existing workflow library, you'll want to increment some of its version numbers to indicate whether you made a major or minor change. This is a standard practice, as noted above. Follow these recommendations for versioning so the workflow library imports as expected when you share it with others:
Next, navigate to the console to configure the workflow library and prepare it for use in a robotic process:
pom.xmlfile to locate this value.
Now you're ready to use the workflow library and its methods in a robotic process.
.javafile to see the order of parameters in the method.
And that's it! Your custom methods are also available to other robotic processes in the console. As you learn more about libraries, you might find it helpful to integrate logging to detect when issues occur in the execution of a robotic process. Add logging to your code to print informative messages in the execution log. You can then refer to the execution log if your robotic process doesn't execute successfully.
On This Page