Build a Retrieval Process Tutorial

Estimated time to complete tutorial: about 3 hours

User experience level: Beginner

Introduction

In this tutorial, you’ll build an Appian application that retrieves information from a public web page, then stores and displays that information for quick and easy review. You’ll use an Appian process model to orchestrate a low-code Appian RPA robotic process that retrieves the information. Then, you’ll use Appian records to easily manage and view the information the process retrieves.

You’ll be stepping into the shoes of an analyst researching the eligibility of vendors for a United States government contract. You have the DUNS number for the vendors you’re researching. The DUNS number is the unique vendor identifier created by the Dun & Bradstreet credit bureau. In some publicly-available data sources, you can use the DUNS number to look up information about the vendor, but other data sources make you provide the Commercial and Government Entity (CAGE) code instead. Luckily, on the public access web page for the Federal Awardee Performance and Integrity Information System (FAPIIS), you can use the DUNS number to search for the CAGE code, so you’ll have both identifiers for your research.

The FAPIIS public access web page has a lot of information you might need in this scenario. However, to make this tutorial a manageable size, we’re limiting what’s retrieved to just the CAGE code.

This process is fairly straightforward and simple if you’re only doing it once. But imagine the repetitive manual work required if you’re evaluating hundreds of vendors at a time.

To automate this process, we’ll walk you through three parts of this tutorial: (1) building a robotic process, (2) creating a process model, and (3) displaying retrieved data in a record.

To familiarize yourself with the business process you’ll be automating:

  1. Go to the FAPIIS public access web page:

    In this tutorial, you can click any minimized screenshot to enlarge it.

  2. In the Unique Entity ID (DUNS) field, enter 878504856.
  3. Click Search. The summary page displays.

  4. Find the CAGE field in the summary page. That’s the information your application will automatically retrieve and display.

Before you begin

Quick definitions

This tutorial will go more smoothly if you understand these terms, used in the context of Appian RPA:

  • Resource: The machine where the robotic process runs to complete the tasks you set for it. In this tutorial, you’ll be running a robotic process on a resource.
  • Agent: A program that runs on the resource to communicate with Appian RPA. When you execute a robotic process, the agent makes sure to get the latest version of robotic processes and downloads them onto the resource. An activated resource is a machine where the agent has been successfully installed and is running. In this tutorial, your administrator installs and verifies the agent on the resource you’ll be using before you get started.

System requirements

This tutorial is designed to be used with Appian 21.2 and Appian RPA 7.8.

Administrator setup requirements

The administrator of your Appian environment must set up the following to support your work in this tutorial:

Location

Action

Admin Console

  • Create a user account for you to use. This account needs Basic User security access.
  • Create an API key and related service account to communicate with Appian RPA.
  • Assign the System Administrator role to the service account.

Appian Designer

  • Add your user account to the Designers group and the Process Model Creators group so you can design objects in your Appian environment.
  • Create an application for you to use, assigning you Editor permissions or higher. This tutorial refers to this application as the Retrieval Process Tutorial application.
  • Use the API key for the service account to set up Appian RPA as a connected system in the Retrieval Process Tutorial application. Your user account must be assigned at least Editor permissions for this application.

Appian RPA

  • Provide you with an activated resource running Chrome, so you can execute a robotic process on that machine as part of this tutorial.
  • Provide you with the version of Chrome running on the resource, or provide you with a means to determine that version independently.
  • Add a new permissions tag to your user account and the resource you’ll be using.

We recommend using rpt (for Retrieval Process Tutorial) if that tag is available in your environment.

Part 1: Build a robotic process

In this part of the tutorial, you’ll:

  • Create objects in Appian Designer to support a robotic process.
  • Build a robotic process in Appian RPA.
  • Run the robotic process on the resource your administrator provided.

Go to Appian Designer

To go to Appian Designer:

  1. Sign in to Appian Designer (for example, myappiansite.com/suite/design).
  2. Open the Retrieval Process Tutorial application that your environment administrator created.

Create a custom data type

Where? Appian Designer

You’ll need a custom data type (CDT) to store the vendor information that the robotic process returns from the website.

To create this CDT:

  1. In the Retrieve Process Tutorial application view, click NEW > Data Type.
  2. Configure the following parameters:

    Parameter

    Action

    Create from scratch

    Leave unselected.

    Namespace

    Leave the default value.

    Name

    Enter: RPT_FAPIIS_Info

    This name starts with the acronym, RPT, which stands for “Retrieval Process Tutorial.” It’s easier to find your objects in your Appian environment if you start all object names with a unique acronym. If RPT already exists in your Appian environment, select another to use instead when naming objects throughout this tutorial.

    Description

    Contains FAPIIS information used in the Retrieval Process Tutorial

    For example:

    You can’t edit the CDT name after you save it, so make sure you’ve entered the name you want.

  3. Click CREATE.
  4. Add and configure the primary key field:
    • In the Fields section of the CDT configuration page, click New Field.
    • Configure the following fields:

      Field

      Action

      Name

      Enter: id

      Type

      Select Number (Integer).

      Length

      Keep the default value.

      Array

      Keep unselected.

      Key

      • Click the key icon. The Configure Primary Key Constraint window displays.
      • Under Key Constraint select Primary Key.
      • Select Auto-generate the next unique identifier when new records are written to a data store entity.
      • Click OK.
  5. Add each field listed in the following table:
    • On the CDT configuration page, in the Fields section, click New Field.
    • Configure the options for the field as specified in the following table:

      Name Type Length Array Key
      vendor Text 255 no no
      duns Text 255 no no
      cage Text 255 no no
  6. Verify your fields. Here’s how they should display:

    CDT fields

  7. Click SAVE CHANGES in the toolbar.
  8. Close the CDT object.

Create and publish a data store

