Business object definitions for EDI documents

To use the EDI data handler, you must create or modify business object definitions so that they contain the metadata that the data handler requires and so that they include the fields that correspond to those in the EDI message. This section provides the information you need to create business object definitions to work with the EDI data handler. In particular, it provides the following information:

Understanding EDI business object structure

The EDI data handler uses business object definitions when it converts business objects or EDI documents. It performs the conversion using the structure of the business objects and their application-specific information. Figure 30 shows the structure of the business objects that represent an EDI message.

Figure 30. Business object structure for an EDI message


To ensure that business object definitions conform to the requirements of the EDI data handler, use the guidelines provided for each of the following business objects:

Top-level EDI business object

The EDI data handler expects a top-level business object to hold the information for the EDI message. Table 33 describes how the EDI data handler interprets the properties of a business object and describes how to set the properties when modifying a business object for use with the EDI data handler.

Table 33. Properties for the EDI top-level business object definition

Property name Description
Name Each business object definition must have a unique name. It is recommended that these business object definitions begin with a standard prefix. The name of the top-level business object depends on the message standard, as follows:
  • For an EDI message that follows the EDIFACT standard, the business object name has the form:
    BusObj Prefix + Message Type
    
  • For an EDI message that follows the X.12 standard, the business object name has the form:
    BusObj Prefix + Transaction Set Identifier Code
    
Version A constant representing the current version of the business object definition. Current value is 1.0.0.
Application-specific information No metadata that includes a type tag. Might have metadata with cw_mo tags to indicate attributes that are to be ignored during the conversion process.

Note:
When the data handler converts an EDI document to a business object, it identifies the top-level business object for the EDI document through the name-handler lookup table. For more information, see Creating the name-handler lookup file.

As Figure 30 shows, the top-level business object definition contains the following attributes:

Header attribute

The header attribute of the top-level EDI business object represents a single-cardinality array that contains the header information. The application-specific information for this attribute must include the following tag:

type=header

The Type property for this attribute contains the name of the header business object. For information on the attributes of the header business object, see Header business object.

Segment attributes

Each segment attribute of the top-level EDI business object represents a single-cardinality array that contains the segment information. Table 34 shows the attribute properties for a segment attribute in the top-level business object definition.

Table 34. Attribute properties for a segment attribute in the EDI top-level business object definition

Property name Description
Name

The name of a segment attribute takes the form:

Tag + Position

(if duplicated)

Type

The type of a segment attribute takes a name of the form:

TopLevelBusObj + Tag

This attribute property contains the name of the appropriate segment business object.

ContainedObjectVersion A constant representing the current version of the business object definition. Current value is 1.0.0.
Relationship Set to "containment".
Cardinality If Max Use or Repetition is set to "1" in the EDI documentation specification, set the value of this attribute property to "1". Otherwise, set this attribute property to "N".
MaxLength Always set to "1".
Key Always set to "false".
Foreign key Always set to "false".
Required If Status or Option is set to "M" in the EDI documentation specification, set this attribute property to "true". Otherwise, set this attribute property to "false".
Default value Not used by the EDI data handler.
Application-specific information

Set to:

name=name of segment

Note:
The Max Use, Repetition, Status, and Option fields are part of the EDI document specification. For more information, refer to your EDI documentation.

For information on the attributes of the segment business object, see Segment business object.

Segment-loop attributes

Each segment-loop attribute represents a multiple cardinality array that contains the segment information. Table 35 shows the attribute properties for a segment-loop attribute in the top-level business object definition.

Table 35. Attribute properties for a segment-loop attribute in the EDI top-level business object definition

Property name Description
Name

The name of a segment-loop attribute takes the form:

Tag + Position

(if duplicated)

Type

The type of a segment loop attribute takes a name of the form:

TopLevelBusObj + Loop/Group keyword + Tag

This attribute property contains the name of the appropriate segment-loop business object. This name can include a keyword (such as Loop) to indicate the purpose of the segment.

ContainedObjectVersion A constant representing the current version of the business object definition. Current value is 1.0.0.
Relationship Set to "containment".
Cardinality Always set to "N".
MaxLength Always set to "1".
Key Always set to "false".
Foreign key Always set to "false".
Required If Status or Option is set to "M" in the EDI documentation specification, set this attribute property to "true". Otherwise, set this attribute property to "false".

