Universal Viewing

Universal Viewing is a feature of the View component that automatically determines the appropriate method to use to view a file. In most cases, universal viewing uses a connector to retrieve the original file, but it can be configured to access files and web pages directly. After obtaining the original file, View uses File Content Extraction to convert the file to HTML so that it can be viewed in a web browser.

OpenText recommends universal viewing over all other viewing architectures, because:

  • Universal viewing is easy to configure, especially if you use the default field names like AUTN_IDENTIFIER for the document identifier and CONNECTOR_GROUP for the connector group name.
  • You can view documents in all repositories where the connector supports the view feature.
  • You can use View component features such as caching, viewing embedded images, and highlighting.

Architecture

Universal viewing begins when a front-end application sends a view action to the View component. The action specifies the reference or identifier of the document to view. View performs the following steps to retrieve the original file:

  1. View queries the Content component, to obtain more information about the document. Specifically, it must obtain the name of the connector group that originally retrieved the document. If the view action specified a document reference, View must also obtain the document identifier.
  2. View chooses how to obtain the original file. In most cases it uses a connector, as described in the following steps. However, depending on the information obtained from Content, and the View configuration, it might attempt to access the original file directly from a file system or web server.
  3. View sends a view action to your NiFi instance, specifying the identifier of the document and the name of the connector group that can retrieve it.
  4. The view action (now in the form of a NiFi FlowFile) is handled by the ConnectorGroupRouter, a NiFi Ingest processor that routes requests (in the form of FlowFiles) to the correct connector.
  5. The connector retrieves the original file from the data repository.
  6. Your NiFi instance provides an HTTP response to View, containing the file.

After obtaining the original file, View uses File Content Extraction to export it as HTML, and returns this HTML to the front-end application. If it was not possible to obtain the original file, the View component retrieves the document title and content from the text index and returns these instead.

Configuration

To configure universal viewing:

  • Documents must have at least one of the following fields, all of which must be configured as reference fields in Content:

    • A reference field to use to access documents through a connector. OpenText strongly recommends using the default field name: AUTN_IDENTIFIER. Connectors automatically generate the AUTN_IDENTIFIER field for each document, and this field is configured as a reference field by default. You can configure the name of this field by setting the parameter DistributedConnectorReferenceField in your View Server configuration file.  
    • A reference field to use to access documents directly from the file system, without using a connector. Using this field is optional. You can configure the name of this field by setting the parameter FileSystemReferenceField, in your View configuration file.
    • A reference field to use to access documents directly from the Web, without using a connector. Using this field is optional. You can configure the name of this field by setting the parameter WebURLField, in your View configuration file.

    TIP: During universal viewing, View uses these field values to obtain the original file. The order of precedence is: DistributedConnectorReferenceField, FileSystemReferenceField, WebURLField.

  • Any connectors you intend to use must support the View feature.
  • You must deploy NiFi Ingest, including processors to handle ACI requests and route FlowFiles to the correct connector. OpenText provides templates that make it easier to deploy this functionality. For more information about configuring NiFi Ingest to handle actions, refer to the NiFi Ingest documentation.
  • In the View configuration file, specify the host and port to use when sending requests to NiFi:

    [Viewing]
    DistributedConnectorHost=nifi-host.example.com
    DistributedConnectorPort=10000 
  • In the View configuration file, configure Universal Viewing:

    [UniversalViewing]
    Enabled=TRUE
    DocumentStoreHost=content-host.example.com
    DocumentStorePort=9100
    ConnectorGroupField=CONNECTOR_GROUP
    DistributedConnectorReferenceField=AUTN_IDENTIFIER
    

    You can also set the configuration parameters FileSystemReferenceField and WebURLField, but these are optional and are not usually required.

  • Configure any other View component parameters that you want to use, for example to restrict file system or web viewing.

For more information about how to configure Universal Viewing, refer to the Knowledge Discovery Administration Guide.