Where? Appian Designer

  1. In the application toolbar, click NEW > Data Store.
  2. Configure the following parameters:

    Parameter Action
    Name Enter: RPT_Vendor_Info
    Description Enter: Contains vendor information for the Retrieval Process Tutorial application
    Data Source Keep the default value, jdbc/AppianAnywhere.

    For example:

  3. Click CREATE. The Review Data Store Security window displays.
  4. Configure permissions for the data store:

    User or Group Permission Level
    Default (All Other Users) group Select Viewer in the Permission Level dropdown list.
    You Select Administrator in the Permission Level dropdown list.

    For example:

  5. Click SAVE. The Appian Data Store Designer page displays.
  6. In the Data Entities section, click Add Entity.
  7. Configure the following parameters:

    Parameter

    Action

    Name

    Enter the name of the CDT you just created: RPT_FAPIIS_Info

    Type

    • Click the Browse icon next to the box. The Choose a Data Type window displays.
    • In the Selected box, enter RPT, then select RPT_FAPIIS_Info when it displays in the dropdown list.
    • Click OK.

    For example:

  8. Click SAVE. The data entity you just added displays in the Data Entities section.
  9. In the Schema Management section, click VERIFY. The following warning displays:

    The warning is expected because you are adding new tables, so you can disregard it.

  10. Click SAVE & PUBLISH. In the Appian Cloud Database, Appian creates a table for the CDT you added. The following message confirms the success of the action:

    Entity mappings verified message

  11. Close the data store object.

Go to the Appian RPA console

Where? Appian Designer

To go to the Appian RPA console:

  1. In the Appian Designer, click the navigation menu in the toolbar.
  2. Select Appian RPA. The Appian RPA console displays in a new tab.

Create a robotic process

Where? Appian RPA

This robotic process will retrieve data from the FAPIIS web page.

To create a robotic process:

  1. In the application toolbar of the Dashboard page, click Create robotic process 2235137.png.
  2. Click the Blank template.
  3. Configure the following parameters:

    Parameter

    Action

    Name

    Enter: RPT-FAPIIS-retrieval

    This name identifies the robotic process in the Appian RPA console and the Appian Designer. This value must be unique in your Appian RPA environment.

    Permissions

    Verify that the rpt tag is present:

    • Is it present? Go on to the next step.
    • Is it missing? Ask your Appian administrator to make sure permissions tags are appropriately assigned to your user account.
  4. Leave any other parameters unchanged.

    For example:

  5. Click CREATE.

    Appian RPA automatically downloads the preliminary code, which you can use if you’re comfortable coding in Java. However, for this tutorial, you’ll use low-code methods, which means you can discard the preliminary code package.

    Appian RPA creates the robotic process, and the robotic process configuration page displays.

Add ChromeDriver support files

Where? Appian RPA

The ChromeDriver server allows your robotic process to communicate with Chrome on your resource. In this step, you’ll add the ChromeDriver support files to the robotic process. With these support files added, the agent installs the driver automatically on the resource at the same time as it downloads the robotic process.

To add ChromeDriver support files to the robotic process:

  1. Find out the operating system on the resource that your administrator provided:

    • In the left pane, click Resources.
    • Click your resource.
    • In the resource details, find the Operating System field.
  2. In a new browser window or tab, go to the ChromiumDriver site.
  3. Download the ChromeDriver that corresponds to the operating system and version of Chrome running on your resource.
  4. Go back to the robotic process configuration page in the Appian RPA console.
  5. Go to the Advanced Configuration tab.
  6. In the Support Files section, roll your mouse over Root until the action icons display next to it.
  7. Click the Add folder icon Add folder icon next to Root.
  8. Enter chromeWebDriver in the New Folder box.

    If the resource you’ll be using is running Linux, enter ChromeWebDriver instead. The initial capital letter is required.

  9. Click OK.
  10. Click the Upload icon Upload icon next to the folder you just created.
  11. Click Choose file.
  12. Browse to and select the ChromeDriver ZIP file you just downloaded.
  13. Leave Unzip on server selected.
  14. Click OK. The unzipped chromedriver file appears in the folder.

    For example:

    Support Files file tree

If the name of the file displays as the name of the ZIP file, rather than chromedriver, refresh your browser.

Add a robotic process variable

Robotic process variables specify the starting input for the robotic process and store the resulting output of the robotic process. In this case, the robotic process variable you’ll create tells the robotic process which DUNS number it should search on (input) and where the robotic process should put the CAGE code that the search returns (output).

Where? Appian RPA

  1. Go to the Task tab of the robotic process configuration.
  2. In the Robotic process variables section, click Add variable. A new row appears.
  3. Add the following variable:

    Field

    Description

    Name

    Enter: vendorInfo

    Description

    Enter: Vendor information retrieved from fapiis.gov

    Type

    • Enter RPT. As you type, a list of available data types appears.
    • Select the RPT_FAPIIS_Info CDT from the list.

    Initial value

    Leave empty.

    Parameter

    Leave unselected.

    Required

    Leave unselected.

    Multiple

    Leave unselected.

  4. Verify the variable you added:

  5. Click SAVE CHANGES in the toolbar.

Add the Open Browser action

Where? Appian RPA

In this step, we’ll start designing the robotic process workflow. The workflow is the guide that leads the robotic process's operation, determining its starting point and driving through a series of tasks. Each task the robotic process needs to perform is represented by an action in the workflow.

As the first task in the business process we’re automating, we need to open the Chrome browser on your resource. To do so, we’ll add an action to the workflow.

