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 > JDBC > Reference > Business object information

Business object-level application-specific information

Application-specific information in business object definitions provides the adapter with application-dependent instructions for how to process business objects. The adapter parses the application-specific information from the business object or from its attributes or operations to generate queries for Create, Update, Retrieve, and Delete operations.


Application-specific information for table and view business objects

Application-specific information at the business-object level is used to specify the name of the corresponding database table and to provide information necessary to perform a physical or logical Delete operation.

The external service wizard sets the TableName application-specific information attribute to a value in the form of SchemaName.TableName. It prompts you for the information necessary to perform a physical or logical Delete operation and then sets the business object-level application-specific information shown in Table 1.

Business object application-specific information (ASI) for a table business object
Application-specific information Type Description
TableName String The name of the database table corresponding to this business object.
StatusColumnName String Indicates whether the adapter is to logically or physically delete data in the table. If the StatusColumnName parameter is not set, data is physically deleted. If the parameter is set, it specifies the name of the column that indicates a logically deleted row. You specify this parameter when you select the table object in the external service wizard.

This parameter applies to both Update and Delete operations.

StatusValue String The value that indicates that a column is logically deleted. You specify this value when you select the table object in the external service wizard.
TableNameEnv String Contains the environment variable name of the run time. At run time, the adapter picks this value from the administrative console to overwrite the database schema name.

The run time must contain the defined variable before the application is deployed.

When a new environment variable is created, you must restart the server for the variable to be available for the applications.

To illustrate how the adapter determines whether to do a logical or physical delete in response to an Update or Delete operation, assume that a Customer business object has the business object application-specific information shown in Table 2.

Sample parameters for business object application-specific information for a table business object
Application-specific information Value
TableName customer
StatusColumnName status
StatusValue deleted

Assume that the adapter receives a request to delete a customer. Because the business object includes the StatusColumnName parameter in its application-specific information, the adapter performs a logical delete operation. It does this by placing the string "deleted", which is specified in the StatusValue parameter, in the status column, which is the column specified in the StatusColumnName parameter.

Such a request causes the adapter to issue the following SQL statement:

UPDATE customer set status = 'deleted' where pkey = . . . . 

However, if the StatusColumnName parameter is not set, the customer records are physically deleted. The adapter issues the following SQL statement:

DELETE from customer where pkey = . . . . 


Application-specific information for stored procedure business objects

For business objects that are based on stored procedures, the external service wizard sets the business object-level application-specific information SPName to a value in the form of SchemaName + SPName. It sets the business object-level application-specific information, which is listed in Table 3. The attributes of the business object are created based on the stored procedure input/output parameters. If the stored procedure has one returned value, a corresponding business object attribute is created.

If the returned value or any of the input/output parameters are complex data types, the wizard creates child business objects for them.

The discovery of database objects in the external service wizard can support nested structures and arrays. If these child business objects are generated from returned result sets, their names are in the form of Prefix + SchemaName + SPName + RetRS + Number.

For example, if one stored procedure returns two result sets, the wizard creates two child business objects for them. Their names will be Prefix + SchemaName + SPName + RetRS1 and Prefix + SchemaName + SPName + RetRS2.

When the child business objects are generated from input/output parameters with a complex data type of ResultSet, Struct, or Array, these child business object names are in the form of Prefix+ SchemaName+ SPName+ ParameterName. For those child business objects that correspond to nested structures and arrays, their business object names are in the form of Prefix+ SchemaName+ SPName+ ParameterName+ ColumnName.

Business object application-specific information (ASI) for business objects based on stored procedures
Application-specific information Type Description
SPName String The name of the stored procedure or stored function
ResultSet Boolean Indicates whether the stored procedure or stored function returns a result set. If true, the stored procedure returns one or more result sets. If false, the stored procedure or stored function does not return a result set.
MaxNumberOfRetRS String The maximum number of returned result sets that are handled by the adapter run time.
ReturnValue String Set to the name of the corresponding business object attribute if the stored procedure has a return value. If the returned value is of simple data type, the attribute is also of simple data type. If the returned value is a result set, this attribute points to a child business object.


Application-specific information for query business objects

For query business objects, there is one business object-level application-specific information, as shown in Table 4.

Business object application-specific information (ASI) for query business objects
Application-specific information Type Description
SelectStatement String The complete SELECT statement that performs the query. You specify the statement in the external service wizard.

The external service wizard also generates business graphs for all business objects, because all are top level. The name of the business graph will be the business object name followed by "BG."

For example, a business object with the name JDBCSchema1Customer would have the business graph named JDBCSchema1CustomerBG. The operations set in the business object are also set in the business graph.

When the wizard generates a stored procedure business object, it creates a child business object if necessary, such as for ResultSet, Struct, and Array. Creating parent-child relationships between table business objects is done manually using the Business Object Editor.

The wizard handles business objects based on synonym/nicknames like objects based on tables and views, even when a synonym is of a stored procedure.


Application-specific information for batch SQL business objects

Batch SQL business objects have the following application-specific information,

Business object application-specific information (ASI) for batch SQL business objects
Application-specific information Type Description
BatchSQLIndex String Specifies the order of the SQL statement.

For example, if the user specifies 3 statements (separated by semicolons) in one batch SQL business object, the first statement has the index of 1, the second has the index of 2, and the last has the index of 3.

SQLStatement String Contains one INSERT, UPDATE, and DELETE SQL statement specified by the user. If the user specifies multiple SQL statements in one business object, each is stored in a separate SQLStatement element.

For example:

Delete From Customer where pkey=?

Insert into customer (pkey,ccode,fname,lname values(?,?,?,?)


Application-specific information for wrapper business objects

For wrapper business objects, the Wrapper application-specific information is added and set to True. No other application-specific information is needed at the business object-level on a wrapper business object.

Business object application-specific information (ASI) for wrapper business objects
Application-specific information Type Description
Wrapper Boolean Indicates whether the business objects is a wrapper business object

When Wrapper is True, no other business-object level ASI is needed.

Business object information