Document Processing templates and toolkits

You use toolkits to develop your application. The toolkits are associated with the templates that are provided in Application Designer.

Templates

There are two templates in IBM Automation Document Processing, and each one provides you with a number of pages that you can add to your application:
Document Processing template
Contains the following pages:
  • Starting Page
  • Verify Page
Batch Document Processing template
Contains the following pages:
  • Extraction issues
  • Classification issues
  • Classify
  • Data list
  • Review batch
  • Start
  • Update batch
  • Verify data
When you create an application with one of the templates, you must set the application configuration settings:
Environment variable Description
Document Processing URL:

evACAContextUrl

The location of your deployed Document Processing component.
Project ID:

evDbaProjectId

The identifier of the project that you created in Document Processing Designer.
Discard JSON after verifying:

evDiscardJSONAfterVerify

Set this option to true if you want to persist extracted metadata from Document Processing into an attachment after the documents (single or batches) are finalized. The metadata are stored as JSON format.
Help URL:

evHelperUrl (For batch template only)

The link to external help, which is available from the Start page and that you can customize as you need.
Repository name:

evObjectStoreName

The object store symbolic name of the content repository where your application is deployed.
Root home:

evRootHomeName (For batch template only)

The breadcrumb root name of your application.
Root folder:

evRootFolder (For single document processing template only)

The path to the project root folder for documents that you store in the repository. You must specify a existing folder in the repository. This setting is required for document processing applications.

Both templates use the toolkits that are described in the following sections. Toolkits contain components, or views, that you can add to the pages in your application.

Document Processing toolkit

Document Correction
You use this view to display the document list and the documents' content, in a batch application only. This page is where the user sets the correct document type, if the automatic classification encountered problems. The view includes a document viewer and a document list.

If all documents are classified properly by the Event Handler, the batch bypass the page and starts the data extraction.

Data Verification
You use this view to display the content of a document and its extracted data (key value pairs), in a batch or a single application. This page is where the user corrects issues with the extracted key value pairs, and corrects the document type for single applications. When the document type is updated, the document is reprocessed by the Event Handler.

The view includes a document viewer and a field pane.

Content Services toolkit

Content list

The Content list is a general component that you can use to display folder contents, search results, batches, batch documents, or a list of specific documents. It includes a breadcrumb for folder navigation, a toolbar, menus, and paging controls. When you configure the content list for search results, it can also display a search property filter control at run time. The Content list is built upon the Service Data Table component that comes from the UI toolkit that is delivered with the application development environment in Business Automation Studio.

The Content list provides a general list of content management actions that can be performed on the documents, folders or batch objects. You can call them either from the Add button on the toolbar or the menu per row. You can add custom actions to both drop-down menus. The Content Services toolkit includes many action services that are internally wired up to the content list to provide the data and behavior it must render. These action services make GraphQL calls through the Application Engine server to the Content Engine server. The GraphQL calls return response data in JSON format, which the toolkit components use to render.

Configuration

The Content list component has a view configurator that is displayed when you open the Properties dialog to modify the configuration settings. This dialog contains the following categories of settings:
  • Display options: Affect the way the Content list view renders.
  • Folder: Select a folder to populate the List view.
  • Search: Specify query parameters to populate the List view and filter configuration.
  • Actions: Control the display of the toolbar and menu actions.
  • Advanced: Miscellaneous and document processing specific options.
Content properties

You can use the Content properties component to display and edit content properties. It displays the custom properties that are assigned to the class type of the object being investigated. This component uses a vertical display for the list of properties with the labels above the values, which is intended for taller vertical areas, and is typically displayed to the right of the Content list. During the design of your application, you can configure whether to allow the end user to edit the properties. If you do allow it, the application displays the appropriate buttons on the toolbar at the top of the component. In edit mode, the property picker controls recognize the data type of the properties and present the appropriate picker and validation logic, and you can see all properties that you can edit. In read-only mode, the property list displays only properties with values to minimize the display area.

To set up the loading of the Content properties component with the selection of an item from the Content list, a binding must be specified by both the Content list and the Content properties list. The binding must specify a CSContentItem object as the source in both components. At run time, when a user selects a row in the list view, the Content properties list picks up the new selection and load itself with the appropriate data. In addition, if the user edits the property values and saves the changes, the Content list picks up the new values and refreshes the row (column properties) with the new values.

Configuration

The Content Properties component also has a view configurator that is implemented for its configuration settings. This includes basic settings such as an option to display buttons for editing property values, or an option to include a time picker for date and time values.

Document thumbnail