To add this action to the workflow:

  1. Go to the Workflow section of the Task tab.
  2. Delete the default transition arrow, because we’ll be replacing it with transitions specific to our workflow.
    • Click the transition arrow between the default Init and End actions.
    • Press Backspace or Delete on your keyboard.
  3. Click the End action and drag it away from the Init action, so you have room to add additional actions.
  4. Click Add generic action Add generic action icon.png in the workflow toolbar. An unconfigured generic action appears in the workflow.
  5. Move the action into place after the Init action.
  6. Name the action you added:
    • Double-click the action. A text box displays.
    • Enter Open Browser.

      If you want the name to fit the action box without resizing the box, add a hard return between each word (in this case, between Open and Browser).

    • Click away from the text box to save the name.
  7. Click the Open Browser action to select it.
  8. Click the list icon List icon. The action configuration window displays.
  9. In the Modules section of the Actions tree, click Browser > Open browser. The right-hand pane displays the parameters you’ll need to configure.
  10. Configure the following CONFIGURATION parameters:

    Parameter Action
    Browser Type Leave Chrome selected.
    URL Enter https://fapiis.gov, so that the browser will open to the FAPIIS public access page.
  11. Configure the following AFTER COMPLETION parameters:

    Parameter Action
    Wait before executing next action (seconds) Select this option, then enter 2 to give the web page adequate time to load.
  12. Leave any other parameters unchanged.

    For example:

  13. Click OK to return to the workflow.
  14. Click SAVE CHANGES in the toolbar.

    Oh, no! A warning dialog appears:

    Warning dialog

    This message appears because we attempted to save without adding transition arrows to the workflow. Without transition arrows, the robotic process interprets both the Init action and the Open Browser action as the starting point for the workflow.

  15. Let’s fix that! Click Cancel, then use the steps below to add transition arrows between the Init action, the Open Browser action, and the End action.
    • In the workflow, click the action where you want the arrow to originate.

      Selected action

    • Click on any of the connector points on the originating action.
    • Drag and drop onto the destination action. The editor assists you in "pasting" the arrow to the destination action.

    GIF of adding transition arrows to workflow

  16. Click SAVE CHANGES again. Success!

Add the Provide DUNS action

Where? Appian RPA

Now we need to fill in the Unique Entity ID (DUNS) box of the FAPIIS search form:

To add this action to the workflow:

  1. Delete the transition arrow between the Open Browser and End actions:
    • Click the transition arrow.
    • Press Backspace or Delete on your keyboard.
  2. Click Add generic action Add generic action icon.png in the workflow toolbar. An unconfigured generic action appears in the workflow.
  3. Move the action into place after the Open Browser action.
  4. Name the action Provide DUNS.
  5. Click the Provide DUNS action to select it.
  6. Click the list icon List icon. The action configuration window displays.
  7. In the Modules section of the Actions tree, click Browser > Interact with element. The right-hand pane displays the parameters you’ll need to configure.
  8. Configure the following CONFIGURATION parameters:

    Parameter

    Action

    Selector

    • Select Name from the Selector dropdown list.
    • Enter the following as the selector value: fapiisSearch.duns

      Note: The selectors in the dropdown list correspond to standard Selenium By classes. Selenium By classes act as identifiers or “labels” for elements in a web page. In this case, the FAPIIS search form uses this Name class to identify this element.

      Curious how we got this value? Check out the source code of the FAPIIS web page using your browser’s developer tools.

    Select the interaction type

    • Select Update value from the dropdown list.
    • In the text box, enter: 878504856

    We’re adding an update value temporarily so we can test the robotic process independently. Later, we’ll remove this value so the robotic process can integrate with the Appian process model.

  9. Leave any other parameters unchanged.

    For example:

  10. Click OK to return to the workflow.
  11. Add a transition arrow from the Open Browser action to Provide DUNS action.
  12. Click SAVE CHANGES in the toolbar.

    As a shortcut, press CTRL + S (Windows) or Command + S (Mac) instead.

    Oh, no! The warning dialog caused by the missing transition arrows displays.

  13. Let’s ignore that for now. Click OK to dismiss the message.

    Typically, it’s not a good idea to ignore a warning message. In this case, however, we know that the tutorial will walk you through adding the rest of the transition arrows you need for a finished workflow.

Add the Click Search action

Where? Appian RPA

Next we need to click the Search button on the FAPIIS search form.

To add this action to the workflow:

  1. Click Add generic action Add generic action icon.png in the workflow toolbar. An unconfigured generic action appears in the workflow.
  2. Move the action into place after the Provide DUNS action.
  3. Name the action Click Search.
  4. Click the Click Search action to select it.
  5. Click the list icon List icon. The action configuration window displays.
  6. In the Modules section of the Actions tree, click Browse > Interact with element. The right-hand pane displays the parameters you’ll need to configure.
  7. Configure the following CONFIGURATION parameters:

    Parameter

    Action

    Selector

    • Select XPath from the Selector dropdown list.
    • Enter the following as the selector value:

      //*[@id="indexform_button"]

    Select the interaction type

    Select Click on element from the dropdown list.

    Unlike the Unique Entity ID (DUNS) element, the FAPIIS search form doesn’t use a specific Selenium By class to identify the Search element. Instead, we must use the XPath class value. The XPath class uses the XML Path Language to capture the exact location of the specified element in the web page, which is why the value isn’t very human-readable.

  8. Configure the following AFTER COMPLETION parameters:

    Parameter Action
    Wait before executing next action (seconds) Enter 2 to give the web page adequate time to load.
  9. Leave any other parameters unchanged.

    For example:

  10. Click OK to return to the workflow.
  11. Add a transition arrow from the Provide DUNS action to Click Search action.
  12. Click SAVE CHANGES in the toolbar.
  13. Click OK to dismiss the warning message.

Add the Search Success? action

Where? Appian RPA

Next, we need to determine whether the search was successful. We do that by telling the robotic process to look for the title of the window that we’d expect to display. We’ll use a conditional action to specify what the robotic process should do if the window title appears as expected — and what to do if it doesn’t appear.

To add this action to the workflow:

  1. Click Add conditional action Add conditional action icon in the workflow toolbar. An unconfigured conditional action appears in the workflow.
  2. Move the action into place after the Click Search action.
  3. Name the action Search Success?.
  4. Click the Search Success? action to select it.
  5. Click the list icon List icon. The action configuration window displays.
  6. In the Modules section of the Actions tree, click Browser > Wait for window title. The right-hand pane displays the parameters you’ll need to configure.
  7. Configure the following CONFIGURATION parameters:

    Parameter Action
    Window title Enter: *Summary of All Reports*
    Wait time Leave unchanged.
    Interaction Select Activate window once found.
    Fail if … Select window title doesn’t match.
  8. Leave any other parameters unchanged.

    For example:

  9. Click OK to return to the workflow.
  10. Add a transition arrow from the Click Search action to Search Success? action.

    You’ll configure the outcome arrows for this conditional action after you’ve added the next two actions.

  11. Click SAVE CHANGES in the toolbar.
  12. Click OK to dismiss the warning message.

Add the Get CAGE action

Where? Appian RPA

