Business objects

Collaborations and connectors interact by sending and receiving business objects through InterChange Server.

A business object reflects a data entity--a collection of data that can be treated as an operative unit. For example, a data entity can be equivalent to a form, inclusive of all of the form's fields. The form might typically be used in an application, or over the Web, to contain business information about customers, or employees, or invoices.

Business objects are cached in memory during collaboration execution for fast access, and also stored in a persistent transaction state store to provide robust recovery, rollback, and re-execution of collaborations upon server restarts after failures.

The IBM WebSphere InterChange Server system creates business objects that reflect the information contained in entities. In this manual, a data entity is often referred to in the context of the kind of business information it contains--for example, an employee entity or a customer entity.

This section provides a first look at business objects. A later chapter in this guide contains more information on business objects, their contents, and the way that the IBM WebSphere InterChange Server system manages and handles them.

Roles of a business object

A business object can act as an event, a request, or a response.

Event

A business object can report the occurrence of an application event, an operation that affected a data entity in an application. The application event might be the creation, deletion, or change in value of that collection of data. When a connector detects an application event and sends a business object to an interested collaboration, the business object has the role of representing the event, and so it is called an event in the IBM WebSphere InterChange Server system.

For example, a connector might poll an application for new employee entities on behalf of a collaboration. If the application creates a new employee entity, the connector sends an event business object to the collaboration.

Request

Requests are typically generated in one of two ways:

Response

When a connector finishes processing a request, it usually returns a response. For example, after a connector receives a request to retrieve employee data from an application, it sends a business object containing the employee data.

Structure of a business object

A business object is a self-describing unit that contains a type (its name), processing instructions (a verb), and data (attribute values). Figure 9 is an example of a simple business object, showing its type, verb, and attribute values.

Figure 9. Business object components


The next sections describe these components.

Business object type

Each business object has a type name that identifies it within the IBM WebSphere InterChange Server system. This type is defined by the business object definition. For example, the type might be Customer, Employee, Item, or Contract.

Business object verbs

A business object verb specifies an action in relation to the attribute values. The verb can indicate various types of actions, depending on the role of the business object. Table 1 lists the three business object roles and describes the meaning of the verb in a business object that has each role.

Table 1. Meanings of business object verbs

Role of business object Meaning of verb
Event Describes what happened in an application. For example, in an event, the Create verb indicates that the source application created a new data entity.
Request Tells the connector how to interact with the application in order to process the business object. For example, the Update verb is a request to the connector to update the data entity.
Response Provides the results of a previous request. For example, in a response, the Retrieve verb indicates that the connector obtained the attribute values from the application.

Note:
The naming convention is to use the format business-object-type.verb to indicate a particular type of business object with a particular verb. For example, Customer.Create is a Customer business object with the Create verb.

Business object attribute values

A business object contains attribute values that represent data fields associated with the data entity, such as Last Name, First Name, Employee ID, or Invoice Status.

Some attributes, instead of containing data, contain child business objects or arrays of child business objects. Figure 10 illustrates the structure of a Contract business object. The Line Item information in the contract is in an array of child business objects.

Figure 10. Business object with child business objects


A business object that contains child business objects or arrays of child business objects is a hierarchical business object. One whose attributes contain only data is a flat business object.

Application-specific and generic business objects

The IBM WebSphere InterChange Server system includes two kinds of business objects: application-specific and generic.

When the connector agent (through its application-specific component) detects an application event such as an update, it retrieves the appropriate data entity from the application and transforms it into an application-specific business object.

Note:
When this document refers to a business object whose name includes an application name, such as Clarify_Contact or Oracle_Customer, it refers to an application-specific business object. A Clarify_Contact business object, for example, contains the set of information that the Clarify application stores about a contact. In another application, a contact entity might store a somewhat different set of information, store the information in a different order or format, or have a different name.

After the connector agent has built an application-specific business object, it sends the business object to the connector controller in InterChange Server.

The connector controller exchanges business objects between collaborations and the connector agent. Collaborations are generally application-neutral, so the business object that a connector controller exchanges with a collaboration must be a generic business object. The use of generic business objects enhances the reusability of the collaboration because its business logic is not bound to specific versions of specific applications.

Note:
Generic business object names do not include a company name or product name. Examples include Contact, Employee, and Customer.

Figure 11 shows where the two kinds of business objects fit within the IBM WebSphere InterChange Server system: the collaboration interacts using generic business objects and the connector agent supports business objects designed for specific applications.

Figure 11. Generic and application-specific business objects


You can use the same connector to run multiple types of collaborations, if the connector supports the business objects used by those collaborations.

Copyright IBM Corp. 1997, 2004