Overview

Service Data Objects (SDO) and Business Objects are used to provide the data flowing among different components defined by the Service Component Architecture. Business Objects can be created using the Business Object Editor in WID. Business Objects are converted into SDOs when they are processed by the WebSphere process Server, in order to provide a unique description for data. 

SDO API programming is supported in several editors in WID such as the Business State Machine and Business Process Editors, which support Java snippets. Using SDO API content assist simplifies SDO programming which includes locating a service, instantiating data objects, and manipulating the data.

Sample application

This sample provides five components: an invocation task, a business process, a java component and a flat file outbound adapter. The business process is the implementation of the service and is invoked by the invocation task to process the user’s order business object. The PrintResult java component prints the order details to the console while the SaveResult adapter saves the xml content of order details to a file located on the local file system. Refer to the Run the sample section on how to run this sample application.

OrdersModule

The components of the OrdersModule are shown in the following assembly diagram:

The invocation task "PlaceOrder" invokes the business process "OrderProcess". Both use the same interface "PlaceOrder":

The business process “OrderProcess” invokes the reference partners “PrintResult” which uses “PrintResults” interface and “SaveResult” which uses “SaveResults”:

When an input message arrives, the business process computes the output message and invokes “printOrder” and “saveResult” partners. Then, it sends the reply message back to the invoker:

In this sample, we are using the SDO API content assist to access data in such a business object. We show you how to set and retrieve values for attributes with business object types and arrays through content assist. For example, Order in the business object below.