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

Create operation

The Create operation creates rows in database tables corresponding to the business object in the request. When given a hierarchical business object, the Create operation recursively traverses the business object, creating rows corresponding to each business object in the hierarchy.

To process the Create operation, the adapter performs the following actions:

  1. Checks whether the business objects is a wrapper. If the top-level business object is a wrapper business object, the adapter ignores the business object. No rows are created for wrapper objects.
  2. Recursively inserts each single-cardinality child business object contained with ownership into the database. In other words, the adapter creates the child and the all child business objects that the child and its children contain.

    If the business object definition specifies that an attribute represents a child business object with single-cardinality and that attribute is empty, the adapter ignores the attribute. However, if the business object definition requires that the attribute represent a child, and it does not, the adapter returns an error, and stops processing.

  3. Retrieves and checks the existence of each single-cardinality child business object contained without ownership. If the retrieval is unsuccessful, indicating that the child does not exist in the database, the adapter returns an error, and stops processing. If the Retrieve operation is successful, the adapter recursively updates the child business object.

    For this approach to work correctly when the child business object exists in the database, primary-key attributes in child business objects must be cross-referenced correctly on Create operations. If the child business object does not exist in the application database, the primary-key attributes must not be set.

  4. Inserts the top-level business object in the database by performing the following actions:
    1. Sets each of the foreign-key values of the top-level business object to the primary key values of the corresponding child business object represented with single-cardinality. Because values in the child business objects can be set by database sequences or counters, or by the database itself when the child is created, this step ensures that the foreign-key values in the parent are correct before the adapter inserts the parent in the database.
    2. Generates a new, unique ID value for each attribute that is set automatically by the database. The name of the database sequence or counter is stored in the application-specific information for the attribute. If an attribute has an associated database sequence or counter, the value generated by the adapter overwrites any value passed by the application server.

    3. Inserts the top-level business object into the database.

    The adapter treats an empty complex column as a null column irrespective of setting the value to null or unset.

  5. Processes each of its multiple-cardinality child business objects as follows:
    1. Sets the foreign-key values in each child to reference the value in the corresponding primary key attributes in the parent. Because the parents primary key values might have been generated during the creation of the parent, this ensures that the foreign-key values in each child are correct before the adapter inserts the child into the database.

    2. Inserts each of the multiple-cardinality child business objects into the database.

For more information about null data, see Null Data - Frequently Asked Questions.

Outbound operations


Related concepts:

Retrieve operation

RetrieveAll operation

Update operation

UpdateAll operation

ApplyChanges operation

Delete operation

DeleteAll operation

Execute operation

Exists operation

Upsert operation

Batch operations


Related tasks:

Selecting and configuring tables, views, and synonyms or nicknames for outbound processing

Selecting and configuring query business objects


Related reference:

Fault business objects

Business object attributes