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 > Oracle E-Business Suite > Overview of IBM WebSphere Adapter for Oracle E-Business Suite > Technical overview

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. WebSphere Adapter for Oracle E-Business Suite uses business objects to represent tables and views in the database along with the results of database queries, stored procedures, and stored functions. Business objects can also create a hierarchy of objects from your database and group unrelated tables. Your component communicates with the adapter using business objects.


How the adapter uses business objects

An integrated application uses business objects to access a database. The adapter converts the business objects in outbound requests into JDBC API calls to access the database. For inbound events, the adapter converts the data in the events into business objects, which are returned to the application.

The adapter uses business objects to represent the following types of objects in a database:

Query business objects do not represent database objects. Query business objects represent a user-defined SQL query to run against the database.

Before using the business objects to represent the objects types mentioned earlier, ensure that the Java™ keywords are not used to define the names of tables, views, stored procedures, and stored functions parameters.

Adapters use some business objects for output. These business objects include:


How data is represented in business objects


For table or view business objects

Each column in the table or view is represented by a simple attribute of the table or view business object. A simple attribute is an attribute that represents a single value, such as a String, Integer, or Date. Other attributes represent a child business object or an array of child business objects.

Simple attributes within the same business object cannot be stored in different database tables; however, the following situations are possible:

A table business object always has a primary key, even if the corresponding database table does not have a primary key. The adapter uses the column specified in the primary key attribute when it retrieves table business objects. The adapter supports tables that have composite, or multiple, primary keys. If a database table has one or more primary keys, the wizard sets the primary key property for those columns in the table business object. If the database table does not have a primary key, the external service wizard prompts you for primary key information when you configure that business object. Specify a column that contains unique data, such as a sequence or identity column.

If the table business object contains the Date and Timestamp data types, the format of these types can be customized in the Application Info section of the Properties view of the business object.

For example, you can specify the date format in dd/MM/yy and timestamp in HH/mm/ss. If you want to customize the format of the Date and Timestamp data types, ensure that the data types are mapped to the default string data type in the Configuration Properties window.

Table and view business objects support the Create, Update, Delete, Retrieve, RetrieveAll, Exists, and ApplyChanges outbound operations. When running an Exists operation on a hierarchical table business object, only the top-level business object is queried.

Figure 2.shows a table business object that has one child table business object. The business object has simple attributes for each of the columns in the database table, plus a complex attribute pointing to a child business object.

Figure 2. A table business object with one child business object.

For Oracle databases, the adapter supports complex data types such as array, table, structure, or nested structure in table business objects. The type name and the sub attribute details are automatically discovered and displayed for these types. The adapter processes these data types as child business objects of the table business object.

Figure 3. An Oracle table business object having complex data types as columns


For stored procedure and stored function business objects

In a business object for a stored procedure or stored function, all the input and output parameters for the stored procedure or stored function have corresponding attributes in the business object. If any of the input or output parameters is of a complex type, such as an array or structure, then the corresponding business object attribute is a child business object type with the child business object containing the attributes of the array or structure. If the stored procedure returns a result set, a child business object is created that contains the attributes of the returned result set.

The business object for stored procedures and stored functions supports the Execute outbound operation.

If the stored procedure or function business object contains the Date and Timestamp data types, the format of these types can be customized in the Application Info section of the Properties view of the business object.

For example, you can specify the input or output parameter of date in dd/MM/yy and timestamp in HH/mm/ss format. If you want to customize the format of the Date and Timestamp data types, ensure that the data types are mapped to the default string data type in the Configuration Properties window.

The following Properties view shows business objects generated from a stored procedure that has one input type and two output types. One of the output parameters is of the Struct data type. The external service wizard generates a business object for the Struct type and adds it as a child object to the parent business object. For the attribute of type Struct in the parent business object, the ChildBOType application-specific information is set to Struct to indicate it is of type Struct.

Figure 4. Child business object type with attribute of the structure data type

In the Properties view, the ChildBOTypeName application-specific information is set to the value of the user-defined Struct type in the database.

Figure 5. Child business object type name set to Struct type


For query business objects

A business object for a database query defines the SQL statement that performs the query and the parameters that the query requires. The query business object supports the RetrieveAll outbound operation.

As an example, assume a query business object to run the following SELECT statement:

select C.pkey, C.fname, A.city from customer C, address A     WHERE (C.pkey = A.custid) AND (C.fname like ?)

The question mark (?) indicates an input parameter for the query. A query can have multiple parameters, each indicated in the SELECT statement by a question mark. Table 1.shows the attributes of the sample query business object. The query business object has simple attributes for each column to be extracted, a simple attribute for each parameter, and a "placeholder object" for the WHERE clause of the query, which holds the WHERE clause after parameter substitution.

Attributes of a query business object
Business object attribute Description
pkey Corresponds to database column PKEY in the Customer table
fname Corresponds to database column FNAME in the Customer table
city Corresponds to database column CITY in the Address table
parameter1 The parameter. There is one parameter for each ? (question mark) in the SELECT statement. In a SELECT statement with multiple parameters, subsequent parameters are named parameter2, parameter3.
jdbcwhereclause A placeholder object for the WHERE clause

If the query business object contains the Date and Timestamp data types, the format of these types can be customized in the Application Info section of the Properties view of the business object.

For example, you can specify the input or output parameter of date in dd/MM/yy and timestamp in HH/mm/ss format. If you want to customize the format of the Date and Timestamp data types, ensure that the data types are mapped to the default string data type in the Configuration Properties window.

The following figure shows the business object for the sample query in the business object editor.

Figure 6. The attributes of a query business object

This figure shows the application-specific information for the query business object example. The SelectStatement application-specific information contains the SELECT statement.

Figure 7. The SELECT statement is saved in the business object application-specific information

For Oracle databases, the adapter supports complex data types such as array, table, structure, or nested structure in the query result of the business object. The adapter does not support these complex types as parameters in query business objects.


Business graphs

You can optionally choose, during adapter configuration, to generate a business graph. In version 7.5.0.3, business graphs are required only in these situations:

If business graphs exist, they are processed, but the verb is ignored for all operations except ApplyChanges.


How business objects are created

You create business objects by using the external service wizard, launched from IBM Integration Designer. The wizard connects to the database, discovers database objects, and displays them to you. Select the database objects for which you want to create business objects.

For example, specify which schemas you want to examine. In those schemas, select tables, views, stored procedures and functions, and synonyms and nicknames. In addition, you can create additional business objects.

For example, you can create a business object to represent the results of user-defined SELECT, INSERT, UPDATE, or DELETE statements that are run against the database. The wizard helps you build a hierarchy of business objects, using parent-child relationships.

After you specify the business objects that you want and define the hierarchy of those objects, the wizard generates business objects to represent the objects that you have selected. It also generates other artifacts needed by the adapter.

Figure 8. How business objects are created

In some instances, the wizard cannot completely configure a parent-child relationship. For these relationships, you use the business objects editor, started from IBM Integration Designer, to modify or complete the definition of a business object hierarchy that was created by the wizard. For more information, see the instructions for using the business object editor to modify business objects in the IBM Integration Designer information center at the following link: http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r0mx/index.jsp.

Technical overview of IBM WebSphere Adapter for Oracle E-Business Suite


Related reference:

Business object information