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 31 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 31. 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:
|
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:
- An attribute to represent the EDI document header
- As many attributes as needed to represent any segments
- As many attributes as needed to represent any segment loops
or groups
- An attribute to represent the EDI document trailer
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 32 shows the attribute properties for
a segment attribute in the top-level business object definition.
Table 32. 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 33 shows the attribute properties for a segment-loop attribute
in the top-level business object definition.
Table 33. 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 34 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 34. 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 35 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 35. 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:
- A simple (String) attribute to represent an EDI element
- An array attribute to represent a composite
Simple attribute
Each simple attribute of a segment business object must
have the attribute properties shown in Table 36.
Table 36. 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 37 shows
the attribute properties for a composite attribute.
Table 37. 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 38 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 38. 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 39 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 39. 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 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 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:
- You can use Edifec SpecBuilder to export the definition EDI
document as a business object definition.
- You can manually create a business object definition for the
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 Express 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:
- Create the top-level business object definition.
For information on the structure of this top-level business object,
see Top-level EDI business object.
- 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 41.
Keep the following in mind:
- The business object attribute name need not be the same as the
EDI element name. The application-specific information is used to
specify the element name.
- Type determination: String is a cardinality 1 contained element with no element content
or associated attribute-list declaration. BusinessObject is a cardinality n contained element, or contained element with element content
or associated attribute specification(s).
- Application-specific information is required for many of the
attributes. See the information in Top-level EDI business object for
more information.
- Create a business object attribute for each simple element.
For more information, see Simple attribute.
- Create child business objects for any nested business objects,
such as header segments, trailer segments, and composites. Follow
the rules listed above.
