Search 800 + Posts

Sep 27, 2010

Service Data Objects (SDOs) and How to Invoke SDO in BPEL Composite (Part-3)

With reference to Part-1 / Part-2 , we know that we can use SDO based webservices to perofrm the data manipulation operation on the data that needs to be persisted to the database.
In my example I have designed 2 webservice to manipulate customer and Stock data.we will use these 2 services in BPEL to get the customer/Stock details from the database by passing it the appropriate data and expect the customer and stock details in the response.

Please Note that this is just an example about how to design and use the SDO based webserives .We usually use SDO based webservices in BPEL services only when there is requirement to operate on data that needs to be persisted to the database.

In Oracle SOA Suite 11g, a new feature has been introduced called Entity Variables.An entity variable is a special type of variable that can be used in a BPEL process for  accessing and manipulating data from database and  underlying data form for an Entity Variable is an SDO.


NOTE - Entity variable only holds the reference to the data. The underlying data provider takes care of retrieving and holding the data. To retrieve a row from the database, you need to assign a value for the primary key. The action of assigning the value, called binding, initiates the retrieval of the corresponding row.
In my Example -
Below is Youtube Demo about how to call SDO based Web Services from BPEL



  1. I will Create 2 SDO basedwebservices and exposed them to BPEL process.
  2. Define the XML Schema for BPEL input and output variable.
  3. To access data from SDO based Webservices I will define the Entity variable for both the Web services.An Entity Variable need Primary/Unique key to reterive/manipulate data.
  4. Define Bind Entity Component in the BPEL Flow to process the Entity variable.In bind Entity component I will assign the primary Key and Value to the Entity Variable.
  5. Define Assign activity to Assign the value reterive from database by Entity variable( for primary key) to the BPEL Output variable.
  6. Define Assign Activity to Assign the value from BPEL variable to Entity Variable( for Primary key).Since entity variable are based on Entity based SDOs,these changes to the entity variable are automatically applied to the database.

It is clear from above example that Oracle JDeveloper allow us to Create SDOs and data access
services declaratively using ADF-BC. With the introduction of Entity Variables in BPEL, it is now easy to operate on data that needs to be persisted to the database, in a transaction, from within a BPEL process

No comments:

Post a Comment