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

Upsert operation

The Upsert operation either updates or inserts records in a table. If the table does not have the record that matches the query, the Upsert operation inserts a new record. If the table already has the record that matches the query, the Upsert operation updates the existing record.


Single-cardinality relationships

Behavior of the Upsert operation in single-cardinality relationships
Application-specific information Behavior of the Upsert operation

Ownership = True and KeepRelationship = True

  • If the parent and the child business objects do not exist, they are created.

  • If the parent and the child business objects exist, they are updated.

  • If the parent business object exists and the child business object does not exist, the parent is updated and the child is created. There is no change to the child table record with same parent.

  • If the parent business object does not exist and the child business object exists, the parent is created and the adapter returns the UniqueConstraint fault for the child.

Ownership = True and KeepRelationship = False

  • If the parent and the child business objects do not exist, they are created.

  • If the parent and the child business objects exist, they are updated.

  • If the parent business object exists and the child business object does not exist, the parent is updated and the child is created. The child table record with same parent is deleted.

  • If the parent business object does not exist and the child business object exists, the parent is not created, and the adapter returns the UniqueConstraint fault for the child.

Ownership = False and KeepRelationship = True or

Ownership = False and KeepRelationship = False

  • If the parent and the child business objects do not exist, they are not created. The adapter returns the business object not found error for the child.

  • If the parent and the child business objects exist, only the parent is updated.

  • If the parent business object exists and the child business object does not exist, the parent is not updated and the adapter returns the business object not found error for the child.

  • If the parent business object does not exist and the child business object exists, the parent is created.

In hierarchical business objects with no primary key as UID in the top-level business object, if top-level business object exists, it is updated else it is created. If no primary key is set, the adapter returns the MissingData fault.

In hierarchical business object with primary key as UID, if the primary key is set and the business object exists, it is updated else it is created. If the primary key is not set, the business object is created.


Multi-cardinality relationships

Behavior of the Upsert operation in multi-cardinality relationships
Application-specific information Behavior of the Upsert operation

Ownership = True and KeepRelationship = True

  • If the parent and the child business objects do not exist, they are created.

  • If the parent and the child business objects exist, they are updated. There is no change to the child table record with same parent.

  • If the parent business object exists and child business object does not exist, the parent is updated and the child is created. There is no change to the child table record with same parent.

  • If the parent business object does not exist and child business object exists, the parent is created, and the adapter returns the UniqueConstraint fault.

Ownership = True and KeepRelationship = False

  • If the parent and the child business objects do not exist, they are created.

  • If the parent and the child business objects exist, they are updated. The child table record with same parent is deleted.

  • If the parent business object exists and child business object does not exist, the parent is updated and the child is created. The child table record with same parent is deleted.

  • If the parent business object does not exist and child business object exists, the parent is created, and the adapter returns the UniqueConstraint fault.

Ownership = False and KeepRelationship = True or

Ownership = False and KeepRelationship = False

  • If the parent and the child business objects do not exist, the parent is created, and the adapter returns the business object not found error for the child.

  • If the parent and the child business objects exist, only the parent is updated.

  • If the parent business object exists and child business object does not exist, the parent is updated. The adapter returns the business object not found error for the child.

  • If the parent business object does not exist and child business object exists, the parent is created.

Outbound operations


Related concepts:

Create operation

Retrieve operation

RetrieveAll operation

Update operation

UpdateAll operation

ApplyChanges operation

Delete operation

DeleteAll operation

Execute operation

Exists operation

Batch operations