This action writes the CAGE code from the results web page to the vendorInfo robotic process variable, so that the value can be passed to the Appian process model later.

To add this action to the workflow:

  1. Click Add generic action Add generic action icon.png in the workflow toolbar. An unconfigured generic action appears in the workflow.
  2. Move the action into place after the Search Success? action.
  3. Name the action Get CAGE.
  4. Click the Get CAGE action to select it.
  5. Click the list icon List icon. The action configuration window displays.
  6. In the Modules section of the Actions tree, click Browse > Get attribute. The right-hand pane displays the parameters you’ll need to configure.
  7. Configure the following CONFIGURATION parameters:

    Parameter

    Action

    Selector

    • Select XPath from the Selector dropdown list.
    • Enter the following as the selector value:

      /html/body/div/main/div/article/section/div[2]/table[1]/tbody/tr/td/div[5]

    Attribute to Return

    Select Text.

    As with the Search button on the search form, the summary web page doesn’t use a specific Selenium By class to identify the CAGE element. So, again, we’re using the XPath selector here.

    The CAGE element is present in the summary page as a string that contains both the label and value, so we need to handle it as text.

  8. Configure the following OUTPUT parameters:

    Parameter

    Action

    Operator

    Keep is stored as.

    Target

    • Enter the following (including the period): vendorInfo.

      As you type, a list displays, containing the fields in the vendorInfo robotic process variable.
    • Select vendorInfo.cage.
  9. Leave any other parameters unchanged.

    For example:

  10. Click OK to return to the workflow.
  11. Configure the outcome of the Search Success? action if it returns a “true” value:
    • Add a transition arrow from the Search Success? action to the Get CAGE action.
    • Double-click the transition arrow you just added. A text box appears.
    • Enter true. This value is case-sensitive.
    • Click away from the text box to save the label.
  12. Click SAVE CHANGES in the toolbar.
  13. Click OK to dismiss the warning message.

Add the Close Browser action

Where? Appian RPA

This action will make sure we return the resource to a neutral state by closing the browser we opened.

To add this action to the workflow:

  1. Click Add generic action Add generic action icon.png in the workflow toolbar. An unconfigured generic action appears in the workflow.
  2. Move the action into place after the Get CAGE action.
  3. Name the action Close Browser.
  4. Click the Close Browser action to select it.
  5. Click the list icon List icon. The action configuration window displays.
  6. In the Modules section of the Actions tree, click Browse > Close browser. The right-hand pane displays the parameters for the method.
  7. Leave all parameters unchanged.

    For example:

  8. Click OK to return to the workflow.
  9. Add a transition arrow from the Get CAGE action to the Close Browser action.
  10. Add a transition arrow from this action to the End action.
  11. Configure the outcome of the Search Success? action returns a “false” value:
    • Add a transition arrow from the Search Success? action to the Close Browser action.
    • Double-click the transition arrow you just added. A text box appears.
    • Enter false. This value is case-sensitive.
    • Click away from the text box to save the label.
  12. Click SAVE CHANGES in the toolbar.

Verify your finished workflow

Here’s what your finished workflow should look like:

Test your robotic process

Where? Appian RPA

Before we configure an Appian process model to call the robotic process you just created, let’s make sure it works as expected.

To test the robotic process:

  1. In the robotic process configuration, click Execute Execute icon in the page toolbar.
  2. Select the following execution options:

    Option Action
    Resource Select the resource that your administrator provided you.
    Testing? Select this check box.
  3. Leave all other parameters unchanged.
  4. Click Execute Execute icon in the toolbar.

    The agent downloads the robotic process and its dependencies to the resource and starts the execution. The List of Executions page displays.
  5. Wait for Success icon to appear in the Result column of the robotic process.

    You’ll probably need to refresh the page to see the column update.

  6. Click the execution.
  7. Click the Results tab.
  8. Find the Variables section.
  9. Verify that the vendorInfo.cage variable has a Value of “CAGE: 1XKB7”.

    For example:

    Variables section from Results tab

    The stored CAGE value includes the full string retrieved from the summary web page, which includes the label “CAGE:”. Later, we’ll be using an expression rule in the process model to extract only the CAGE code from the string.

Prepare your robotic process for integration

Where? Appian RPA

We’ve had you configure certain parts of the robotic process so that you could test the robotic process independently. Now, we’re going to adjust that configuration, so the robotic process can receive input from and send output to an Appian process model.

To prepare the robotic process for integration in an Appian process model:

  1. In the Results tab of the execution, click Configure Configure icon in the toolbar.
  2. In the Robotic process variables section, select Parameter? for the vendorInfo variable.
  3. In the Workflow section, select the Provide Duns action.
  4. Click the list icon List icon. The action configuration window displays.
  5. Configure the following parameter:

    Parameter

    Action

    Select the interaction type

    • In the first box, keep Update value selected.
    • In the second box, remove the value you entered for testing purpose.
    • Enter the following (including the period): vendorInfo.

      As you type, a list of fields in the vendorInfo CDT appears.
    • Select vendorInfo.duns.
  6. Click OK to return to the workflow.
  7. Click SAVE CHANGES in the toolbar.
  8. Close Appian RPA.

Part 2: Build a process model

In this part of the tutorial, you’ll build a process model and supporting objects in Appian Designer.

Create folders for design objects

Where? Appian Designer

You’ll need folders to store interface, integration, and process model objects in your Appian application.

For each of these folders, perform the following steps:

  1. Go back to the Retrieval Process Tutorial application view that you left open in Part 1 of this tutorial.
  2. In the application toolbar, click NEW > Folder.
  3. Configure the appropriate parameters:

    Folder Name Type Folder Description Parent Folder
    RPT Interfaces Keep the default setting, Rule Folder. Contains interfaces for the Retrieval Process Tutorial application Leave blank.
    RPT Integrations Keep the default setting, Rule Folder. Contains integrations for the Retrieval Process Tutorial application Leave blank.
    RPT Process Models Select Process Model Folder. Contains process models for the Retrieval Process Tutorial application Leave blank.

    For example:

  4. Click CREATE. The Review Rule Folder Security window displays.
  5. Select permissions:

    Folder Permissions
    RPT Interfaces Select Viewer permissions for the Default (All Other Users) group and Administrator permissions for your account.
    RPT Integrations Select Viewer permissions for the Default (All Other Users) group and Administrator permissions for your account.
    RPT Process Models Select Administrator permissions for your account. For the Default (All Other Users) group, the default permission of No Access cannot be changed.
  6. Click SAVE. The system creates the folder and returns you to the application view.