Only set this attribute property to "true" on the first segment in the Loop/Group.

Default value Not used by the EDI data handler.
Application-specific information Includes:
  • name=name of first segment in loop
  • type=loop

For example, the following application-specific information identifies a segment loop whose first segment name is AMT:

AppSpecificInfo=name=AMT;type=loop

Note:
The Status and Option fields are part of the EDI document specification. For more information, refer to your EDI documentation.

For information on the attributes of the segment-loop business object, see Segment-loop business object.

Trailer attribute

The trailer attribute of the top-level EDI business object represents a single-cardinality array that contains the trailer information. The application-specific information for this attribute must include the following tag:

type=trailer

The Type property of this attribute contains the name of the trailer business object. For information on the attributes of the trailer business object, see Trailer business object.

Header business object

To hold header information for the EDI message, the EDI data handler expects a header business object as the first attribute of the top-level business object. Table 36 describes how the EDI data handler interprets the properties of this business object definition and describes how to set these properties when modifying the business object for use with the EDI data handler.

Table 36. Properties for the EDI header business object definition

Property name Description
Name Each business object definition must have a unique name. It is recommended that the name of the header business object include the business object prefix. It can also include identifying information such as the keyword "header".
Version A constant representing the current version of the business object definition. Current value is 1.0.0.
Application-specific information No metadata that includes a type tag. Might have metadata with cw_mo tags to indicate attributes that are to be ignored during the conversion process.

This business object definition contains an attribute to represent each header segment of the header. The application-specific information for each attribute identifies the name of the header segment. Each header segments can contain attributes that are simple, single-cardinality, or multiple cardinality.

Segment business object

To hold segment information for the EDI message, the EDI data handler expects a segment business object. Table 37 describes how the EDI data handler interprets the properties of this business object definition and describes how to set these properties when modifying the business object for use with the EDI data handler.

Table 37. Properties for the EDI segment business object definition

Property name Description
Name

Each business object definition must have a unique name. It is recommended that the name of the segment business object definition have the form:

BusObj Prefix + Tag
Version A constant representing the current version of the business object definition. Current value is 1.0.0.
Application-specific information No metadata that includes a type tag. Might have metadata with cw_mo tags to indicate attributes that are to be ignored during the conversion process.

As Figure 30 shows, the segment business object can contain the following attributes:

Simple attribute

Each simple attribute of a segment business object must have the attribute properties shown in Table 38.

Table 38. Attribute properties for simple attributes

Property name Description
Name Each business object attribute must have a unique name.
Type Each simple business object attribute must have a String type.
Cardinality Always set to "1".
Key Used for simple attributes only: must be set for the first string attribute of the business object.
MaxLength Set to the maximum size of this String attribute. Within an EDI document, when you embed a separator character as part of actual data
Foreign key Always set to "false".
Required If Status or Option is set to "M" in the EDI documentation specification, set this attribute property to "true". Otherwise, set this attribute property to "false".
Default value Not used by the EDI data handler.

Note:
The Repetition, Status, and Option fields are part of the EDI document specification. For more information, refer to your EDI documentation.

Composite attribute

Each composite business object is an array that contains the elements of an EDI composite. Table 39 shows the attribute properties for a composite attribute.

Table 39. Attribute properties for a composite attribute in an EDI segment business object definition

Property name Description
Name The name of a composite attribute takes the form:Tag + Position (if duplicated)
Type

The type of a segment attribute takes a name of the form:

BusObj Prefix + Tag

This attribute property contains the name of the appropriate composite business object.

ContainedObjectVersion A constant representing the current version of the business object definition. Current value is 1.0.0.
Relationship Set to "containment".
Cardinality If Repetition is set to 1, set the value of this attribute property to "1". Otherwise, set this attribute property to "N".
MaxLength Always set to "1".
Key Always set to "false".
Foreign key Always set to "false".
Required If Status or Option is set to "M", set this attribute property to "true". Otherwise, set this attribute property to "false".
Default value Not used by the EDI data handler.
Application-specific information None
Required Server Bound Always set to "false".

Note:
The Repetition, Status, and Option fields are part of the EDI document specification. For more information, refer to your EDI documentation.

