selectionFailure Fault is Thrown if the Result Node Set is a Size Other Than One During Execution
According to the Business Process Execution Language for Web Services Specification, if the locationPath
argument selects a node set of a size other than one during execution, the standard fault bpws:selectionFailure
must be thrown by a compliant implementation.
For example, the count()
function shown in the following code does not work if there are multiple entries of product
elements under StoreRequest
; this causes a selectionFailure
fault to be thrown:
count(bpws:getVariableData('inputVariable', 'payload','/ns2:StoreRequest/ns2:product'))
To make this work, change the syntax to the following:
"count($inputVariable.payload/ns2:product)"