Overview of Variables
A BPEL process receives, manipulates, and sends data through XML variables. Variables hold the messages exchanged between business partners and data used within the process.
For example, a process that receives a purchase order message from a buyer puts the message in an input variable. From there the variable content can be accessed by other operations. The following illustration shows an example.
Variables are defined in one of the following ways:
Tips for using variables:
- •You can initialize a variable when you declare it. For details, see Initializing a Variable.
- •You can validate the value of variables against their definitions by adding a validate activity or a validate attribute in an assign activity. For details, see Validate and Assign.
- •Variables can have attachments, and you can manipulate the attachments, as described in Attachments.
XML Syntax
<variable name="BPELVariableName"
messageType="QName"? type=QName? element=QName?>+ from-spec?
</variable>
A variable name cannot contain the "." character. This character is reserved for use as a delimiter in WS-BPEL's default binding to XPath 1.0.