On removing the “root” attribute
on a choreography definition
Contribution
to the W3C WS-Choreography group on
removing the attribute “root”
on a Choreography definition
From: Tony Fletcher
This contribution is with reference to the Web Services Choreography Description Language Version 1.0, (http://www.w3.org/TR/2004/WD-ws-cdl-10-20041012/)
Marking a choreography as being the root choreography for that choreography description seems to be unnecessary and cause a problem in trying to re-use choreographies.
Section 2.4.6 “Including Choreographies” states:
Choreographies or fragments of Choreographies can be syntactically reused in any Choreography definition by using XInclude [27]. The assembly of large Choreography definitions from multiple smaller, well formed Choreographies or Choreography fragments is enabled using this mechanism.
However, the mechanism currently only works for fragments of choreographies, not complete choreographies. Currently a complete choreography will have a root choreography. When it is ‘included’ in another choreography description that description will already have a choreography marked as root and so the resulting choreography will have two choreographies marked as root, which is rightly disallowed.
Remove the root attribute from the definition of choreography and add a rule that the first choreography to be followed is the one that appears first in the XML description. In other words use lexical order. Call this the ‘initial’ choreography and use this term in place of ‘root’ most places where it currently occurs.
In section 2.4.4 ‘Choreographies’ change the 3rd paragraph to read:
A Choreography defined at the Package level is called a top-level Choreography, and does not share its context with other top-level Choreographies. A Package MAY contain exactly one top-level Choreography, or more than one top level Choreography. In the latter case, the first top level Choreography encountered in the XML description is the one that starts first and it is know as the initial Choreography.
Change the Choreography-Notation syntax to:
<choreography name="ncname"
complete="xsd:boolean XPath-expression"?
isolation="dirty-write"|"dirty-read"|"serializable"?>
<relationship type="qname" />+
variableDefinitions?
Choreography-Notation*
Activity-Notation
<exception name="ncname">
WorkUnit-Notation+
</exception>?
<finalizer name="ncname">
WorkUnit-Notation
</finalizer>*
</choreography>
Delete the sentence:
The optional root element marks a top-level Choreography as the root Choreography of a Choreography Package.
(And note that root was actually an attribute not an element)
Section 2.4.6 including Choreographies now becones true, but change the example to:
<choreography name="newChoreography">
...
<variable name="newVariable" informationType="someType"
role="randomRome"/>
<xi:include href="genericVariableDefinitions.xml" />
<xi:include href="otherChoreography.xml"
xpointer="xpointer(//choreography/variable[1]) />
...
</choreography>
In section 2.4.7 ‘Choreography Life-line’ change ‘root’ to ‘initial’ in several places.
Delete root=”true” attributes in the examples.
In section 2.5.3 ‘Composing Choreographies’ change the first two bullets to:
The Choreography to be performed MUST NOT be an initial Choreography
The Choreography to be performed MUST be defined either using a Choreography-Notation immediately contained in the same Choreography or it MUST be a top-level Choreography, which is not the initial one or in a different Choreography Package. Performed Choreographies that are declared in a different Choreography Package MUST be included first
In the schema remove the line:
<attribute name="root" type="boolean" use="optional" default="false"/>
Page