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 > Overview of IBM WebSphere Adapter for JDBC > Technical overview > Outbound processing > Outbound operations

Batch operations

The behavior of Batch operations is directly dependent on the support provided by the JDBC drivers of the respective Database vendors. Ensure that you pay attention to any note that describes a behavior specific to a database type.

Batch operations are provided as high performance solutions to insert/update a large number of records in the database, or delete a large number of records from the database.

A Batch operation accepts a list of business objects and processes the top-level business objects in a batch mode (Hierarchical business objects with child business objects is currently not supported). Batch operations include BatchCreate, BatchUpdate, and BatchDelete. See BatchCreate operation, BatchUpdate operation, and BatchDelete operation.


Input Business Object

The figure displays an example of an input business object for a Batch operation.

The input business object contains of a list of business objects (

For example, CustomerList).


Returned Business Object

The figure displays an example of a returned business object (BatchResult Business Object) for a Batch operation.

The BatchResult Business Object contains a list of business objects (businessobjects), update counts (affectedrowcounts), and error messages (errormessages), which are explained below.


businessobjects

It contains a list of the returned result business object. In most cases, it is the same as the input business object. But, if there are sequence UIDs or CopyAttributes ASIs configured to the properties of the input business object, the updated business object will be returned.

The result business objects are returned by default. You can configure the adapter not to return the result business objects by appropriately setting the value of the returnBOsInBatch interaction property.


affectedrowcounts

Indicates the number of records affected in the database. This is returned by the database drivers. So, the values displayed here depends on the conventions used by different drivers.

Description of affectedrowcounts
Value Description
0 Indicates that no records are affected (The adapter views this as a record not found exception).
1 Indicates that only one record is affected (expected result).
-2 Indicates that the batch statement was successfully executed, but the count of the number of rows affected is unavailable.
-3 Indicates that the Batch operation failed to execute. The detailed error message can be found in the corresponding errormessages field. The error messages returned depends on the database driver.

For example, the MS SQL Server database might return only the first exception message for a record that failed.

-99998 Indicates that the business object was skipped unexpectedly. This is adapter-specific. The error message is probably unavailable. For further assistance, contact WebSphere Adapters Support.
-99999 Indicates an invalid input, which is adapter-specific. An internal exception or unknown exception is thrown. The details of the error message can be found in the corresponding errormessages field.


errormessages

Indicates the detailed error message of the corresponding input business object.


Exception Handling

When errors occur during Batch operations, the skipErrorsInBatch (default value is false) option can be used to configure how to handle such errors.

Outbound operations


Related concepts:

Create operation

Retrieve operation

RetrieveAll operation

Update operation

UpdateAll operation

ApplyChanges operation

Delete operation

DeleteAll operation

Execute operation

Exists operation

Upsert operation