Oracle SOA Suite Online Training

Interested in learning Oracle SOA Suite 12c?
Learn from the author of this blog!
A complete and comprehensive course on the #1 platform on SOA - Oracle SOA Suite

Click here to find the complete course details
Click here to check the first session on Oracle SOA Suite 12c


Entity Variables - Connected Variables

This blog discusses about a new kind of variables in Oracle SOA Suite 11g called Entity Variables

There are 2 kinds of variables in general
XML DOM based Variables & Entity Variables

DOM based Variables
These are XML variables that adhere to a Schema.
XML Schema defines the structure of the variable.
These are disconnected variables, meaning once the variable value is fetched, it is stored in-memory, and is stored  during dehydration. After rehydration / variable being fetched, the same value gets retrieved, irrespective of whether that variable has changed in the database during this course of tim.
All the variables that we've been using in all the samples are disconnected variables.
The problem with these kind of variables is that sometimes, these may represent stale data.

For example, lets say varX is retrieved from a database table EMPLOYEES, and after that, assume an asynchronous service has been invoked. This service, say takes an hour to respond back. During this time, the entire state information is saved to the SOA datastore(dehydration). Once the async service responds back, all the state information is retrieved from the datastore
Lets assume that the actual data in the EMPLOYEES table has been changed during this 1 hr. But this change dont reflect in the variable because it has been fetched and stored in varX an hr back
Thus, varX now represent stale data, making varX a disconnected payload

The solution to these kind of scenarios is to have a connected variable, where during dehydration, only the reference is stored but not the actual data

Entity Variable
Entity Variable in Oracle SOA Suite 11g is a connected variable, which represents the latest data, always
This is connected in the sense that only the reference to the actual data is stored to the datastore during dehydration, and while rehydration, that reference is evaluated to the actual value, thus making the variable hold the current data always

Entity variables also support SDO-formed data. However, unlike the DOM variables, the entity variable with SDO-based data enables you to bind a unique key value to data (for example, the unique id). Only the key is stored in the dehydration store, the data requiring conversion is stored with the service of the
Oracle ADF Business Component application.

Oracle ADF BC component ApplicationModule lets us create SDO variables very easily. This is explained in the blog Creating an SDO out of ADF BC
Once the SDO is created, you can make use of the BPEL Process Editor to create Entity Variables by linking it to an SDO provider

This part is covered in the blog Data Access using SDO based Entity Variables

Hope this gives you an idea on the Entity Variables
Thanks for going through my post, feel free to provide a feedback!

No comments:

Post a Comment