Skip to main content
Installing the ABBYY FlexiCapture Connector for Pega takes three parts: importing the connector, creating a library, and creating the functions that call it.

Import the connector to the Pega server

1

Open the Import wizard

Open Dev Studio and click Configure → Application → Distribution → Import.
Screenshot of Pega Dev Studio with the Configure menu open, showing the Application → Distribution → Import path being selected to import the connector.
2

Load the connector

Load the abbyy.flexicapture.webapi.client.jar file on to the server.
3

Restart the server

Open the Pega Self-Service Portal and click Restart Server.
Screenshot of the Pega Self-Service Portal Operations page with the Restart Server button highlighted to restart the application server.

Create a library

1

Start a new library

Click Records → Technical → Library → Create.
2

Name the library

On the Create Library tab, specify a name for the library in the Label field, for example ABBYY, and fill in the Identifier field.Make sure that the library is being created within the context of your application, and then click Create and open.
Screenshot of the Pega Create Library form with ABBYY entered in the Label and Identifier fields and FlexiCapture for Invoices selected as the application context.
3

Add the packages

On the Packages tab, add the following packages:
  • java.util.*
  • java.nio.file.*
  • java.net.*
  • java.lang.*
  • java.util.stream.*
  • org.apache.commons.lang3.*
  • abbyy.flexicapture.webapi.client.*
  • abbyy.flexicapture.webapi.client.api.*
  • abbyy.flexicapture.webapi.client.models.*
Screenshot of Pega Dev Studio on the library Packages tab, listing the nine Java packages to include, including the abbyy.flexicapture.webapi.client packages, alongside the Generate Library button.
4

Create the static variables

On the Static Variables tab, create the following string variables:
  • baseUri
  • tenantName
  • userName
  • password
  • multiFileProjectName
  • singleFileProjectName
Screenshot of Pega Dev Studio on the library Static Variables tab, showing the baseUri, tenantName, userName, password, multiFileProjectName, and singleFileProjectName String variables and their sample values.
5

Generate the library

Click Save, and then click Generate Library.

Create a function

A function holds Java code that runs when the function is called from other Pega objects. Specify the input and output parameters on the Parameters tab, and the exceptions on the Imports & Exceptions tab.
1

Start a new function

Click Records → Technical → Function → Create and fill in the Label and Identifier fields.
2

Select the library

In the Library field, specify the name of the library you created earlier.
3

Specify the input parameters

In the Parameters section, specify the following two input parameters:
4

Create the function

Make sure that the function is being created within the context of your application, and then click Create and open.
Screenshot of the Pega Create Function form with SendForProcessing in the Label field, the ABBYY library selected, the fileName and base64Content String parameters listed, and FlexiCapture for Invoices selected as the application context.
5

Set the output data type

In the window that opens, on the Parameters tab, specify int, string, or boolean as the data type in the Java data type field.
Screenshot of Pega Dev Studio on the function Parameters tab, showing the fileName and base64Content String input parameters and int entered as the Java data type in the Output section.
6

Declare the thrown exception

Click the Imports & Exceptions tab and type Exception in the Exceptions thrown section.
Screenshot of Pega Dev Studio on the function Imports and Exceptions tab, showing Exception entered in the Exceptions thrown section.
7

Add the code and generate the function

Go back to the Java tab and insert the code for the function in the Java source field. Select the Function ready to be compiled? option, save your changes, and then click Generate function.
Screenshot of Pega Dev Studio on the function Java tab, showing the Function ready to be compiled option selected, the Generate function button, and the Java source code that creates a FlexiCapture batch and returns its identifier.

Where the function code comes from

Copy the code for each function from the Java file in this folder:
The functions each scenario needs are listed in Create the functions for single-document processing and Create the functions for multi-document processing, along with the general functions in Create the general functions.

Next steps

For the full sequence of steps for your scenario, see ABBYY FlexiCapture as a service with verification.