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 > Overview of WebSphere Adapter for Email > Technical overview of the WebSphere Adapter for Email

Business objects

A business object is a structure that consists of data, the action to be performed on the data, and additional instructions, if any, for processing the data. The data can represent anything from a customer record to an email attachment. The adapter uses business objects to either obtain information from an email or to produce an email.


How the adapter uses business objects

The adapter during the outbound processing receives a business object from a service. It then creates an email from the details it finds in the business object and sends the email message to the mail server for distribution. For inbound processing, this process happens in reverse. The adapter takes information from an email, converts it to a business object, and forwards it to a service.


How data is represented in business objects

Business objects are created using either the business object editor or external service wizard in IBM Integration Designer. As shown in the following illustration, a business object consists of a set of fields and a type of data, such as a string or integer. The business object shown in the figure is a customer business object that records name, address, and telephone number information for a customer record. This example uses string values, but many other values are supported by the business object editor.

Figure 1. Customer business object

A field might, in turn, be another business object.

For example, the following illustration shows a customer business object that contains another business object. Here, a company that sells pet-related items might want to keep a track of names and species information of the pets that belongs to its customers. The Pet business object stores the name and species information for one customer pet.

Figure 2. Customer business object with child Pet business object

Each business object is associated with an operation. The operation in turn is associated with the wrapper. The operation tells the adapter what to do with the wrapper business objects. The following operations are examples of Create operations used by the adapter to create emails during the outbound communication:

No matter what name you give an operation for your module, the adapter performs the CreateEmail operation.

For inbound communications, Emit is the only supported operation. This operation is used to take information from an email and convert it to business objects.

During adapter configuration, you can optionally choose to generate a business graph. In version 6.0.2, each top-level business object is contained in a business graph, which includes a verb that an application can use in version 6.0.2 to specify additional information about the operation to be performed. In version 7.5.0.2 and later releases, business graphs are optional; they are required only when you are adding business objects to a module created with a version of IBM Integration Designer earlier than version 7.5.0.2.

If business graphs exist, they are processed, but the verb is ignored.


How business objects are created

Business objects and their wrapper objects are created by the external service wizard from XSD files either imported from another module or created with IBM Integration Designer business object editor. For any business object structure except the simple alert email structure, create or import the XSD files you want the adapter to make into business objects before you run the external service wizard.

If transformation is needed, a business object that maps to the email body or an attachment that needs transformation must exist. A generic email business object is available for pass-through operations. Or, if only a simple alert email is needed (no attachments), the adapter provides a simple alert email structure with standard headers as another option.

You create business objects for your module with the external service wizard launched from IBM Integration Designer.

If you define XSD files using the business object editor before starting the external service wizard, the adapter creates business objects from these schemas.


Custom wrapper business objects

Custom wrapper business objects are user-defined wrapper business objects that contain protocol-specific information and content. To use custom business objects, first create business object schema files (XSD files) by using the IBM Integration Designer business object editor. You can then use the external service wizard to generate business objects from the XSD files. A custom wrapper business object can be created from an existing business object or from XSD files.

Custom wrapper business objects are useful if you have an existing map or mediation that expects a business object to have a protocol-specific wrapper. The custom wrapper business object does not allow child objects of anyType. Using anyType objects restricts you from using maps and mediation wiring, because you must write programs or code to fetch business objects from the anyType field.

You must write such code if child objects of anyType are allowed, because the business object type being set on the anyType field is unknown.

Technical overview of WebSphere Adapter for Email


Related reference:

Supported operations

Business object information