Appian RPA Design Patterns

Introduction

Appian's automation framework is built for speed and flexibility, enabling your application and robots to act on information immediately. To make it even easier, you can integrate and orchestrate your robotic workforce within your application's process model workflows. Assign individual units of work, launch multiple executions at once, assign execution priority, and configure retry behavior in one place. You can build process models to handle exception logic and manage data passing to and from the robotic process to support a sophisticated human-in-the-loop automation practice.

This page recommends patterns for integrating Appian process models and robotic processes. The low code patterns described below are designed to be fast, scalable, and reliable ways to communicate and process data.

Overall design guidelines

In order to design Appian RPA robotic processes efficiently and in low code, it's essential to understand which pieces and steps of the robotic process should be in Appian as process models or expressions and which ones should be within the robotic process workflows.

In general:

  • Use the robotic process for interacting with third party systems that don't have APIs. This includes logins, navigation, and reading and writing data into the third party apps.
  • Use Appian expressions and process models for anything else, including running calculations and business logic, interacting with systems that have APIs, and reading and writing to databases.

If a step or action can be designed in low code in Appian and exposed as expressions or process models, use Appian expressions or process models. Otherwise, use Appian RPA.

The patterns below are broken in different categories:

  • Patterns for orchestration between Appian and Appian RPA
  • Patterns for robotic process design

Orchestration patterns

Executing a robotic process

As documented in Ways to Execute a Robotic Process, a robotic process can be started using either the Execute Robotic Process smart service, the Call Integration smart service, or the Execute Robotic Process integration object.

To simplify the workflow design, it is recommended to start robotic processes using the Execute Robotic Process smart service. This smart service executes robotic processes synchronously and allows designers to save the outputs of the robotic processes in process variables. Launch a single robotic process execution using this smart service, and use it to retrieve the results in Appian.

Implementation details

In the process modeler, this pattern appears as shown below:

rpa-design-pattern-1.png

Executing business logic in robotic process

When interacting with external systems, it is common for a robotic process to perform calculations and business logic, such as validating the data being displayed or calculating data to be entered in the next step of the robotic process.

To perform these calculations and logic, use Appian expression rules invoked using the Evaluate expression method in the Appian Services module.

Creating an expression rule, as opposed to writing the logic directly in the expression field of the Evaluate expression method, provides additional benefits such as reusability and unit testing.

Implementation details

Use the Evaluate expression low code method to execute an expression rule that was previously created in Appian.

rpa-design-pattern-2.png

rpa-design-pattern-3.png

Handling unplanned exceptions

Due to the fragile nature of front-end automations, it is likely that your robotic processes will sometimes run into unplanned issues during execution. For example, the target application to interact with may run into intermittent bugs for certain executions. In these circumstances, you can use your process models to orchestrate the exception behavior, retrying the execution or notifying a user of the issue.

To manage unplanned exceptions, the process model must use a variable to record the end result of the RPA execution. The Execute Robotic Process smart service provides a Success output variable by default, which you can use to route the process model workflow based on whether or not the RPA execution was successful. For more granular exception handling, you may find it useful to build additional exception logic based on the part of the robotic process that was unsuccessful. To do this, you'll create a robotic process variable to track each action's success or failure.

Implementation details

In your robotic process, create a robotic process variable:

  • An action state (string) to track when actions in the robotic process execution succeed. You can leave the initial value blank.

As you build the robotic process workflow and configure actions, store results in this variable. For example, when the robotic process successfully logs into an application, you could update the status to say "login successful". Configure subsequent actions to update the same variable to describe the state as the execution proceeds.

This information can be returned to the Appian process model and used to build exception logic to address when a specific action in the robotic process fails.

For example, if the robotic process isn't able to access a web portal, it might be that the website didn't load in time. Build an exception route in the process model to retry the execution. Alternatively, if the execution fails at a point in the process that requires human intervention, you can build a route in the process model to send a user input task to manually manage the exception.

rpa-design-pattern-5.png

Handling business exceptions

When a robotic process runs into a business exception, such as manual approval is needed or data is missing, the robotic process must terminate and notify a user of the exception.

To do so, the robotic process must return the exception and related data to the Appian process model so that the user is notified with relevant information.

Implementation details

In your robotic process, create two robotic process variables:

  • A status flag (boolean) to indicate if a certain business exception has occurred.
  • An exception message (text) to provide details on the business exception.

