This page provides information on WSO2 BPS's compliance to the final WS-BPEL 2.This page provides information on WSO2 BPS's compliance to the final WS-BPEL 2.0 specification released by OASIS.
...
Selects value stored in a BPEL variable
...
Code Block | ||
---|---|---|
| ||
<to|from variable="BPELVariableName"part="NCName"?><queryqueryLanguage="anyURI"?>? queryContent </query></to|from> |
- variable - (required) name of the variable
- part - (optional) if the type of this variable is a WSDL messageType, this attribute may be used to provide the name of a part within that variable. This attribute must not be used when the variable is defined using XML schema types or element.
- <query> element may be used to select a value from the source or target variable or message part. The computed value of the query must be one the following:
- a sigle XML node, for example an attribute or an element
- test(i. e. a text node, CDATA section, string-valued XPath expression, etc..)
...
Code Block | ||
---|---|---|
| ||
<frompartnerLink="NCName"endpointReference="myRole|partnerRole"/> <topartnerLink="NCName"/> |
...
- partnerLink - name of the partnerLink
- role - the role or "side" of the partnerLink
- myRole - the endpoint reference of the process
- partnerRole - the partner's endpoint reference
...
Allows data manipulation using properties. The property value generated by the from-spec is generated in the same manner as the value returned by the bpel:getVariableProperty() function.
...
Code Block | ||
---|---|---|
| ||
<to|from variable="BPELVariableName"property="QName"/> |
...
- variable - name of the variable referenced
- property - name of the property to apply to the variable
...
In the Expression Variant, an expression language (typically XPath), is used to calculate a value.
Code Block | ||
---|---|---|
| ||
<to|from expressionLanguage="anyURI"?>expression</from> |
- expressionLanguage - (optional) identifies the expression language.
- expression - the expression ; whose syntax is determined by the expression language.
The computed value of the expression must be one of the following:
- a single XML node, for example, an attribute or an element.
- text(i. e. a text node, CDATA section, string-valued XPath expression, etc.)
...
The literal variant allows a literal value to be given as the rvalue.
...
Code Block | ||
---|---|---|
| ||
<from><literal>literal value</literal></from> |
/literal></from> |
- literal value - value to be assigned
...
Empty Variant
Empty variant exist exists for extensibility purposes; it . It is not supported by WSO2 BPS.
<from|to/>
Insert Variant(non-standard extension)
...
- bpel:invalidVariables - A modified variable does not conform to its schema and the validate flag was is set to yes.
- bpel:selectionFailure - The node(s) selected by a from/to-spec is (are) invalid. This includes cases when the to-spec returns a node that is not an lvalue, when multiple nodes are selected, or when no node is selected.
- bpel:subLanguageExecutionFault - Evaluating the expression (in the expression variant), or the query (in the variable variant) generated generates an error. For example, if when a divide-by-zero is attempted.
- bpel:uninitializedVariable - The variable referenced in the from-spec has is not been initialized.
- bpel:mismatchedAssignmentFailure - The nodes selected by the to-spec and from-spec are not compatible. This For example, this could occur if for example an attempt was made to assign a text node to an element variable, or an element variable was assigned to a message variable.
Examples
- The following assigns a childless element bar in namespace http://example.com to an element-typed variable myFooBarElemVar:
...
Code Block | ||
---|---|---|
| ||
<assign> <copy> <from><literalxmlns:foo="http://example.com" |
...
><foo:bar/ |
...
></literal></from><tovariable="myFooBarElemVar"/> </ |
...
copy> </ |
...
assign> |
- The following assigns the string "FooBar" to a string-typed variable
...
- myStringVar:
Code Block | ||
---|---|---|
| ||
<assign> <copy> <from> <literal><![CDATA[FooBar]] |
...
></literal> </from> <tovariable="myStringVar"/> </ |
...
copy> </ |
...
assign> |
- The following assigns the string "" (i.e. the empty string) to a string-typed variable myStringVar:
...
Code Block | ||
---|---|---|
| ||
<assign> <copy> <from> <literal/> </from> <tovariable="myStringVar"/> </ |
...
copy> </ |
...
assign> |
- The following illustrates copying one variable (c1) to another (c2) as well as copying a variable part (address part of variable c1) to a variable of compatible element type (c3):
...
Code Block | ||
---|---|---|
| ||
<assign> <copy> <fromvariable="c1"/> |
...
<tovariable="c2"/> |
...
</copy> <copy> <from>$c1.address</from> <tovariable="c3"/> </ |
...
copy> </ |
...
assign> |
Excerpt | ||
---|---|---|
| ||
WS-BPEL 2.0 specification compliance of the WSO2 BPS. |