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 > Adapter Toolkit > Implementing code from the IBM WebSphere Adapter Toolkit > Outbound support > Use command patterns

Command Manager

The Command Manager is a utility designed to reduce complexity when dealing with delta and snapshot hierarchical objects. You use the Command Manager to consolidate the code necessary to deal with these objects, breaking down the structure into nodes, then creating commands that can deal with each node.


Snapshot objects

Consider the simple case of a snapshot Create operation involving a structure to create inside the EIS. The Command Manager creates a command structure composed of Create commands that is based on the incoming structure.

This command structure will then be processed by the interpreter. As the interpreter processes each individual command, the assigned objects are created.

With a snapshot Update, the Command Manager must retrieve the object from the EIS, compare it to the incoming structure and create a command structure that can change the data in the EIS to match the incoming structure.

Consider the following scenario: Child B1 is in the EIS, but is not in the incoming structure. Child B1, then, must be deleted. The Command Manager will process a Retrieve command to build the structure as it appears in the EIS, then compare this structure to the incoming object tree. The comparison finds that child B1 is deleted. Accordingly, the resulting command structure has a Delete command in that position.

Command Manager Retrieve scenario

This behavior is dependant on the ability of the Command Manager to determine child keys. Be sure to mark the child key fields in the business object definition using the appropriate Application Specific Information.

Command Manager Delete


Delta objects

Delta processing is only relevant for service data objects (SDO).

The Command Manager functions in a similar way when processing delta objects. Instead of retrieving and comparing, the command manager reads the change summary for the intended changes. If that since a child object might be changed without any change to the parent object, and since many EIS systems require a parent pointer in order to process children, the command manager generates NO_OPERATION commands for the untouched parents of changed child objects.

Suppose, as in the example below, that child B1 is created and is part of the change summary. The resulting command structure will contain a Create command for child B1, and will have NO-OPERATION parents linking it back to the top level parent.

Command Manager Create

When it processes this structure, the interpreter will process the No-op commands as well as the Create command. In general, the no-op commands should not modify data in the EIS system.

Use command patterns