Converting SWIFT messages to business objects

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:

  1. 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.
  2. The SWIFT data handler is called to extract the name of the business object from block 2 of the SWIFT message.
  3. The SWIFT data handler creates an instance of the top-level object.
  4. Based on the application-specific information parameters, the data handler processes SWIFT message blocks. The blocks are parsed in one of four different ways
  5. 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.
    1. 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.
    2. 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.
  6. If a non-NULL field is returned, the field is written to a log and an exception is thrown.
  7. 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.

Copyright IBM Corp. 1997, 2003