About Variables in the BPEL Designer

See Also

Variables in BPEL programming function just as they do in other programming languages: they hold temporary values, form parts of expressions, or are passed as parameters to external partners. Normally, you need a variable for every message sent to or received from a partner service. The BPEL Designer supports the following types of variables:

Global and Local Variables

The variables defined at the Process root are global variables which have global visibility throughout the entire process. However, the variables defined within a particular Scope are visible only inside that Scope and all nested Scopes. These variables are called local variables. A variable defined for an inner Scope element can hide an upper defined variable of the same name.

The name of a variable must be unique among all variables defined within the same Scope.

Using Variables

Follow these basic steps to use variables:

Copying Variable Data and Creating Expressions

You can copy data from one variable to another variable using the BPEL Mapper. See Creating BPEL Mappings for details about copying data.

Using the BPEL Mapper you can also create an XPath 1.0 expression for a business process element that requires this expression.

Refactoring

The BPEL Designer automatically synchronizes the names of defined variables and their usages. For example, when you rename a variable, all its usages are adjusted automatically to reflect the new name, including the usage of this variable name inside XPath expressions. See Refactoring in BPEL Processes for details about the refactoring rules in the BPEL Designer.

See Also
Creating Variables
About the BPEL Mapper
BPEL Designer Navigator: BPEL Logical View

Legal Notices