Create an Execute Robotic Process integration

Where? Appian Designer

You’ll need to create integrations to call the robotic process from the process model.

To create these integrations:

  1. In the application view, click NEW.
  2. Select Integration.
  3. Configure the following parameters:

    Parameter Action
    Use a connected system Leave selected.
    Connected System Select the connected system your administrator created.
    Operation Select Execute Robotic Process.
    Name Enter: RPT_Retrieve_Vendor_Info
    Description Enter: Integration to run a robotic process as part of the Retrieval Process Tutorial application
    Save In Select RPT Integrations.
  4. Click CREATE. The integration configuration page displays.
  5. Add a rule input:

    • Click the expand arrow on the right edge of the page to expand the Rule Inputs pane.
    • In the Rule Inputs pane, click New Rule Input New Rule Input. A new rule input row displays.
    • Configure the following parameters:

    Parameter

    Action

    Name

    Enter: RPT_FAPIIS_Info

    Type

    • Enter RPT. As you type, a list of available CDTs displays.
    • Select the RPT_FAPIIS_Info CDT.
  6. In the left pane, configure the following parameters:

    Parameter

    Action

    Connected System

    Leave unchanged.

    Operation

    Leave unchanged.

    Robotic Process

    Select the robotic process you created, RPT-FAPIIS-retrieval.

    Resource

    Select the resource your administrator provided you.

    Description

    Enter: Execution triggered through Appian process model

    Priority

    Leave unchanged.

    Parameters

    • In the RPT_FAPIIS_Info row, click Edit as Expression.
    • Enter ri!RPT_FAPIIS_Info.
    • Click OK.
  7. Click TEST REQUEST. In the Result pane, a Success! message displays.

    If a Success! message does not display, contact your administrator about the connected system you were provided.

  8. Click SAVE CHANGES in the toolbar.
  9. Close the integrations object.

Create a submission form

Where? Appian Designer

This basic interface allows you to submit the DUNS number of the vendor you want the process to look up on the FAPIIS website.

To create the submission form:

  1. In the application view, click NEW > Interface.
  2. Configure the following parameters:

    Parameter Action
    Name Enter: RPT_RetrieveCAGE
    Description Enter: Form to initiate FAPIIS information retrieval based on DUNS number
    Save In Select the RPT Interfaces folder.
  3. Click CREATE.
  4. In the templates panel, scroll down to the Builders section.
  5. Click Create from Data Type.
  6. Select the RPT_FAPIIS_Info CDT in the Data Type box.
  7. Click the Editing Data card.
  8. Click GENERATE.

Configure the submission form

Where? Appian Designer

To configure the submission form:

  1. In the new interface you created, replace the default interface title:
    • Double-click the title.
    • Enter Retrieve CAGE Code.
  2. Select the Form Layout component in the editor.
  3. In the Component Configuration pane, enter the following in the Instructions parameter: Use this form to automatically retrieve a vendor's CAGE code from FAPIIS.

  4. Double-click the label on the Duns text component, then enter DUNS to replace the default label.
  5. Remove the Cage text component and Cancel button component. You won’t be using those components in this tutorial.
    • Click the component to select it.
    • Click down arrow next to the component label.
    • Select Delete in the dropdown menu.

      It isn’t best practice to remove the Cancel button, but we don’t need that component for this tutorial.

  6. Remove the system-generated rule input you won’t be using in this tutorial.
    • In the Rule Inputs pane, click the cancel input.
    • Click Delete.
  7. Click SAVE CHANGES in the toolbar.
  8. Close the interface object.

Create a process model

Where? Appian Designer

A process model is the primary tool in Appian for describing a workflow. For this tutorial, our process model will incorporate the robotic process we created earlier.

To create this process model:

  1. In the application toolbar, click NEW > Process Model. The Create Process Model window displays.
  2. Configure the following parameters:

    Parameter Action
    Create from scratch Keep this selection.
    Name Enter: RPT Retrieve CAGE
    Description Enter: Retrieves a vendor's CAGE code from fapiis.gov
    Save In Leave this parameter unchanged. By default, the RPT Process Models folder you created earlier is selected.

    For example:

  3. Click CREATE. The Review Process Model Security window displays.
  4. Select Administrator permissions for your account.

    For the Default (All Other Users) group, the default permission of No Access cannot be changed.

  5. Click SAVE. The Appian Process Modeler page displays.

Configure the process start form

Where? Appian Designer

Our workflow starts with submitting the DUNS number for the vendor you want to research, so we’ll use the RPT_SubmitDUNS interface as the process start form.

This approach also saves us time, because Appian automatically creates process variables based on the rule inputs from that form. Process variables make it possible to transfer data retrieved by the robotic process to other nodes in the Appian process model, which can then write that data to the Appian Cloud database.

To configure the process start form:

  1. In the Appian Process Modeler page, click File > Properties in the menu bar. The process properties window displays. By default, the General tab is active.
  2. Go to the Process Start Form tab.
  3. Leave Select an Interface selected.
  4. In the text box, enter RPT.
  5. Select RPT_RetrieveCAGE when it displays in the dropdown list.
  6. Click Yes to create process variables based on rule inputs from the submission form.

  7. Click OK to return to the process model.
  8. In the menu bar, click File > Save & Publish.
  9. Test your interface:
    • In the menu bar, click File > Start Process for Debugging.
    • In the Vendor box, enter Appian Corporation.
    • In the DUNS box, enter 878504856.
    • Click SUBMIT. The monitoring tab for the process displays.
    • Click Refresh Refresh icon in the toolbar to advance the process to the End node.
    • Click Process Details in the toolbar.
    • In the Process History tab, verify that the process variable populated successfully. In this case, the vendor and duns fields in the RPT_FAPIIS_Info variable contain the information you entered in the submission form.

      The entries in the process history represent a chronological record of the tasks the process model performed. Read the log from top to bottom.

    • Click CLOSE.
  10. Close the monitoring tab.

