Using the File Binding Component in a Project

Common User Scenarios

The following common user scenarios convey how components interact with external systems to achieve specific business goals.

Polling a Directory

A typical scenario for the File Binding Component as a service consumer is polling a directory for files that match specified file names or file name patterns. When polling a directory, you can specify the following:

Writing Files to a Directory

A typical scenario for the File Binding Component as a service provider is writing files to a specific directory. When writing the files, you can also use pattern matching to generate file names. When writing the files, you can specify the following:

Multiple Records in a File

In the File Binding Component, various message properties facilitate the processing of multiple records in a file.

You can specify multiple records in a file by specifying a delimiter character (for variable length records) or by specifying a record size (for fixed length records). In either case, you must first set the multipleRecordsPerFile message property to enable processing of multiple records in a file. You can also use end-of-line characters when processing multiple records in a file.

If the multipleRecordsPerFile is set, then use the recordDelimiter property to specify the marker between records in a file.

If you want to specify fixed-length records, then do not specify the recordDelimiter property. Instead, specify the length of the records with the maxBytesPerRecord property. If this property is used to indicate the length of each record in a file, then multipleRecordsPerFile must be set.

End-of-Line Characters

You can specify whether to add an EOL (end-of-line) character to a record when writing to a file or whether to discard the EOL character after reading a record. The addEOL and removeEOL message properties are useful when the EOL character is used to separate multiple records in a file.