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.

What is a library?

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 .jar files.

Types of libraries

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.

Library versions

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 deploy 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.

When you deploy a robotic process to another environment in Appian RPA, artifacts are bundled to help streamline the process. Appian RPA inspects the package on import to the new environment to determine if any of the artifacts already exist. If an artifact's version number is different, Appian RPA overwrites the existing artifact with the one in the import package. If an artifact's version number and other metadata are the same as the artifact in the target environment, the new artifact won't be imported.

More on deploying code

More on deploying robotic processes and apps

Deploy libraries

The steps to deploy a library are very similar to deploying code used in a robotic process. To use a workflow library in a robotic process, you'll first need to deploy the code to your Appian RPA repository and then add it to the list of workflow libraries within the Appian RPA console.

To deploy and use a workflow library:

  1. Code your library in your local environment.
  2. Compile and deploy the code to the default Appian RPA repository using Eclipse or IntelliJ.
  3. Go to the Robotic Processes tab in the Appian RPA Console.
  4. Click the Workflow libraries icon 2236298.png in the toolbar.
  5. If you're updating an existing library, edit the existing workflow library definition:
    1. Click the entry in the list.
    2. Edit the workflow library's details. You may only need to update the Version field.
    3. Click Save.
  6. If you're adding a new workflow library, fill in the information in the Workflow library editor:
    1. Select Console repository in the Repository menu to use the default repository defined for the console.
    2. Fill the Group, Artifact, Version, and Main class fields to describe the new workflow library. See Library versions for more information on this metadata.
    3. Click Save.

After deploying the workflow library and adding it to the console, you're ready to use the library methods in your robotic process workflow.

Using a workflow library in a robotic process

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.

  1. In the Appian RPA Console, go to the robotic process configuration.
  2. Go to the Workflow section.
  3. Create an action or click an existing one.
  4. Click the libraries icon 2236298.png.
  5. Start typing the name of the library you want to associate with this action and select it from the suggestions.
  6. Click OK.

Libraries are protected by permissions. This means a robotic process can only use libraries with common permissions.

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.

Open in Github

On This Page