Converting business objects to SWIFT messages
To convert a business object to a SWIFT message, the SWIFT
data handler loops through the attributes in the top-level business
object in sequential order. It generates populated blocks of a SWIFT
message recursively based on the order in which attributes appear
in the business object and its children.
Attributes without a block number, or with values unrecognized
by the parser properties, are ignored. Also ignored is block 0,
the UUID header that is added by the MQSA.
The parse=value application-specific information property is
used to determine how to format strings. This property parses the
business object as follows:
- parse=no; The attribute MUST be of type String and is formatted as {block number:attribute value}The block number is the value of the block=block value application-specific text
property.
- parse=fixlen; The attribute must be a single cardinality container. It is
formatted as {block number:attr0 value attr1 value....attrn value}where attrn value is the attribute
value of the nth attribute. All CxIgnore
and CxBlank attributes are IGNORED.
- parse=delim; The attribute must be a single cardinality container. It
is formatted as {block number:[Tag:attr1 data]...[Tag:attr1 data]}where: Tag is the value of the Tag
property of attribute application-specific text attrn data is
the value of the attribute. All CxIgnore and CxBlank attributes
are IGNORED.
- parse=field; This setting can be used only on Block 4 messages. Fields
are printed out in loop through non-CxIgnore and non-CxBlank attributes
of the business object.
- If appText == NULL and the attribute is a container, call printBO(childBO). Handle multiple cardinality if required.
- If appText != NULL, call printFieldObj(), which handles multiple cardinality and calls printFieldBO() to write out a tag.
- All fields are formatted as generic or non-generic fields. The
tag number is determined by the value of the Tag business object
attribute. All non-CxIgnore attributes of the tag business object
are printed out. For more on generic or non-generic fields, see Appendix C. SWIFT message structure.