You can use the Document thumbnail component to display document thumbnail images. The images are generated by the thumbnail AddOn in the repository. Because it is an asynchronous process, if you do not configure this component or if a thumbnail is not yet generated, the mime type icon for the document is displayed instead. In a typical scenario, you would position the Document thumbnail component to the right of the Content list view and above the Content properties list. This orientation gives the application a standard content management display and a general feature set.

Configuration

You must configure the Document thumbnail component to bind it to the CSContentItem object. With this configuration, the component can react to the row selection of the Content list view and change its display based on the item that is selected.

The document thumbnail has a single configuration option to set the repository.

File drop zone

You can use the File drop zone component to add documents to the repository. This component does not display the standard Add Document user interface element and adds a document by using the setup that is in the configuration settings. In addition, it automatically uses the file name as the Document Title property value when you add a document. The File drop zone component supports both adding documents by dragging it or by opening the local file selection control to select it from the local file system. This component also supports both single selection or multi-selection to add a document.

You can configure this component to specify a folder that all the documents are added to. If you do not specify a folder, all documents are added to the root folder. You can also specify a default document class type to use when adding the document. If you do not specify the class type, the base Document class is used.

Configuration

The File drop zone component does not have a view configurator created for its configuration settings, and you must open the Properties dialog and select the Configuration tab to see them. You can specify a folder where the end user adds documents at run time. You can specify this setting as a specific folder ID (GUID) or a folder at run time. You can also specify a document class type to use at, and here you must specify the class type ID.

Summary tile

You can use the Summary title component to display summary information. When an end user clicks this tile, it fires an event that can be handled and which invokes your custom JavaScript, for instance a page navigation event. You can set the Summary tile and details text string in the configuration settings or dynamically with a JavaScript API. In this case, more information can be retrieved first, for instance the search counts to be included as part of the details string.

The Summary tile component also includes an optional Info tooltip that you can configure to display help text and a link to external documentation.

Configuration

The Summary tile component does not have a view configurator created for its configuration settings, and you must open the Properties dialog and select the Configuration tab to see them. You can specify title and details text and whether to include the help icon. If the help icon is configured, you can include extra help text and a help link.

The following components are public JavaScript APIs that you can call and that are available from your browser. These components do not have any user interface to display:
Batch content
You can use the Batch content component to perform operations on batch objects. Batch objects are design items and used for Document Processing applications only.
Get content
You can use the Get content component to retrieve document content from the repository. You can reference it with JavaScript and it sends out an event when the content is retrieved from the server.
Search
You can use the Search component to run searches and obtain search results. The component fires an event when the search results are returned, which can be used to send results to other component views.
Upload content
You can use the Upload content component to upload document content to the repository. You can reference it with JavaScript and it sends out an event when the content is uploaded to the repository.

ViewONE Services toolkit

Modal viewer dialog

A document viewing component that appears inside a modal dialog. This dialog can be added in the Classify and Verify pages of the Batch Document Processing application, the Verify page of the Document Processing application, and can be used on its own to preview documents.

To set the viewer in the ViewONE Services toolkit, select Visibility on the right of the Application Designer page, click the Modal viewer dialog block, and select Configuration > ViewONE HTML Parameters.

To set the viewer in the Verify page, open the Verify page, select the Data Verification block and select Configuration > ViewONE HTML Parameters.

To set the parameters for the viewer in the Classify page, open the Classify page, select the Document Correction block and select Configuration > ViewONE HTML Parameters.

Configuration

You can configure the following HTML parameters to change the viewer user interface and how a document is displayed.
  • The viewmode parameter specifies the initial view mode when displaying a document, with the following values:
    • fullpage: Display the Page view, with the first page of the document visible. This is the setting by default.
    • thumbsleft: Display the Page and thumbnails view, with the thumbnails on the left side.
    • thumbsonly: Display the Thumbnails view.
    For example:
    <PARAM NAME="viewMode" value="thumbsleft">
  • The scale parameter specifies the scaling algorithm to use when displaying a document, with the following values:
    • best: The page is scaled to fit into the window area so that all of the page is visible. This is the setting by default.
    • ftow: The page is scaled so that the width of the page matches the width of the window area. This scaling might require a vertical scroll bar if the visible page height exceeds the available window height.
    • ftoh: The page is scaled so that the height of the page matches the height of the window area. This scaling might require a horizontal scroll bar if the visible page width exceeds the available window width.
    For example:
    <PARAM NAME="scale" value="ftow">

You can configure the document viewing component to bind it to the CSContentItem object. With this configuration, the viewer can react to the selection of the Content list view and change its display based on the item that is selected.