For more information, see Composite business object.

Composite business object

To hold composite information for an element in the EDI message, the EDI data handler expects a composite business object.

Note:
Composites are usually found in EDI documents that follow the EDIFACT standard. However, they can exist in documents that follow the X.12 standard as well.

Table 40 describes how the EDI data handler interprets the properties of this business object definition and describes how to set these properties when modifying the business object for use with the EDI data handler.

Table 40. Properties for the EDI composite business object definition

Property name Description
Name

Each business object definition must have a unique name. It is recommended that the name of the composite business object definition have the form:

BusObj Prefix + Tag
Version A constant representing the current version of the business object definition. Current value is 1.0.0.
Application-specific information No metadata that includes a type tag. Might have metadata with cw_mo tags to indicate attributes that are to be ignored during the conversion process.

The composite business object can contain simple (String) attributes or arrays.

Segment-loop business object

To hold information for a segment loop or group in the EDI message, the EDI data handler expects a segment-loop business object. Table 41 describes how the EDI data handler interprets the properties of this business object definition and describes how to set these properties when modifying the business object for use with the EDI data handler.

Table 41. Properties for the EDI segment-loop business object definition

Property name Description
Name

Each business object definition must have a unique name. It is recommended that the name of the segment-loop business object definition have the form:

BusObj Prefix + Tag
Version A constant representing the current version of the business object definition. Current value is 1.0.0.
Application-specific information No metadata that includes a type tag. Might have metadata with cw_mo tags to indicate attributes that are to be ignored during the conversion process.

Trailer business object

To hold trailer information for the EDI message, the EDI data handler expects a trailer business object. Table 42 describes how the EDI data handler interprets the properties of this business object definition and describes how to set these properties when modifying the business object for use with the EDI data handler.

Table 42. Properties for the EDI trailer business object definition

Property Name Description
Name Each business object definition must have a unique name. It is recommended that the name of the trailer business object include the business object prefix. It can also include identifying information such as the keyword "trailer".
Version A constant representing the current version of the business object definition. Current value is 1.0.0.
Application-specific information No metadata that includes a type tag. Might have metadata with cw_mo tags to indicate attributes that are to be ignored during the conversion process.

This business object definition contains an attribute to represent each trailer segment of the trailer. The application-specific information for each attribute identifies the name of the trailer segment. The trailer segments can contain simple, single-cardinality, or multiple cardinality attributes.

Creating business object definitions for EDI documents

There are two ways to create business object definitions for an EDI document:

Using SpecBuilder to create business object definitions

SpecBuilder can function as an object discovery utility, creating business object definitions based on an EDI document. It writes them to a business object definition file that can then be loaded into the business integration system. SpecBuilder is a third-party application released and supported by Edifecs Inc. Please consult the SpecBuilder documentation or the Edifecs web site for assistance.

Note:
IBM does not include the SpecBuilder tool as part of its release. The tool is, however, available on an Edifecs CD. To obtain a copy of the Edifecs CD, please contact your IBM account executive or technical support.

Manually creating business object definitions

This section describes how to manually create business object definitions to represent EDI documents. Use Business Object Designer to add or delete attributes from the business object definition as well as edit attribute properties, as needed.

Note:
The structure of an EDI document can be quite complex. It is recommended that you use SpecBuilder to build as much of a business object definition as possible.

To define a business object based on an EDI document:

  1. Create the top-level business object definition.

    For information on the structure of this top-level business object, see Top-level EDI business object.

  2. Create the child business objects for the top-level business object. In the top-level business object, create a child object attribute for the business objects shown in Table 43.

    Table 43. Business objects for the EDI data handler

    Part of EDI document Notes Business object
    Header This header might also contain header segments. Header business object
    Segments A segment might also contain composites Segment business object, Composite business object
    Segment Loops and Groups A segment loop consists of repeated segments. Segment-loop business object
    Trailer This trailer might also contain trailer segments. Trailer business object

    Keep the following in mind:

  3. Create a business object attribute for each simple element. For more information, see Simple attribute.
  4. Create child business objects for any nested business objects, such as header segments, trailer segments, and composites. Follow the rules listed above.

Copyright IBM Corp. 1997, 2004