How to Concatenate Strings
The concatenation is accomplished with the core XPath function named concat
. In addition, the variable value involved in the concatenation is retrieved with the BPEL XPath function getVariableData
. In the following example, getVariableData
fetches the value of the name
field from the input
variable's payload
part. The string literal 'Hello '
is then concatenated to the beginning of this value.
<assign> <!-- copy from XPath expression to the variable --> <copy> <from expression="concat('Hello ', bpws:getVariableData('input', 'payload', '/p:name'))"/> <to variable="output" part="payload" query="/p:result/p:message"/> </copy> </assign>
Other string manipulation functions available in XPath are listed in section 4.2 of the XML Path Language (XPath) Specification.