Appian Services Module

The Appian Services module extends robotic process automation capabilities within your Appian applications. Using the methods within the module, your process can automatically send data to or request data from Appian numerous times throughout the process execution. These actions occur without initiating an Appian process model, making communication faster and simpler.

Additionally, the module is built for ease of use between environments:

  • It automatically references the environment's base URL so there's no need to hard-code it in the robotic process or update it when deploying to Production.
  • Authentication is simpler and more secure by eliminating the need to use environmental variables and credentials. Appian actions are executed in the context of the user who starts the robotic process. In most cases, the robotic process initiator is actually the service account that already authenticates Appian and Appian RPA. The Appian Services module relies on this authentication mechanism when executing robotic processes, eliminating the need for additional credentials to be defined in the Appian RPA Console or referenced in the robotic process code.

To use the methods in this module, you can use the module available in the Appian RPA Console. The module allows you to easily configure methods in a user interface and call robotic process variables to use as values or store returning method results.

This page describes how to use methods in the low-code module. For more experienced developers, more options are available using the Java module.

Using the Appian Services module

Using methods from a low-code module is both easier and more robust. The Appian Services module allows you to configure the following methods through a user interface:

Evaluate expression

The Evaluate expression method allows you to write and evaluate regular expressions and Appian expressions directly in your robotic process. This method provides an expression pane where you can call Appian expression rules (rule!) and constants (cons!), reference robotic process variables (pv!), and use Appian functions to format and aggregate your data.

This action is particularly helpful with conditional actions. With this method, you can create an if statement that can determine which output the robotic process should follow. In a generic action, this method allows you to determine a variable's value using logic, allowing your data to be dynamic.

To use the Evaluate expression method:

  1. In the Appian RPA console, go to the Robotic Processes tab.
  2. Open a robotic process configuration and navigate to the Robotic process variables area.
  3. Create and save robotic process variables that will map to the variables in the process model you want to reference in a workflow action.
  4. In the robotic process configuration, navigate to an action in the workflow.
  5. Click the action and click the list icon 951644.png.
  6. In the Module tree, open the Appian Services module and click Evaluate Expression. The parameters for the method display in the Evaluate expression pane.
  7. In the CONFIGURATION area of the pane, enter a regular expression or Appian expression. As you type, the editor suggests functions and objects to reference in your expression.
  8. In the OUTPUT area of the pane, configure the parameters described in Output parameters. This method returns any type of results you specify in the expression.
  9. In the AFTER COMPLETION area of the method pane, configure parameters as described in After completion parameters.
  10. Click OK to save.
  11. Click SAVE CHANGES in the page toolbar.

evaluate expression

Loop through a list

It's common for a robotic process to iterate over many items. For example, you could process several employees, IDs, or bank accounts. To process numerous items, a robotic process workflow will include a loop.

Loops utilize conditional actions to determine when all available items have been processed, and which action to take next. Using the Evaluate expression method, it's now easier than ever to construct an if statement in your conditional action to determine if there are any more items to process.

The example below illustrates how to create a loop in your workflow.

rpa-looping-workflow.png

  1. In the robotic process configuration page, create a new process variable to provide the current index of the loop. In the initial value field, enter the first index number. In many cases, this will be 1.

    rpa-looping-variables.png

  2. Create a generic action and use the Evaluate expression method from the Appian Services module. Create an expression that will increment the index after each flow in the loop completes. The expression should save the output back into your index variable. In the example workflow above, this action would be Increment Index.

    1
    
     pv!currentIndex + 1
    
  3. Create a conditional action and use the Evaluate expression method from the Appian Services module. Enter an expression to compare the current item's index to the length of the list of total items. In this example, we are comparing the current item index with the total number of contracts. There is no need to save the output back into a variable.

    1
    2
    3
    4
    5
    
     if(
       pv!currentIndex <= length(pv!contracts),
       true,
       false
     )
    

When the robotic process reaches this point of the workflow, it will continue looping through the actions as long as the current index is less than the number of contracts. When the index equals or exceeds the number of contracts, the conditional action routes the robotic process to another action or to end the execution.

Start process

The Start Process method lets you kick off a process in Appian as part of a robotic process. You can map variables from a process model in Appian to the robotic process variables you've defined in the configuration. The method passes data from Appian RPA variables to Appian using this map and initiates a process using the data as input.

To use the Start Process method:

  1. In the Appian RPA console, go to the Robotic Processes tab.
  2. Open a robotic process configuration and navigate to the Robotic process variables area.
  3. Create and save robotic process variables that will map to the variables in the process model you want to reference in a workflow action.
  4. In the robotic process configuration, navigate to an action in the workflow.
  5. Click the action and click the list icon 951644.png.
  6. In the Module tree, open the Appian Services module and click Start Process. The Start Process pane displays.
  7. In the CONFIGURATION area of the pane:
    • Search for the process model to reference in the Process Model field. As you type, Appian RPA suggests available process models to choose from.
    • Select a process model and the process parameters appear.

    If you don't have access to the selected process model, you'll see a message saying it's not visible and you won't be able to load the process parameters.

  8. In the OUTPUT area of the pane, configure the parameters described in Output parameters. This method returns the overall process ID as an integer.
  9. Click OK to save your changes to the action.
  10. Click SAVE CHANGES in the page toolbar.

