WS-BPEL 2.0 Beginner's Guide
上QQ阅读APP看书,第一时间看更新

Chapter 3. Variables, Data Manipulation, and Expressions

A very important part of each BPEL process is the orchestration of services (partner links) through the operation invocations. With each operation invocation, messages are exchanged. When a BPEL process invokes an operation on the external service and when it receives the result, we often want to store the messages temporarily, while the BPEL process is executing. The same holds true for other data that is related to the process state. This is where we need to use variables.

BPEL supports variables like any other programming language. It allows data manipulation in different ways, as we will see in this chapter. In contrast to many other programming languages, variables in BPEL are stored in XML. This means that manipulating variables in BPEL requires us to be familiar with XML and XML schemas.

In this chapter, we will learn how to declare and use variables, how to store, assign, copy, and manipulate data within variables, which variable types are supported, and other interesting aspects about variables. We will also learn that variable declaration and manipulation in BPEL is closely related to XML schema and WSDL.

In this chapter, we will take a closer look at the variable declarations, Web Services Description Language (WSDL), assign activity, and other means for variable data manipulation. In this chapter, we shall:

  • Understand BPEL variables
  • Know how to declare variables and be familiar with variable types
  • Be familiar with data manipulation and the <assign> activity
  • Understand different possibilities with <assign>
  • Understand the XPath expressions and know how to access variables from expressions
  • Know how to validate variables
  • Understand how and when to use XSLT transformations

So, let's get started...