> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ABBYY FlexiCapture 12 Listener process

> Import, expose as a web service, and configure the ABBYY FlexiCapture 12 Listener process in Blue Prism to receive exported files and field data over SOAP.

The ABBYY FlexiCapture 12 Listener process is deployed on the Blue Prism side and receives the SOAP requests sent by the FlexiCapture Export Connector. Import it into Blue Prism and modify it to suit your needs.

The process consists of a single file, `BPA Process - FlexiCapture 12 Listener.xml`, which accepts and processes the SOAP requests.

## Prerequisite: run the machine as a Resource PC

To execute the Listener process, the Blue Prism machine that receives the exported files and data must be running as a Resource PC.

To check, start Blue Prism, click the **Control** tab, and confirm that the machine appears as `connected` in the **Resources** window.

If it does not, open the command prompt and run the following command:

```text theme={null}
"C:\Program Files\Blue Prism Limited\Blue Prism Automate\Automate.exe" /resourcepc /public
```

A window named `Blue Prism - Resource PC (Port 8181)` opens and shows the logs for your Resource PC. Click **Hide** to minimize it.

## Install the Listener process

Import the process file into Blue Prism and expose the resulting process as a web service.

<Steps>
  <Step title="Start the import">
    Open Blue Prism and click **File → Import**.
  </Step>

  <Step title="Select the files to import">
    Following the on-screen instructions, select the following files one by one:

    * `BPA Process - FlexiCapture 12 Listener.xml`
    * `BPA Object - Utility - File Management.xml`, a business object for working with files stored on the local hard drive, required to run the usage example. Its default location is `C:\Program Files\Blue Prism Limited\Blue Prism Automate\VBO`.
  </Step>

  <Step title="Check the import">
    After the import completes, all the business objects and the usage example appear in Blue Prism on the **Studio** tab.
  </Step>

  <Step title="Open the process exposure settings">
    On the **System** tab, expand the **Processes** node and click **Exposure**. In the top right corner of the **Process - Exposure** window, click **Expose a Process**.
  </Step>

  <Step title="Select the process">
    In the **Expose Process** dialog box, select **FlexiCapture 12 Listener** and click **Next**.
  </Step>

  <Step title="Confirm the exposed name">
    Make sure that **FlexiCapture12Listener** is specified as the exposed name of the process, and then click **Finish**.
  </Step>
</Steps>

The process appears in the list of exposed processes. To confirm that it is exposed as a web service, open the following address on the computer running Blue Prism:

```text theme={null}
http://localhost:8181/ws/FlexiCapture12Listener?wsdl
```

If the settings are correct, a WSDL file describing the web service appears.

<Note>
  The usage example already includes a request processing example. You can modify it freely, except for the parameters that the **Start** block has to accept.
</Note>

## Configure the Listener process

<Steps>
  <Step title="Open the process editor">
    On the **Studio** tab, double-click the name of the process.
  </Step>

  <Step title="Set the output folder">
    By default, the process saves received files and fields to the output folder, creating a subfolder of results for each exported document. Specify the output folder in the data item named `RootDir`.
  </Step>
</Steps>

<Warning>
  Do not change the process name or the set of input parameters. Everything else in the process can be modified freely.
</Warning>

### Input parameters

The input parameters, their names, and their data types must match those in the requests sent by the FlexiCapture Export Connector.

Open the properties of the very first element of the **Start** process and specify the data items and their values in the **Store In** column.

<a id="param" />

| Parameter                       | Description                                                                                                                         |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **DocumentDefinition**          | The name of the Document Definition that ABBYY FlexiCapture applied to the input image. Must be stored as the Text data type.       |
| **Fields**                      | A collection of objects with **Name** and **Value** text fields, holding the names and extracted values of fields.                  |
| **Files**                       | A collection of objects with a **Name** text field and a **Content** binary field, holding exported image files and their names.    |
| **BatchRegistrationParameters** | A collection of objects with **Name** and **Value** text fields, holding the names and values of the batch registration parameters. |

## Start the Listener process

The Listener process, exposed as a web service, is started by a SOAP request. The ABBYY FlexiCapture server sends that request to the address of the web service during document export.