Add the Update Database from Form node

Where? Appian Designer

Once the submission form is submitted, we’ll want to save the information to the Appian Cloud database using a Write to Datastore Entity smart service in the process model.

To add this node:

  1. In the smart service search bar, enter Write to Data Store Entity.
  2. Click, then drag Write to Data Store Entity from the search results to the flow connector between the Start and End nodes.

    While you’re dragging the node, the flow connector will appear blue if you’re placing the node correctly. After you place the node correctly, the single flow connector becomes two distinct arrows (one going to and one going from the newly-placed node).

  3. Double-click the Write to Data Store Entity node.
  4. In the General tab:
    • Configure the following parameters:

      Parameter Action
      Name Enter: Update Database from Form
      Description Enter: Updates the RPT_FAPIIS_Info table with form input
    • Leave any other parameters unchanged.

      For example:

  5. Go to the Data tab. By default, the Inputs tab is active.
  6. In the Node Inputs pane, configure the Data Store Entity input:
    • Click Data Store Entity. The related field properties display in the right pane.
    • Configure the following parameters in the Field Properties pane:

      Parameter

      Action

      Value

      • Click the Directory icon next to the field.
      • Browse to and select the RPT_FAPIIS_Info CDT.
    • Leave any other parameters unchanged.

      For example:

  7. In the Node Inputs pane, configure a new input:
    • Click New Input. The Param# input displays beneath the Data Store Entity input, and the related field properties display in the right pane.
    • Configure the following parameters in the Field Properties pane:

      Parameter

      Action

      Name

      Enter updateFromForm.

      Type

      • Click the Directory icon next to the field.
      • Browse to and select the RPT_FAPIIS_Info CDT you created.

      Value

      • Click the Expression editor icon next to the field. The Expression Editor window displays, and the Data tab is active by default.
      • In the Process Variables section of the tree, click the RPT_FAPIIS_Info process variable you created.
      • Verify that the following expression displays in the expression box: pv!RPT_FAPIIS_Info
      • Click SAVE AND CLOSE to return to the Inputs tab.
    • Leave any other parameters unchanged.

      For example:

  8. Configure the node outputs:
    • Go to the Outputs tab.
    • In the Results section of the outputs tree, click Stored Values. The results properties display in the right pane.
    • In the Target field, select the RPT_FAPIIS_Info process variable.
    • Leave all other properties unchanged.

      For example:

  9. Click OK to return to the process model.
  10. In the menu bar, select File > Save & Publish.
  11. Test the node:
    • In the menu bar, click File > Start Process for Debugging.
    • In the Vendor box, enter Appian Corporation.
    • In the DUNS box, enter 878504856.
    • Click SUBMIT. The monitoring tab for the process displays.
    • Click Refresh Refresh icon in the toolbar to advance the process to the End node.
    • Click Process Details in the toolbar.
    • In the Process History tab, verify that the id field in the process variable populated successfully, as described below.

      Currently, your process model updates the RPT_FAPIIS_Info variable twice — the first time when you submit the form, the second time after the system updates the database. The second update contains the unique key that the system generated when it added the new row to the database (the id field).

      In this case, the id field value is 1, which confirms that the process successfully wrote the data to the first row of the rptfapiisinfo table in the Appian Cloud Database.

    • Click CLOSE to return to the monitoring tab.
  12. Close the monitoring tab.

Add the Execute Robotic Process node

Where? Appian Designer

Now we’ll incorporate the RPT-FAPIIS-retrieval robotic process using the Execute Robotic Process smart service.

To add this node to the process model:

  1. In the smart service search bar, enter Execute Robotic Process.
  2. Click, then drag Execute Robotic Process from the search results to the flow connector between the Update Database from Form and End nodes.
  3. Double-click the Execute Robotic Process node.
  4. In the General tab, do the following:
    • Configure the following parameter:

      Parameter Action
      Description Enter: Initiates the RPT Retrieve FAPIIS Information robotic process
    • Leave any other parameters unchanged.

      For example:

  5. In the Setup tab:

    • Configure the following parameter:

      Parameter Action
      Select RPA Integration Select the RPT_Retrieve_Vendor_Info integration you created earlier.
    • Leave any other parameters unchanged.

      For example:

  6. Go to the Data tab. By default, the Inputs tab is active.

    By default, the inputs include an input that matches the rule input you created in the integration. If the default input is missing, make sure you’ve correctly configured and saved your integration before continuing.

  7. In the Node Inputs pane, configure the node inputs:
    • Click the RPT_FAPIIS_Info input. The related field properties display in the right pane.
    • Configure the following parameter in the Field Properties pane:

      Parameter

      Action

      Value

      • Click the Expression editor icon next to the field. The Expression Editor window displays, and the Data tab is active by default.
      • In the Data tab, expand the Process Variables section of the tree.
      • Click the RPT_FAPIIS_Info process variable.
      • Verify that the following displays in the expression box: pv!RPT_FAPIIS_Info
      • Click SAVE & CLOSE to return to the Inputs tab.
    • Leave all other parameters unchanged.

      For example:

  8. Configure the node outputs:
    • Go to the Outputs tab.
    • Click New Custom Output. Expression properties display in the right pane.
    • Configure the following parameters in the Expression Properties pane:

      Parameter

      Action

      Expression

      The robotic process returns a variables map that includes all robotic process variables in a nested format. Even though we added only one robotic process variable earlier, we still have to specify the part of the map that contains that variable, so we can write it to our process model variable. To do that, we use the expression described below.

      To configure this expression:

      • Next to the Expression field, click the Expression editor icon. The Expression Editor window displays.
      • Expand the Activity Class Parameters tree.
      • Click Variables.
      • Verify that the following displays in the expression box: ac!Variables
      • Add the name of the robotic process variable to the end of the expression, as follows: ac!Variables.vendorInfo
      • Click SAVE & CLOSE to return to the Outputs tab.

      Operator

      Leave unchanged.

      Target

      This parameter specifies the process variable where you want to save the data returned in the robotic process variable.

      To configure this parameter:

      • Click the box to display the dropdown list of available targets.
      • Select the RPT_FAPIIS_Info process variable.

    For example:

  9. Click OK to return to the process model.
  10. In the menu bar, click File > Save & Publish.
  11. Test the node:
    • In the menu bar, click File > Start Process for Debugging.
    • In the Vendor box, enter Appian Corporation.
    • In the DUNS box, enter 878504856.
    • Click SUBMIT. The monitoring tab for the process displays.
    • Click Refresh Refresh icon in the toolbar to advance the process to the End node.

    There will be a short delay when the process reaches the Execute Robotic Process node while the robotic process finishes running on the resource.

    • Click Process Details in the toolbar.
    • In the Process History tab, verify that the process variables populated successfully. In this case, the cage field in the RPT_FAPIIS_Info variable contains the CAGE string returned by the robotic process.

    • Click CLOSE to return to the monitoring tab.
  12. Close the monitoring tab.

