Skip to main content
You can modify the sample ABBYYFlexiCapture application to store a different type of document. To do so, create a new record type and make several other changes.

Create an infrastructure for storing and displaying data in Appian

A record type displays information from the data store in Tempo. To store and display a new type of data in Appian, build the supporting infrastructure by completing these tasks in order:
  1. Create a database table (data type).
  2. Create a data source.
  3. Create a data store.
  4. Create a record type.
  5. Create a constant of type “Data Store Entity” to link the data store and the data type.
  6. Edit the AFC_GetDataTypeByRecordTypeName and AFC_GetConstantDSEByRecordTypeName rules.
  7. Create a folder of type “Knowledge Center” to store processed files received from ABBYY FlexiCapture.

Create a data type

1

Open the ABBYYFlexiCapture application

In Appian Designer, open the ABBYYFlexiCapture application and click New → Data Type.
2

Create the data type

Select Create from scratch, complete the required Name field, and click Create & Edit.
3

Add the table fields

In the dialog box that opens, create the database table fields by clicking the New Field button. The ABBYY FlexiCapture Connector for Appian populates this table with data, and then the record loads data from this table into Appian.
The table must contain a primary key field named FolderId of type Number(Integer). This field functions as a unique primary key and links the data in the table with the knowledge center folder.
4

Add an auxiliary data type for table columns

  1. Before the data type table in Appian can accept table rows from ABBYY FlexiCapture, create an auxiliary data type for the fields that correspond to table columns in the Document Definition.
  2. Create a field in the data type, specify the name of the auxiliary data type as its type, and select the Array option.
5

Save the data type

When you have made all the necessary changes to the table, click Save.

Create a data source

1

Open the Data Sources page

Open the Appian Administration Console and click Data Sources in the Integration section on the left.
2

Start a new data source

On the Data Source Management page that opens, click New Data Source.
3

Complete the data source fields

In the Configure Data Source dialog box, complete the following required fields:
  • Name – A name for the new data source (for example, jdbc/Appian)
  • Type – The type of the new data source (for example, SQL Server)
  • Username/Password – The credentials of the database user
  • Connection String – The string used to connect to the database (for example, jdbc:sqlserver://appian.company.com:1433;databaseName=appian_db)
4

Test and save the connection

  1. Click Test Connection to check that you have entered the correct data.
  2. If the test is successful, click Save.

Create a data store

1

Open the ABBYYFlexiCapture application

In Appian Designer, open the ABBYYFlexiCapture application and click New → Data Store.
2

Name the data store

Complete the Name field and click Create & Edit.
3

Configure the data store on the Data Management tab

On the Data Management tab of the Data Store editor:
  1. Select a data source.
  2. Click the Add Entity button and add a data type.
  3. Click the Verify button to verify your data store.
  4. Click Save & Publish.

Create a record type

1

Open the ABBYYFlexiCapture application

In Appian Designer, open the ABBYYFlexiCapture application and click New → Record Type.
2

Name the record type

Complete the Name and Plural Name fields and click Create & Edit.
3

Configure the data and display

In the window that opens:
  1. In the Data section, select Data Store Entity and add your data store and your data type.
  2. Configure the display of your record list. For more information, see Configure the record list.
  3. Configure the display of the Summary tab. For more information, see Configure the record view.

Create a constant of type “Data Store Entity”

This constant links your data store to your data type. When a new record is created, this link determines the record type of the record.
1

Create a new constant

In Appian Designer, open the ABBYYFlexiCapture application and click New → Constant. The constant is created from scratch and its default type is Data Store Entity.
2

Name the constant

Specify a name for your constant. The Data Store and Data Type fields are populated by the previously created objects.
3

Save the constant

Save the changes to the default AFC Rules and Constants folder or to any other folder of your choice.

Edit the rules

Once you have added the new record type and constant, modify the expression rules by adding conditions for the new record type.
1

Open the AFC_GetConstantDSEByRecordTypeName rule

  1. In Appian Designer, open the ABBYYFlexiCapture application and select Expression Rule in the left-hand pane.
  2. Locate and click the AFC_GetConstantDSEByRecordTypeName rule to start editing it.
2

Add the condition for the new constant

In the code editor, replace null with the following if condition for the new record type and constant:
If an input RecordTypeName is the same as the name of a stored record type (in the plural), the DataStoreEntity constant that links the data store and the data type is returned.
3

Edit the AFC_GetDataTypeByRecordTypeName rule

  1. In Appian Designer, open the ABBYYFlexiCapture application and select Expression Rule in the left-hand pane.
  2. Locate and click the AFC_GetDataTypeByRecordTypeName rule to start editing it.
  3. In the code editor, replace null with the following if condition for the new record type and the full name of the data type:
If an input RecordTypeName is the same as the name of a stored record type (in the plural), a string that contains the full name of the data type you created is returned. You can look up the namespace in the data type properties. To display the properties of a data type, open the data type in the ABBYYFlexiCapture application. Clicking the name of the data type in the top left corner opens the Data Type Properties window, where you can see the namespace.

Create a knowledge center

To store document images in Appian, create a knowledge center folder.
1

Open the ABBYYFlexiCapture application

In Appian Designer, open the ABBYYFlexiCapture application and click New → Folder.
2

Create the Knowledge Center folder

Select Knowledge Center as the type for your folder, complete the Knowledge Center Name, and click Create.
The ID of this folder is passed in the Repository field of the ABBYY FlexiCapture Connector for Appian export script settings. When data is exported from ABBYY FlexiCapture, image files are saved to this folder.
You can look up the ID of a knowledge center on the Runtime Data tab of the Knowledge Center Properties dialog box.