Using the File Binding Component in a Project

Inbound Message Processing

It is important that the Inbound files are picked up only once by one inbound thread and the outbound files are not overwritten by simultaneous threads.

To make certain files are not overwritten by simultaneous threads, a locking mechanism is used to synchronize the threads that poll the same endpoint or input directory.

Each endpoint is unique, and is associated with a physical file folder path, for example: C:\temp. This is where the inbound messages are pulled. It is invalid to deploy a composite application that contains endpoints that poll the same physical directory for the same file.

The life cycle of an inbound message can be expressed using the following illustration.

Inbound Message Processing

The process flow can be described by the following steps:

  1. The inbound processor polls the input directory.

  2. If a file name matches the given file name pattern, the inbound processor moves the file to the workArea directory (filebc_tmp), and the name and path to the selected file is put into the queue.

  3. The selected files are locked by a file lock to prevent other inbound processors in a clustered environment from selecting the same file.

  4. Five inbound worker threads wait on the queue to process the selected inbound files

  5. When a worker thread selects a file, it reads the file content, normalizes the content, and sends normalized message to the NMR (Normalized Message Router).

  6. If sending the message to the NMR is a success, the message is moved from the workArea to an archive, and the suffix “_processed” is added to the file name.

If sending the message to the NMR fails, the message is retained in the workArea to be processed by the user. An “_error” suffix is added to the file name. "_error" file contains details of the failure.

File Binding Component Processing Protocol

The following attributes are used for the implementation of the locking/dispatch mechanism: