All SWIFT messages as well as compliance with SWIFT formats and syntax, are
validated by SWIFT before being processed by the SWIFT data handler.
The SWIFT data handler performs validation of business object structure and
compliance only.
The SWIFT data handler extracts data from a SWIFT message and sets
corresponding attributes in a business object as follows:
- The SWIFT parser is called to extract the first 4 blocks (UUID + blocks 1
through 3). For block 2, the SWIFT application header, only the input
attributes are extracted.
- The SWIFT data handler is called to extract the name of the business
object from block 2 of the SWIFT message.
- The SWIFT data handler creates an instance of the top-level object.
- Based on the application-specific information parameters, the data handler
processes SWIFT message blocks. The blocks are parsed in one of four
different ways
- parse=no; The block data is treated as type
String and not parsed out.
- parse=fixlen; The block data is parsed as a fixed-length
structure, based on the values of the maximum length attributes of the block
business object.
- parse=delim; The block data is parsed as
{n:data}
delimited format.
- parse=field; This setting is used only on block 4
data. Fields are parsed as generic and non-generic.
- For block 4 data (parse=field;) the data handler either
matches the field returned from the parser to a tag business object attribute,
or finds the sequence business object that the field belongs to.
- If the application specific information of the attribute is
NULL, the child business object is a sequence. The data
handler checks if the first required attribute of the child business object
matches the field:
- If it does match, the data handler assigns the attribute multiple
cardinality and populates the sequence for the child business object.
- If it does not match, the data handler skips to the next attribute of the
parent business object.
- If application-specific information is not NULL, the child is a tag
business object. If the field matches the application-specific
information, it is handled with the multiple cardinality and extracted, with
the data handler setting the letter and data attributes of the tag business
object.
- If a non-NULL field is returned, the field is written to a log and an
exception is thrown.
- The data handler parses block 5 of the SWIFT message. The
application-specific information for this block is always
block=5; parse=no and is of type
String. Block 5 is treated as a single string.
