The BPEL 1.1 spec says the following:

"When only the first argument is present, the function extracts the
value of the variable, which in this case must be defined using an XML
Schema simple type or element. Otherwise, the return value of this
function is a node set containing the single node representing either an
entire part of a message type(if the second argument is present and the
third argument is absent) or the result of the selection based on the
locationPath (if both optional arguments are present). If the given
locationPath selects a node set of a size other than one during
execution, then the standard fault bpws:selectionFailure MUST be thrown
by a compliant implementation."

How can you then write BPEL code to determine the count of nodes such
as:
    <from expression="count(bpelx:getVariableData(some-req-msg',
some-part', /xxx:request/yyy:id'))"/>
    <to variable="count">

If there were no "yyy:id" or more than 1 then the getVariableData would
seem
to have to throw a SelectionFailure.

Thanks in advance!
-Doug.

Reply via email to