To convert a business object to a FixedWidth document, the FixedWidth data
handler loops through the attributes of the business object in sequential
order. It generates fields in a fixed-width string recursively in the
order in which attributes appear in the business object and its
children.
The FixedWidth data handler processes business objects into a FixedWidth
document as follows:
- The data handler creates a fixed-width string to contain the data in the
business object.
- The data handler adds the business object name and the verb to the
fixed-width string. The name of the business object can be specified as
an argument to the conversion method.
- The data handler examines the application-specific information in the
business object definition to determine if there are any child meta-objects
(those whose names are listed in the cw_mo_ tag of the business
object application-specific information). The data handler does not
include these attributes in the FixedWidth document. For more
information about the cw_mo_ tag, see Implementing conversion from a business object.
- The data handler looks for the meta-object attribute named
OmitObjectEventId. If this is set to true, the
data handler does not include the ObjectEventId data of the
business object in the FixedWidth document.
- The data handler loops through the remaining business object attributes in
order, adding the correct padding to the string for each simple
attribute. For array attributes, the data handler does the
following:
- If the attribute represents a single-cardinality attribute, the data
handler adds the attribute name and a count of 1 to the string, and then
recursively processes the child business object to add the values of each
attribute to the string.
- If the attribute represents a multiple cardinality array, the data handler
adds the attribute name and the child object count to the string, and then
recursively processes each child business object, adding the values of each
attribute to the string.
- When the data handler completes the conversion, it returns the serialized
data to the caller. The data handler returns the data in the form
(String or InputStream) requested by the caller.
- Note:
- Any attribute value in the business object that has a length greater than
MaxLength is
truncated to MaxLength during request processing if the value of
the Default Value property of the
Truncation meta-object attribute is set to true. If
Truncation is set to false and an attribute value has a
length greater than MaxLength, formatting terminates, and an error
is logged.
