Folder Configuration

This document focuses on the FOLDER type of Agent Configuration. This type captures configuration for IN and/or OUT folders that are used by Oracle Health Insurance Agent to work with/process information in folders that are (only) accessible on premises.

Folder Paths for Inbound Files

A file that should be processed by a configured integration in the Oracle Insurance Gateway is referred to as an inbound file. For an inbound file to be detected, configure folders that Oracle Health Insurance Agent monitors for inbound files in the context of integration. If a file is detected and its name matches the configured file name pattern, Oracle Health Insurance Agent invokes an exchange in the Oracle Insurance Gateway "with file", that is, uploading the file in the process. The file is made available to the exchange as a data file in a data file set. And as the inbound file triggered the exchange, it can be referred to in transformation dynamic logic via the 'trigger' bind variable, for example:

trigger.dataFiles.each { df ->
    // file transformation logic goes here
}

If the Oracle Insurance Gateway responds to the exchange invocation with status code 201 (Created) then Oracle Health Insurance Agent moves the files from the in folder to a configured archive folder. Otherwise, Oracle Health Insurance Agent moves the file to a configured error folder.

The configuration for inbound files is part of the Agent Configuration resource. Below tables provide additional details.

Field Description

inFolder

The Agent uploads files detected in the in folder to the Gateway. Required.

The folder needs to be accessible for the Agent.

fileNamePattern

Regular expression that the Agent applies to files that are placed in the in folder: files with filenames that match the regex pattern are uploaded to the Gateway, triggering an exchange invocation for this integration. Required.

For example: use regular expression ".*\\.txt$" to upload files with an extension of ".txt".

This allows writing large files (that may take a while) with a different extension, for example, ".part", and move these to the configured extension when writing completed.

archiveFolder

Files that were uploaded are moved to the archive folder. Required.

The folder needs to be writable for the Agent and the folder path must be unique across configurations.

errorFolder

Files that could not be uploaded successfully, for example, because the Gateway was not reachable, are moved to the error folder. Required.

The folder needs to be writable for the Agent and the folder path must be unique across configurations.

schedule

An optional (cron) expression that indicates with which interval the inFolder should be scanned for files. Optional. For example: 0 40 10 * * *, it means that the folder should be checked every day at 10:40 AM. The cron format is 'seconds' 'minutes' 'hour' 'day of month' 'month' 'day of week'

The combination of in folder path and file name pattern must be unique across configurations, thus allowing different file types to be dropped in the same in folder.

Note that in case multiple file name patterns are configured for the same in folder that it must be ensured that a file is matched to one and only one integration.

To configure folder paths for inbound files for an integration use the "/agentconfigurationfolders" resource. Folder paths for inbound files are specified as part of a CONFIG JSON element - see the below example:

    {  "typeConfig": {
        "inFolderConfig": {
          "inFolder": "/u01/agentHome/test_agent/in",
          "archiveFolder": "archive",
          "errorFolder": "error",
          "fileNamePattern": ".*\\.xml$"
        },
        "outFolderConfig" : {
          "outFolder": "/u01/agentHome/test_agent/out"
        }
      }
   }

With Scheduler

If the schedule parameter is set in inFolder configuration, the agent does not trigger the exchange as soon as the file is dropped, however it invokes the exchange when the schedule expires. The exchange is invoked even when there are no files in the in-folder, to ensure that configuration in integration can validate the state of the files(if present or absent) and raise errors/workflows accordingly.

If the movement of files after triggering the exchange fails, then exchange is not failed. There are exceptions in the logs that can be monitored to check for such errors.

Folder Paths for Outbound Files

An outbound file is created by a configured integration in Oracle Insurance Gateway , that is, it is the result of an exchange. If Oracle Health Insurance Agent should deliver the file to an on-premises folder that is not accessible by the Oracle Insurance Gateway then the destination Agent is used. Similarly, as is the case for Inbound Files, the configuration for Outbound files is contained in a CONFIG JSON element. See the example above.

The configuration for outbound files is part of the Agent Configuration resource. The below tables details this further

Field Description

outFolder

Folder in which the agent will place a file that was created in Oracle Insurance Gateway. Required.

The folder needs to be writable for the Agent, and the folder path must be unique across configurations.

Oracle Insurance Gateway notifies Oracle Health Insurance Agent when a file is available for download via the Secure WebSocket connection between Oracle Health Insurance Agent and the system and provides Oracle Health Insurance Agent with the (HTTPS) download link of the file. Oracle Health Insurance Agent uses the link to download the file and puts it in the configured out folder. To confirm that the file operation succeeded, Oracle Health Insurance Agent 'signs off' the specific task within the system; this resumes the exchange. If Oracle Health Insurance Agent does not sign off then the exchange is not marked as completed.