Skip to main content
To install the PEGA, you need to import the connector to the server and create a Java function in Pega. To import the connector to the server:
  1. 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 FlexiCaptureConnector.jar file on to the server.
  3. 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.
To create a Java function that will call methods from connector classes:
  1. Create a new library by clicking Records → Technical → Library → Create and name it, say, FlexiCaptureLibrary. Then include the following packages:
    • java.util.*
    • java.nio.file.*
    • com.abbyy.connectors.*
    • com.abbyy.connectors.models.*
    Screenshot of Pega Dev Studio editing the FlexiCaptureLibrary record on the Packages tab, listing the java.util, java.nio.file, com.abbyy.connectors, and com.abbyy.connectors.models packages to include.
  2. Click Save followed by Generate Library.
  3. Create a new function by clicking Records → Technical → Function → Create.
  4. In the Label field, provide a name for the new function (e.g. CaptureData).
  5. In the Parameters section, specify the following two input parameters:
  1. In the Library field, enter the name of the library you created in step 1 and click Create and open.
  2. In the window that opens, on the Parameters tab, specify String as the data type in Java data type field:
    Screenshot of Pega Dev Studio on the function Parameters tab, showing the FileName and Base64Content String input parameters and String selected as the Java data type in the Output section.
  3. Copy the code from the CodeExample.java file, which you can find in %Installation Path%\Connector for FlexiCapture as a Service\Samples\Pega Function (for your convenience, the code is reproduced below). While still in the same window, click the Java tab and paste the code you have just copied. This sample code sends files to FC and gets back the processing results in the form of JSON strings with the names of the captured fields and their values. The code fragments highlighted in yellow should be replaced with valid connection data required to connect to the FC Application Server. Then upload your project to the FC Application Server and configure it.
  1. Click the Imports & Exceptions tab and type Exception in the Exceptions thrown section.
  2. Go back to the Java tab, select the Function ready to be compiled? option, save your changes, and click Generate function. If the function is generated successfully, you will see this message:
Screenshot of a Pega Library Acknowledgement dialog with a Good status and the message that the Library has been generated successfully.