Add the Extract Code node

Where? Appian Designer

Because of the way the FAPIIS web page is constructed, the retrieved CAGE string includes the “CAGE:” label. We’ll use a Script Task node to extract only the CAGE code from the string, so we can write the code to the database.

To add this node:

  1. In the smart service search bar, enter Script Task.
  2. Click, then drag Script Task from the search results to the flow connector between the Execute Robotic Process and End nodes.
  3. Double-click the Script Task node.
  4. In the General tab, configure the following parameters:

    Parameter Action
    Name Enter: Extract Code
    Description Enter: Extracts the CAGE code from the CAGE string returned by the robotic process
  5. Leave any other parameters unchanged.

    For example:

  6. Go to the Data tab. The Inputs tab is active by default.
  7. Click New Input. The Param# input displays, including related field properties in the right pane.
  8. Configure the following parameters:

    Parameter

    Action

    Name

    Enter: extractCode

    Type

    • Click the Directory icon next to the field.
    • Browse to and select the RPT_FAPIIS_Info CDT you created.

    Value

    • Click the Expression editor icon next to the field.
    • In the Process Variables section, click the RPT_FAPIIS_Info process variable.
    • Verify that the following displays in the expression box: pv!RPT_FAPIIS_Info
    • Click SAVE & CLOSE to return to the Inputs tab.
  9. Leave any other parameters unchanged.

    For example:

  10. Go to the Outputs tab.
  11. Click New Custom Output. The expression properties display in the right pane.
  12. Configure the following parameters:

    Parameter

    Action

    Expression

    We need this expression to extract just the CAGE code, which is the last 5 characters of the string.

    To configure this parameter:

    • In Expression field, enter: right(pv!RPT_FAPIIS_Info.cage, 5)
    • Click SAVE & CLOSE to return to the Inputs tab.

    Operator

    Leave unchanged.

    Target

    Specify the field in the process variable where we want to save the extracted CAGE code:

    • Click the box to display the dropdown list of available targets.
    • Browse to and select the RPT_FAPIIS_Info process variable, then the cage field. When selected, this value displays as RPT_FAPIIS_Info.cage.
  13. Leave any other parameters unchanged.

    For example:

  14. Click OK to return to the process model.
  15. In the menu bar, click File > Save & Publish.
  16. Test the node:
    • In the menu bar, click File > Start Process for Debugging.
    • In the Vendor box, enter Appian Corporation.
    • In the DUNS box, enter 878504856.
    • Click SUBMIT. The monitoring tab for the process displays.
    • Click Refresh Refresh icon in the toolbar to advance the process to the End node.
    • Click Process Details in the toolbar.
    • In the Process History tab, verify that the extracted CAGE code populated the cage field in the process variable successfully.

    • Click CLOSE to return to the monitoring tab.
  17. Close the monitoring tab.

Add the Update Database from Process node

Where? Appian Designer

Now that you’ve extracted the CAGE code successfully, you’ll use the Write to Data Store Entity smart service to write the data to the rptfapiisinfo table in the Appian Cloud Database.

To add this node to the process model:

  1. In the smart service search bar, enter Write to Data Store Entity.
  2. Click, then drag Write to Data Store Entity from the search results to the flow connector between the Extract Code and End nodes.
  3. Double-click the Write to Data Store Entity node.
  4. In the General tab:
    • Configure the following parameter:

      Parameter Action
      Name Enter: Update Database from Process
      Description Enter: Updates database with data returned from the RPT Retrieve FAPIIS Information robotic process
    • Leave any other parameters unchanged.

      For example:

  5. Go to the Data tab. By default, the Inputs tab is active.
  6. Click Data Store Entity in the Node Inputs pane. The related field properties display in the right pane.
  7. Configure the following parameters in the Field Properties pane:

    Parameter

    Action

    Value

    • Click the Directory icon next to the field.
    • Browse to and select the RPT_FAPIIS_Info CDT.
    • Click OK to return to the Inputs tab.
  8. Leave any other parameters unchanged.

    For example:

  9. Click New Input. The Param# input displays beneath the Data Store Entity input, and the related field properties display in the right pane.
  10. In the Field Properties pane, configure the following parameters:

    Parameter

    Action

    Name

    Enter: updateFromProcess

    Type

    • Click the Directory icon next to the field.
    • Browse to and select the RPT_FAPIIS_Info CDT.

    Value

    • Click the Expression editor icon next to the field.
    • In the Process Variables section of the tree, click the RPT_FAPIIS_Info process variable you created.
    • Verify that the following expression displays in the expression box: pv!RPT_FAPIIS_Info
    • Click SAVE AND CLOSE to return to the Inputs tab.
  11. Leave any other parameters unchanged.

    For example:

  12. Click OK to return to the process model.
  13. In the menu bar, click File > Save & Publish.
  14. Test this node:
    • In the menu bar, click File > Start Process for Debugging.
    • In the Vendor box, enter Appian Corporation.
    • In the DUNS box, enter 878504856.
    • Click SUBMIT. The monitoring tab for the process displays.
    • Click Refresh Refresh icon in the toolbar to advance the process to the End node.
    • Click Process Details in the toolbar.
    • In the Process History tab, verify that the Update Database from Process node ran successfully.

    • Click CLOSE to return to the monitoring tab.
  15. Close the monitoring tab.

