Converting business objects to FixedWidth documents

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:

  1. The data handler creates a fixed-width string to contain the data in the business object.
  2. 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.
  3. 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.
  4. 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.
  5. 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:
  6. 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.

Copyright IBM Corp. 2003