Design pattern for Process, Change and Sync service implementation (SOI)

WebSphere Commerce contains many controller commands that can be exposed as services. The Process and Change BOD command is just a command that converts the existing BOD request into a set of name-value pairs and delegates to an existing WebSphere Commerce controller command. However, the existing message mapping feature of WebSphere Commerce provides this feature and already addresses some of the additional customization aspects of extending the noun and adding more information. We need to customize only the controller command where the name-value pairs exist. You do not need to write new code to read the BOD request.

In order to do this, the service request is mapped to a generic message-mapping service command called com.ibm.commerce.foundation.server.command.soi.MessageMappingCmdImpl. This generic command uses the message-mapping configuration defined under the name "component-services" to convert the SDO into a set of name-value pairs and a WebSphere Commerce command implementation. Then it implements the command and responds to the request.

The following diagram illustrates flow of processing in the design pattern:

In the message mapping configuration, this generic command looks for two control attributes to determine the code to call to generate the response. The attributes are responseCommand and errorCommand. The generic command uses the specified implementation to generate the response to the request. This implementation is the code hook to generate the success or error response. These response generators must follow the MessageMappingResponseCmd interface.


Related concepts
Message mappers
Service Data Objects (SDO)
Design pattern for Get service implementation (SOI)
Design patterns


Related tasks
Creating the component facade