rpa-start-process-module.png

Once you've mapped your process variables to the variables in your robotic process, you can reference those variables using other modules in your workflow. This allows you to easily capture and use those values throughout your robotic process without going into your source code.

Upload document

The Upload Document method lets you upload a file to Appian from the resource where the robotic process executes. If you want to use Appian RPA to extract and reconcile documents from a legacy system, this method helps you do it. You can use this method to save those document to Appian, where you can use document extraction features to digitize and act on that information.

To use the Upload Document method:

  1. In the Appian RPA console, go to the Robotic Processes tab.
  2. Open a robotic process configuration and navigate to the Robotic process variables area.
  3. Create and save robotic process variables that will map to the variables in the process model you want to reference in a workflow action.

To store results for this method, the robotic process variable must be the Document type.

  1. In the robotic process configuration, navigate to an action in the workflow.
  2. Click the action and click the list icon 951644.png.
  3. In the Module tree, open the Appian Services module and click Upload Document. The Upload Document pane displays.
  4. In the CONFIGURATION area of the pane, configure the method options:
    • Upload Type: Choose whether you want the robotic process to Take a screenshot or Upload a file.
    • File Path: Lets you specify the full path of the file to upload. This field lets you enter a text string, choose a variable, or use the expression editor.
    • Document Name: Lets you specify the name of the document object to create in Appian. This field lets you enter a text string, choose a variable, or use the expression editor. If you leave this field blank, the original file name will be used as the document name.
    • Target Folder: Lets you specify the location in Appian to save the document. Enter a folder ID or use the expression editor to configure the target folder using a constant. You need to have at least Viewer access on the folder object to configure it as the target folder in this method. During execution, the robotic process will only be able to upload a document to folders where it has Author access.
  5. In the OUTPUT area of the pane, configure the parameters described in Output parameters. This method returns a document.
  6. In the AFTER COMPLETION area of the method pane, configure parameters as described in After completion parameters.
  7. Click OK to save your changes to the action.
  8. Click SAVE CHANGES in the page toolbar.

Download document

The Download Document method lets you download a file from Appian to the resource where the robotic process executes. This method is useful if your robotic process needs to upload files to other destinations or process the information on the desktop.

Uploading an Appian document to a web form? You can use the Interact with Element method in the Browser module to upload documents directly from Appian and skip the download step.

To use the Download Document method:

  1. In the Appian RPA console, go to the Robotic Processes tab.
  2. Open a robotic process configuration and navigate to the Robotic process variables area.
  3. Create and save robotic process variables that will map to the variables in the process model you want to reference in a workflow action.
  4. In the robotic process configuration, navigate to an action in the workflow.
  5. Click the action and click the list icon 951644.png.
  6. In the Module tree, open the Appian Services module and click Download Document. The Download Document pane displays.
  7. In the CONFIGURATION area of the pane, configure the method options:
    • Appian Document: Choose the robotic process variable that maps to the document you want to download. You can also configure the value using the expression editor, using the todocument() function or using a constant.
    • File Name: Lets you specify the name you want to use for the downloaded file. This field lets you enter a text string, choose a variable, or use the expression editor. If you leave this field empty, the file will use the filename used in Appian.
    • Folder Path: Lets you specify the path where to download the file. This field lets you enter a text string, choose a variable, or use the expression editor.
  8. In the OUTPUT area of the pane, configure the parameters described in Output parameters. This method returns a text value with the path to the file on the resource.
  9. In the AFTER COMPLETION area of the method pane, configure the parameters described in After completion parameters.
  10. Click OK to save your changes to the action.
  11. Click SAVE CHANGES in the page toolbar.

Output parameters

For each method in this module, you can configure the following parameters in the OUTPUT area of the method pane:

  • Operator: Select an option to store the result as a single-value variable (is stored as) or add the result as a multiple-value variable (is appended to).
  • Target: Enter the name of the robotic process variable where you want to store or append the result. If your process variable is type CDT, you can specify which field of a CDT to store the result into using dot notation.

After completion parameters

For most methods in this module, you can configure the following parameters in the AFTER COMPLETION area of the method pane:

  • Wait before executing next action: Enter the number of seconds the robotic process waits before it continues to the next action in the workflow.
  • Take a screenshot: If you select this option, the robotic process takes a screenshot of the resource immediately after the action completes successfully.

This version of the Appian RPA documentation was written for Appian 21.2, and does not represent the interfaces or functionality of other Appian versions.
Open in Github Built: Fri, Oct 22, 2021 (11:11:24 AM)

On This Page

FEEDBACK