These robotic process variables are the same ones used to manage other exceptions as documented in the previous pattern.

Populate these two robotic process variables before terminating the robotic process to indicate a business exception.

rpa-design-pattern-7.png

In the Appian process model, use an XOR gateway to evaluate the values of the status flag returned by the robotic process and route the workflow accordingly. Below is an example where a business exception in the robotic process triggers a task to a user for further troubleshooting.

rpa-design-pattern-8.png

Processing items from a list

Appian's low code data management capabilities extend to robotic processes that process items from a list. Use an Appian process model to loop through items and use the Execute Robotic Process smart service to start robotic processes sequentially or in parallel.

Implementation details

Launch individual executions from a process model using the Execute Robotic Process smart service with multi-node instances (MNI), where one robotic process execution = one item processed. Depending on the configuration of MNI, robotic processes can be started sequentially or in parallel.

When started in parallel, the robotic processes are queued in Appian RPA until a compatible resource becomes available. The robotic processes execute based on their assigned priority, which can also be configured in the Execute Robotic Process smart service.

If you have a set of many items to process in parallel, you can design a process model that uses MNI to spawn multiple sub-processes once called.

To get started:

  1. Create a CDT in Appian to represent the items to process, including a field to track the status.
  2. Create a data store entity from this CDT.
  3. Build a process model to retrieve the items to process. This can be done using a database query, API, Excel, or another source.
  4. Create a process variable to store this data within the process model.
  5. Create a sub-process node in the process model.
  6. Configure the sub-process node to run as many nodes as there are items in the process variable that holds the items data, defined above. This implementation is referred to as a "multi-node instance" because the sub-process launches multiple parallel robotic processes. To do this:
    1. From the Palette on the left, expand the Activities folder.
    2. Drag the Sub-Process node to the canvas and drop it on top of the existing connector when the connector turns blue. This indicates that you can add the object to the existing flow.
    3. Double click the Sub-Process node.
    4. Open the Other tab.
    5. Check the Automatically run multiple instances of this node box.
    6. Select Run one instance for each item in and choose the variable you created in step 4.
    7. Select Run all instances at the same time.
    8. Click OK.
  7. In a separate tab of the process modeler, create the sub-process.
    1. Create an Execute Robotic Process smart service node and configure it to launch the intended robotic process.
    2. Create a Write to Data Store Entity smart service node and configure it to store the processed data, once returned from Appian RPA.
  8. Back in the parent process model, configure the sub-process node to call this subprocess.
  9. Save and publish the process model.

The MNI implementation has a 1000-node limit. If you have more than 1000 items to process, we suggest breaking them into increments of 1000 or less and building additional logic in your process model to handle them.

When launching multiple consecutive robotic processes, you can use the Skip setup and clean up for consecutive executions option in the Execution settings to speed up each execution after the initial one.

Robotic process design patterns

Leveraging the low code power of Appian platform

With traditional RPA tools, the robotic process needs to use custom code or custom libraries to perform tasks not strictly related to third party system interaction such as sending emails, invoking web services or other APIs, and generating documents.

With Appian RPA, the robotic process simply leverages the low code power of the Appian platform to perform these tasks through the execution of Appian process models or Appian expressions:

  • Use an Appian process model to modify data, such as writing to a database or creating documents.
  • Use an Appian expression to read data, such as querying a web service or a database, or executing business logic.

Implementation details

To execute a process model from a robotic process, use the Start Process method in the Appian Services module. After selecting the Process Model to execute, provide the necessary process parameters and save the process instance identifier returned by this method.

rpa-design-pattern-9.png

Note that the Appian process is started asynchronously. After launching the Appian process, the robotic process continues to the next step in the robotic workflow.

To execute an Appian expression from a robotic process, use the Evaluate expression method in the Appian Services module. The low code method returns the outputs of the expression which can be saved in robotic process variables for future use.

rpa-design-pattern-10.png

rpa-design-pattern-11.png

Executing a robotic process on a specific resource

Depending on the third party system to interact with, this interaction may require additional software that is not installed on the resources such as emulators for mainframe systems or desktop applications. In this scenario, a robotic process must be executed on the correct resource or set of resources in order to work properly.

Implementation details

Use the RPA permission tags feature to pair robotic processes and resources. A robotic process can only be executed on a resource that shares the same permission tags.

Open in Github Built: Mon, Nov 15, 2021 (03:03:53 PM)

On This Page

FEEDBACK