OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

wsbpel message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [wsbpel] Issue - 147 - Proposal For Vote

As we are approaching the f2f meeting, we now have proposals for the
complete 147(.x) family of issues.

The general requirement for the introduction of a foreach activity, in
particular its parallel flavor, has been made before and is not repeated

After "iterating" over the resolution proposals that have been provided
for Issue 147, we are convinced that a foreach using iterator variables
(this was also part of an earlier proposal) is more appropriate for
WS-BPEL users dealing with XML data.

===> Important Note: I am sending this as a counter proposal. However,
     any other mode is fine with me as well - amendment etc. I would like
     to make sure all options are fully explored at the TC before we go
     to a vote on either iterator variable or counter variable approach.

The iterator variable approach reflects XML data in a much more natural
way than any approach using counter variables. Indexing a variable is a
low-level programming exercise that can easily be left to an
implementation. There is no known use case that justifies throwing square
brackets and index variables into the end user's face when BPEL variables
outside of the foreach are accessed.

The aliasing approach is not more or less dangerous as the one used in
properties; the probability of encountering a selectionFailure is the

A single iterator variable is not sufficient. A single "set variable" that
contains input AND output of a foreach is hard to use when a subsequent
foreach takes its input from an earlier foreach's output. Moreover,
if data is combined from multiple sources, it is convenient to use
multiple iterator variables (same for producing multiple output sets).

This proposal follows the paradigm "Make the simple things easy and the
complicated things possible".


A foreach activity is used to iterate over a set of element information
items (EIIs), either serially or in parallel.

   <foreach parallel="yes|no" standard-attributes>
      <iteratorVariables loopVariable="ncname"? >
         <iteratorVariable name="ncname" type="qname"> +
            <query queryLanguage="anyURI">...</query>

The "parallel" attribute is used to determine whether the iterations of the
contained activity are to be executed in parallel or serially. The default
is "no".

The <iteratorVariables> section defines one or more iterator variables that
can be used in the contained activity. Its "loopVariable" attribute
designates one iterator variable which determines the number of iterations.
If only one iterator variable is present, then this is the loop variable,
in this case, the "loopVariable" attribute can be omitted.

Each iterator variable has a query that identifies a set of EIIs. In the
n-th iteration, each iterator variable acts as an alias for the n-th EII in
its associated set of EIIs. If an aliased EII does not exist then a
bpws:selectionFailure MUST be thrown.

As a result the previous rule, note that each set of EIIs MUST contain AT
LEAST as many EIIs as the set identified by the designated loop variable's

The following foreach activity takes a set of integer numbers from variable
"aSet" and stores the calculated results into output variable "bSet".

      <iteratorVariables loopVariable="input">
         <iteratorVariable name="input" type="xsd:int">
         <iteratorVariable name="output" type="xsd:int">

Variables aSet and bSet BEFORE foreach:



Variables aSet and bSet AFTER foreach:




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]