IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Email > Reference > Business object information

Business object structures

The adapter supports three different types of business object structures: simple alert email, email business object, and a user-defined type business object. The simple alert email structure sends text-only messages without attachments, the email business object sends and receives all types of messages both for transformed and non-transformed types, and the user-defined type sends and receives your own fixed structure transformed type messages only.

All the business object structures include standard headers such as To and From in the wrapper business object. For more information about the headers supported by the adapter, see Header business object properties.


Simple alert email business object structure

The simple alert email business object structure (SimpleAlertEmail) sends a single string email message to the mail server. This structure is supported only during the outbound communication. With the SimpleAlertEmail structure, the email message does not undergo any formatting or transformation. The intended recipient is a human and the body mime type is text/plain. As shown in the following illustration, it is composed of a single business object.

Figure 1. SimpleAlertEmail business object structure

With this business object structure, the only required values are the From and To fields. For more information about the values of the SimpleAlertEmail business object structure, see the section on the SimpleAlertEmail business object structure in the reference section of this documentation.


Email business object structure

The email business object structure is used both during inbound and outbound communication. The adapter always creates an email business object for its specific use. The email business object is a parent business object consisting of attributes that directly relate to the fields in an email message.

If you choose, it can also contain child business objects for email mailContent business object and attachments. The following illustration shows the email business object with two child business objects: header and mailAttachments.

Figure 2. Email business object with mail attachment and header child objects

The header child business object shown in Figure 2 stores header information for an email. The headerList attribute in the email wrapper object is an array of header business objects. The headerList attribute might contain all the headers for an email, each represented by a header business object. However, the standard headers present in the email wrapper business object takes precedence over the headers in the headerList attribute.

Bcc and Resent-bcc headers, cannot be retrieved from an inbound email, but they can be set for outbound emails.

For each attachment on an inbound email, the adapter creates a separate mail attachment business object. For every mail attachment business object the adapter receives during outbound communications, the adapter creates a separate email attachment. As noted in the illustration, the mail attachment business object consists of an attachment name and the data in the attachment.

The data in an attachment can be of any type. Business objects such as Customer or PurchaseOrder, which is defined in the business object editor before being processed by the external service wizard and have a specific structure outlined by you, are called structured content business objects. Similarly, you can specify a structured business object for the mailContent attribute of the email wrapper business object.

Structured content business objects are decomposed by the data binding and their content is recorded into individual logical fields within the business object structure. Unstructured content business objects are provided by the adapter and allow a user to send string (AsText) or bytes (AsBinary) through the adapter. Unstructured content business objects are used for pass-through processing during outbound communication.

Because the adapter is expected to decompose each business object added to the module, you must define a data binding mime type and a data handler during the data binding configuration portion of the external service wizard. The adapter does not automatically associate a data binding mime type and data handler type with your business object because it has no way of knowing what type of conversion is necessary for the import objects.

The following illustration shows a mail attachment business object with a customer child object.

Figure 3. Mail attachment business object with structured content child object

Unstructured content business objects are used to store unstructured data, such as rich text, PDF, or images (as binary content). They are not decomposed by the data binding because their content is not placed into specific fields in the business object. Instead, unstructured content is supplied as a single string or binary field in the business object structure. The following illustration shows a mail attachment business object with an unstructured content child object.

Figure 4. Mail attachment business object with unstructured content

Unstructured business objects have the following attributes:

Unstructured business object attributes
Attribute name Value
Content type Type of content sent.

For example, text/xml, application/binary, or image/jpeg.

AsText Value to be sent as email text
AsBinary Value to be sent as binary data


User-defined business object structure

Like the email business object structure, the user-defined business object structure consists of attributes that directly relate to the fields in an email message and child business objects for email attachments and headers. While the email business object structure can contain child objects of any type, the user-defined business object structure requires that you know the structure of all emails being sent or received by the adapter in advance.

For example, if all incoming and outgoing emails contain mail content of customer type, attachment1 of account type, and attachment2 of account type, as shown in User-defined business object structure with child objects.

By selecting the user-defined data type in the external service wizard, you can define your own fixed structure wrapper business object. This configuration enables you to use ordinary mapping tools to consume and work with your business objects without having to determine the business object type at run time.

The following illustration shows an example of a user-defined business object with Order, Customer, and Account child business objects.

Figure 5. User-defined business object structure with child objects

If you select user-defined email business object in the external service wizard when creating your inbound module, the adapter only processes events symmetric to the user-defined email business object you define in the EmailFixedStructureDataBinding data binding. If the adapter receives an event that is not symmetric to the specified custom data type, it does not process the event. Instead, the adapter throws an exception with the appropriate error message.

The adapter logs an error if an event:

Business object information


Related reference:

Supported operations

Interaction specification properties