Databases Reference
In-Depth Information
Within a BPEL process, an entity variable appears to be almost like any other variable
defined to the process in that we can assign values to and from this variable as
we would do with any standard variable. The key difference is that the variable
is actually bound to a remote SDO, which itself provides an abstraction over the
underlying data source.
Thus, when a BPEL process reads data from an entity variable, it is actually reading
data from the underlying database. Conversely, when it updates the content of an
entity variable, it is actually updating the corresponding content in the database.
Before we can perform operations on an entity variable (for example, assigning
values to or from it), we must first bind our entity variable to an SDO. We can either
do this using a Bind Entity activity, where we specify the primary key of the SDO
we wish to bind to, or using the Create Entity activity, which is used to insert a new
entity (row) into a database table. In this process our entity variable is bound to the
newly created SDO.
Creating an entity variable
For our List Item Process, we need to define an entity variable for the new listing
we wish to create and manage. We create an entity variable in a similar way to a
standard variable, but with a couple of key differences.
First, the variable must be of type Element , where the element is defined on the
corresponding SDO type ( listingViewSDO in our example). To do this, launch the
Type Chooser and expand the structure underneath the SDO partner link, as shown
in the following screenshot, and select the corresponding SDO element:
 
Search WWH ::




Custom Search