Verify your finished process model

Where? Appian Designer

Here’s what your finished process model should look like:

Finished process model

Once you’ve verified your process model, you can close the Appian Process Modeler page.

Part 3: Build user views

In this part of the tutorial, we'll use Appian Records to create user-facing components that enable users to:

  • Initiate the CAGE retrieval process.
  • View the results of the CAGE retrieval process.

From the record type, you'll create a record action that allows users to submit a DUNS number, and configure the record list so users can view all vendor records in a grid with out-of-the-box search and sorting capabilities. Since our record type will be configured with data sync enabled, we can automatically generate a Summary view of our data.

Create a record type

Where? Appian Designer

You’ll create a record type to easily view and manage the retrieved vendor information.

To create a record type:

  1. In the application toolbar, click NEW > Record Type.
  2. Configure the following parameters:

    Parameter Action
    Name Enter: RPT_Vendor
    Plural Name Leave unchanged. This value defaults to RPT_Vendors.
    Description Enter: Stores vendor information in the Retrieval Process Tutorial

    For example:

  3. Click CREATE. The Review Record Type Security window displays.
  4. Select Viewer permissions for the Default (All Other Users) group and Administrator permissions for your own account.
  5. Click SAVE. The record type view displays.
  6. Click TELL US ABOUT YOUR DATA.
  7. Choose your source type:
    • Click Database.
    • Select Sync in Appian.

  8. Click NEXT.
  9. Select rptfapiisinfo as your database table.

  10. Click NEXT.
  11. Leave the Configure Source Filters parameters unchanged. We don’t need source filters in this tutorial.

  12. Click NEXT.
  13. Keep the default fields selected.

  14. Click FINISH. The Data Model page displays.
  15. Click SAVE CHANGES in the toolbar.

Add the Search DUNS record action

Where? Appian Designer

Now that we've created a record, let's add a record action that allows us to add a new vendor easily while viewing the record list.

To add the record action:

  1. In your record type, go to List.
  2. Click New Action.
  3. Configure the following parameters:

    Parameter Action
    Display Name Enter: Search DUNS
    Key Leave unchanged. This value defaults to a key based on the Display Name you entered.
    Description Enter: Add a vendor's DUNS and retrieve the vendor's CAGE code from FAPIIS
    Icon Leave unchanged.
    Process Model Select RPT Retrieve CAGE.
    Visibility Leave unchanged. This value automatically populates based on the process model you selected.

    For example:

  4. Click OK to return to the record type view.
  5. Click SAVE CHANGES in the toolbar.

Define the Summary record view

Where? Appian Designer

The Summary record view will allow us to view the data returned by the robotic process. Because our record type has data sync enabled, we can generate a Summary view interface from the record type, rather than create the interface manually. When you generate a Summary view interface this way, the system also automatically configures the record type to use that interface as the Summary view.

To generate the Summary view interface:

  1. In your record type, go to Views.
  2. In the Views page, click GENERATE INTERFACE.
  3. Configure the following parameters:

    Parameter Action
    Name Keep the default name (RPTVendor_summaryView).
    Description Enter: Summary view of RPT Vendor record
    Application Leave this parameter unchanged. By default, the current application is selected.
    Save In Select RPT Interfaces.
  4. Click CREATE. The system creates and opens an interface. This interface contains a layout of read-only fields from the record type.
  5. (Optional) To make the summary more readable:
    • Rename the Duns field as DUNS.
    • Click on the DUNS field, then drag it into the first column, beneath the Vendor field.
    • Rename the Cage field as CAGE.
    • Click SAVE CHANGES in the toolbar.
  6. Close the RPTVendor_summaryView interface object.
  7. Return to your record type object.

    Because we generated the Summary view interface automatically, the generated view is configured as the view and displays in the Interface column of the Summary view listing.

  8. Click SAVE CHANGES in the toolbar.
  9. Close the record type object.

Create a site

Where? Appian Designer

Now we need to create a website where users can view the vendor information and initiate the CAGE code retrieval process.

To create a site:

  1. In the application toolbar, click NEW > Site.
  2. Configure the following parameters:

    Parameter Action
    Name Enter: Vendor Information
    Description Enter: Allows users to interact with and view vendor information in the Retrieval Process Tutorial application
    Web Address Identifier Leave unchanged. This value defaults to vendor-information.
  3. Click CREATE. The Review Site Security page displays.
  4. Select Viewer permissions for the Default (All Other Users) group and Administrator permissions for your user account.
  5. Click SAVE. The Vendor Information page displays.
  6. In the Pages section, click Add Page.
  7. Configure the following parameters:

    Parameter Action
    Title Enter: Vendors
    Web Address Identifier Leave unchanged. This defaults to vendors based on the title you entered.
    Icon Select an icon from the dropdown list.
    Type Select Record List.
    Content Select RPT_Vendor.
  8. Leave any other parameters unchanged.

    For example:

  9. Click OK to return to the Vendor Information page.
  10. Click SAVE CHANGES in the toolbar.

Test your site

Where? Appian Designer

To test your site:

  1. On the Vendor Information page, click the URL in the Web Address value.
  2. In the Vendors page, view the list of vendors.

    For example:

    Vendors page in the new site

    Weird! What’s with these duplicate entries? They’re the result of our repeated tests during the design process. The earlier rows were created before we added the Update from Process node to the process model. The last row in the table represents the last time you ran the finished process, which is why it contains complete data.

  3. Add a new vendor:
    • Click SEARCH DUNS.
    • In the Vendor box, enter Appian Corporation.
    • In the DUNS box, enter 878504856.
    • Click SUBMIT. The system returns you to the Vendors page.
    • Click Refresh Refresh icon until the new row for the vendor you added appears, then again until the CAGE column for the new row populates. Remember that there will be a short delay while the robotic process finishes on the resource.
  4. Click a vendor name to view the summary view.

Success!

Congratulations on finishing this tutorial!

For additional information about the design objects you created, see the Appian Designer and Appian RPA documentation.

Open in Github

On This Page

FEEDBACK