Expressions

Expressions allow us to access parts of the variables. In the <assign> activities, we can use expressions to copy parts of variables or specific elements. We specify the expressions within the <from> and <to> elements. Expressions are written in the selected expression language; the default is XPath 1.0. The XPath language allows us to address XML in a similar way that we address files and folders in the filesystem. For detailed information on XPath, please refer to http://www.w3.org/TR/xpath/.

We access BPEL variables in XPath using the $ operator. This is particularly useful in the <copy> assignments, where we would like to access specific nested elements.

To write the copy assignment from the previous example with expression, we can ...

Get WS-BPEL 2.0 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.