Information Technology Reference
In-Depth Information
a destination. For example, an assign can indicate an XML data of the reply
message of an invocation to be copied to the input message of another
invocation. Effectively this will be implementing the interaction between the
two services through the controlling BPEL process. Assign is often used to
update variables and other process properties.
XML data models of real applications, of course, tend to be more com-
plex. Support for XPath in BPEL will literally allow any node of a given
XML structure to be precisely located using proper queries or expressions;
for example, to look for the element that has a particular attribute, or an
element in an array at a particular position, or an element that has a parti-
cular child node, or a set of nodes that hold particular text values, and so
on. XPath functions, as a subset of the XPath specii cation, provide further
operability for XML data manipulation, such as strings concatenation,
rounding of numeric values, returning position information, arithmetic
operations, boolean evaluation, and so on. The example below shows how
the value of an input variable is copied to the output using a simple XPath
query. The full XPath support should be sufi cient in most cases for most
users. In more complex situations, BPEL also supports XSLT transforma-
tion that basically allows complete transformation of the XML document
according to provided external XSL style-sheets, in which transformation
templates have been dei ned by a user in advance.
<bpws:assign name=”initialisation” validate=”no”>
<bpws:copy>
<bpws:from>$input.payload/tns:input</bpws:from>
<bpws:to part=”payload” variable=”output”>
<bpws:query>tns:result</bpws:query>
</bpws:to>
</bpws:copy>
</bpws:assign>
Assign is one of the most frequently used activities in BPEL. The decent
support of XML processing has made it a crucial element for dei ning data
l ows in process modeling with full control of XML data and dei nitions.
Given the l exibility of using it in BPEL, people are likely to i nd themselves
more than a single solution for data handling in practice.
8.6
Any system can unexceptionally encounter errors. Like any distributed
system, BPEL processes, which involve service interactions beyond admin-
istration boundaries, are typically error-prone. Error handling in BPEL, in
Error Handling
 
 
Search WWH ::




Custom Search