File templates
The file template represents the specification of the files that can be read or written by ION using the file connection point.
ION supports two types of files; text and binary.
For text files the file template specifies the type of formatting (delimited, fixed-length, delimited & fixed-length, XML or Full BOD) and the configuration properties required for each format type.
Templates of type 'Full BOD' or 'XML' both transport an XML document. In case of
Full BOD, the noun must already be available in the ION registry. The BOD XML supplied to ION must comply with the Infor message semantics such as its root
element must be of type <VerbNoun>
and must
include ApplicationArea and DataArea
sections. Such files are transported without any additional
process.
For XML templates, you must specify a name for the custom noun and provide a sample file. Based on this a custom noun schema is generated where you can define the document ID. During file transfer, a custom BOD is generated and the supplied XML data is placed inside the noun section of the DataArea.
For binary files the file template specifies the settings for "Raw Data" format type. Binary file type is used for reading files and preserving its content without change using "Base-64 Encoding". When a file is read, its content is encoded and then mapped to a "Raw Data" element of a custom BOD. A document id is generated. When writing binary files, the content of the "Raw Data" element of the incoming BOD is expected to be already encoded (using Base-64 encoding). The content is decoded first and then written to the file.
Once the configuration of a file template is completed, a BOD is generated and linked to that file template. This BOD represents the schema to use for reading and writing the file content.
When reading files, each field of an input line is transformed into the corresponding element in the specified BOD. Records read in files can be treated differently based on the Generated BOD option in the file template configuration setting. For example:
- Generated BOD - Single: Each noun in the input BOD data schema is transformed into a line of output text in the same file. A BOD instance with repeated elements is written as a single file with multiple lines. For Binary files, this is the default setting. A BOD instance with repeated elements is written as a single file. Content of every element is decoded (using base64encoding) and concatenated before it is written to the file.
- Generated BOD - Multiple: Each noun in the input BOD data schema is transformed into a line of output text in a separate file. A BOD instance with repeated elements is written as multiple files and each file contains just one line..
You can create a new file template from a:
- File connection point
- File templates list