W3C

Web Services Choreography Description Language Version 1.0

W3C Working Draft 12 October17 December 2004

This version:
http://www.w3.org/TR/2004/WD-ws-cdl-10-20041012/http://www.w3.org/TR/2004/WD-ws-cdl-10-20041217/
Latest version:
http://www.w3.org/TR/ws-cdl-10/
Previous version:
http://www.w3.org/TR/2004/WD-ws-cdl-10-20040427/http://www.w3.org/TR/2004/WD-ws-cdl-10-20041012/
Editors:
Nickolas Kavantzas, Oracle
<nickolas.kavantzas@oracle.com>David Burdett, Commerce One
<david.burdett@commerceone.com>Gregory Ritzinger, Novell
<gritzinger@novell.com>Tony Fletcher, Choreology
Yves Lafon, W3C

Abstract

The Web Services Choreography Description Language (WS-CDL) is an XML-based language that describes peer-to-peer collaborations of parties by defining, from a global viewpoint, their common and complementary observable behavior; where ordered message exchanges result in accomplishing a common business goal.

The Web Services specifications offer a communication bridge between the heterogeneous computational environments used to develop and host applications. The future of E-Business applications requires the ability to perform long-lived, peer-to-peer collaborations between the participating services, within or across the trusted domains of an organization.

The Web Services Choreography specification is targeted for composing interoperable, peer-to-peer collaborations between any type of party regardless of the supporting platform or programming model used by the implementation of the hosting environment.

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This is the second publisheda Last Call Working Draft of the Web Services Choreography Description Language document. ItThe Last Call review period ends 31 January 2005. Comments on this document should be sent to public-ws-chor-comments@w3.org (public archive). It is inappropriate to send discussion emails to this address.

Discussion of this document takes place on the last version before Last Call WDpublic public-ws-chor@w3.org mailing list (public archive) per the email communication rules in the Web Services Choreography Working Group charter.

It has been produced by the Web Services Choreography Working Group, which is part of the Web Services Activity.

This document is a chartered deliverable of the Web Services Choreography Working Group. Some issuesIssues are already identified andrecorded in the process of being fixed before going to Last Call , see thegroup's issue section.

The Working Group identified two issues. Those issues may be dropped or fixed in the future, but the Working Group does not believe that the resolution will result in a substantive change.

This document is based upon the Working Draft published on 27 April12 October 2004. Changes between these two versions are described in a diff document.

Comments on this document should be sent to public-ws-chor-comments@w3.org ( public archive ). It is inappropriate to send discussion emails to this address. Discussion of this document takes place on the public public-ws-chor@w3.org mailing list ( public archive ) per the email communication rules in the Web Services Choreography Working Group charter .This document has been produced under the 24 January 2002 CPP as amended by the W3C Patent Policy Transition Procedure. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) with respect to this specification should disclose the information in accordance with section 6 of the W3C Patent Policy. Patent disclosures relevant to this specification may be found on the Working Group's patent disclosure page.

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

Table of Contents

1 Introduction
    1.1    1.1 Notational Conventions
    1.2    1.2 Purpose of the Choreography Description Language
    1.3    1.3 Goals
    1.4    1.4 Relationship with XML and WSDL
    1.5    1.5 Relationship with Business Process Languages
    1.6 Time Assumptions
2 Choreography Description Language Model
    2.1    2.1 WS-CDL Model Overview
    2.2 Choreography    2.2 WS-CDL Document Structure
        2.2.1 Package         2.2.2        2.2.1 Choreography Package
        2.2.2 Including WS-CDL Type Definitions
        2.2.3 WS-CDL document Naming and Linking
        2.2.3        2.2.4 Language Extensibility and Binding
        2.2.4        2.2.5 Semantics
    2.3    2.3 Collaborating Parties
        2.3.1        2.3.1 Role Types
        2.3.2 Participant Types         2.3.3        2.3.2 Relationship Types
        2.3.4        2.3.3 Participant Types
        2.3.4 Channel Types
    2.4    2.4 Information Driven Collaborations
        2.4.1        2.4.1 Information Types
        2.4.2        2.4.2 Variables
            2.4.2.1        2.4.3 Expressions
        2.4.3            2.4.3.1 WS-CDL Supplied Functions
        2.4.4 Tokens
        2.4.4        2.4.5 Choreographies
        2.4.5        2.4.6 WorkUnits
        2.4.6 Including Choreographies         2.4.7        2.4.7 Choreography Life-line
        2.4.8        2.4.8 Choreography Recovery             2.4.8.1Exception Block             2.4.8.2 Finalizer Block     2.5Handling
        2.4.9 Choreography Finalization
        2.4.10 Choreography Coordination
    2.5 Activities
        2.5.1        2.5.1 Ordering Structures
            2.5.1.1            2.5.1.1 Sequence
            2.5.1.2            2.5.1.2 Parallel
            2.5.1.3            2.5.1.3 Choice
        2.5.2        2.5.2 Interacting
            2.5.2.1            2.5.2.1 Interaction Based Information Alignment
            2.5.2.2 Protocol Based Information Exchanges             2.5.2.3            2.5.2.2 Interaction Life-line
            2.5.2.4            2.5.2.3 Interaction Syntax
        2.5.3        2.5.3 Composing Choreographies
        2.5.4        2.5.4 Assigning Variables
        2.5.5        2.5.5 Marking Silent Actions
        2.5.6        2.5.6 Marking the Absence of Actions
        2.5.7 Finalizing a Choreography
3 Example
4 Relationship with the Security framework
5 Relationship with the Reliable Messaging framework
6 Relationship with the Transaction/CoordinationCoordination framework
7 AcknowledgmentsRelationship with the Addressing framework
8 ReferencesConformance
9 Acknowledgments
10 References
11 Last Call Issues
    11.1 Issue 1
    11.2 Issue 2
12 WS-CDL XSD Schemas


10 WS-CDL Supplied Functions1 Introduction

For many years, organizations have being developing solutions for automating their peer-to-peer collaborations, within or across their trusted domain, in an effort to improve productivity and reduce operating costs.

The past few years have seen the Extensible Markup Language (XML) and the Web Services framework developing as the de-factode facto choices for describing interoperable data and platform neutral business interfaces, enabling more open business transactions to be developed.

Web Services are a key component of the emerging, loosely coupled, Web-based computing architecture. A Web Service is an autonomous, standards-based component whose public interfaces are defined and described using XML. Other systems may interact with a Web Service in a manner prescribed by its definition, using XML based messages conveyed by Internet protocols.

The Web Services specifications offer a communication bridge between the heterogeneous computational environments used to develop and host applications. The future of E-Business applications requires the ability to perform long-lived, peer-to-peer collaborations between the participating services, within or across the trusted domains of an organization.

The Web Service architecture stack targeted for integrating interacting applications consists of the following components:

The Web Services Choreography specification is targeted for composing interoperable, peer-to-peeraimed at the composition of interoperable collaborations between any type of party regardless of the supporting platform or programming model used by the implementation of the hosting environment.

1.1 Notational Conventions

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC-2119 [2].[RFC2119].

The following namespace prefixes are used throughout this document:

Prefix Namespace URI Definition
wsdl http://www.w3.org/2004/08/wsdl WSDL 2.0 namespace for WSDL framework.
cdl http://www.w3.org/2004/10/ws-chor/cdlhttp://www.w3.org/2004/12/ws-chor/cdl WSCDL namespace for Choreography language.Description Language.
xsi http://www.w3.org/2001/XMLSchema-instance Instance namespace as defined by XSD [11].[XMLSchemaP1].
xsd http://www.w3.org/2001/XMLSchema Schema namespace as defined by XSD [12].[XMLSchemaP2].
tns (various) The "this namespace" (tns) prefix is used as a convention to refer to the current document.
(other) (various) All other namespace prefixes are samples only. In particular, URIs starting with "http://example.com" represent some application-dependent or context-dependent URIs [4].[RFC2396].

This specification uses an informal syntax to describe the XML grammar of a WS-CDL document:

  • The syntax appears as an XML instance, but the values indicate the data types instead of values.

  • Characters are appended to elements and attributes as follows: "?" (0 or 1), "*" (0 or more), "+" (1 or more).

  • Elements names ending in """. . ." (such as <element/><element. . ./> or <element>)<element. . .>) indicate that elements/attributes irrelevant to the context are being omitted.

  • Grammar in bold has not been introduced earlier in the document, or is of particular interest in an example.

  • <-- extensibility element --> is a placeholder for elements from some "other" namespace (like ##other in XSD).

  • The XML namespace prefixes (defined above) are used to indicate the namespace of the element being defined.

  • Examples starting with <?xml contain enough information to conform to this specification; othersother examples are fragments and require additional information to be specified in order to conform.

An XSD schemas areis provided as a formal definition of WS-CDL grammar (see Section 9).11).

1.2 Purpose of the Choreography Description Language

Business or other activities that involve multipledifferent organizations or independent processes are engaged in a collaborative fashion to achieve a common business goal, such as Order Fulfillment.Fulfillment.

For the collaboration to work successfully, the rules of engagement between all the interacting parties must be provided. Whereas today these rules are frequently written in English, a standardized way for precisely defining these interactions, leaving unambiguous documentation of the parties and responsibilities of each, is missing.

The Web Services Choreography specification is targeted foraimed at being able to precisely describing peer-to-peerdescribe collaborations between any type of party regardless of the supporting platform or programming model used by the implementation of the hosting environment.

Using the Web Services Choreography specification, a contract containing a "global" definition of the common ordering conditions and constraints under which messages are exchangedexchanged, is produced that describesdescribes, from a global viewpointviewpoint, the common and complementary observable behavior of all the parties involved. Each party can then use the global definition to build and test solutions that conform to it. The mainglobal specification is in turn realized by combination of the resulting local systems, on the basis of appropriate infrastructure support.

The advantage of a contract withbased on a global definition approachviewpoint as opposed to anyone endpoint is that it separates the overall "global" process being followed by an individual business or system within a "domain of control" (an endpoint) from the definition of the sequencesequences in which each business or system exchanges information with others. This means that, as long as the "observable" sequence doessequences do not change, the rules and logic followed within thea domain of control (endpoint) can change at will.will and interoperability is therefore guaranteed.

In real-world scenarios, corporate entities are often unwilling to delegate control of their business processes to their integration partners. Choreography offers a means by which the rules of participation within a collaboration can be clearly defined and agreed to, jointly. Each entity may then implement its portion of the Choreography as determined by the common or global view. It is the intent of CDL that the conformance of each implementation to the common view expressed in CDL is easy to determine.

The figure below demonstrates a possible usage of the Choreography Description Language.

diagram of integration of different Web Services based applications

Figure 1: Integrating Web Services based applications using WS-CDL

In Figure 1, Company A and Company B wish to integrate their Web Services based applications. The respective business analysts at both companies agree upon the services involved in the collaboration, their interactionsinteractions, and their common ordering and constraint rules under which the interactions occur andoccur. They then generate a Choreography Description Language based representation. In this example, a Choreography specifies the interoperability andinteractions between services across business entities,entities ensuring interoperability, while leaving actual implementation decisions in the hands of each individual company:

  • Company "A" relies on a WS-BPEL [18][WSBPEL] solution to implement its own part of the Choreography

  • Company "B", having greater legacy driven integration needs, relies on a J2EE [25][J2EE] solution incorporating Java and Enterprise Java Bean Components or a .NET [26][C#S] solution incorporating C# to implement its own part of the Choreography

Similarly, a Choreography can specify the interoperability and interactions between services within one business entity.

1.3 Goals

The primary goal of a Choreography Description Language is to specify a declarative, XML based language that defines from a global viewpoint the common and complementary observable behavior, where messagebehavior specifically, the information exchanges occur,that occur and whenthe jointly agreed ordering rules arethat need to be satisfied.

Some additionalMore specifically, the goals of this definition languagethe Choreography Description Language are to permit:

1.4 Relationship with XML and WSDL

ThisThe WS-CDL specification depends on the following specifications: XML 1.0 [9],[XML], XML-Namespaces [10],[XMLNS], XML-Schema 1.0 [11, 12][XMLSchemaP1], [XMLSchemaP2] and XPointer [XPTRF]. Support for including and XPath 1.0 [13].referencing service definitions given in WSDL 2.0 [WSDL20] is a normative part of the WS-CDL specification. In addition, support for including and referencing service definitions given in WSDL 2.0 [7]1.1 as constrained by WS-I Basic Profile [Action: add references] is a normative part of thisthe WS-CDL specification.

1.5 Relationship with Business Process Languages

A Choreography Description Language is not an "executable business process description language" [16, 17, 18, 19, 20]or an implementation language [23].language. The role of specifying the execution logic of an application will be covered by these [XLANG], [WSFL], [WSBPEL], [BPML], [XPDL], [JLS], [C#S] and other specifications.

A Choreography Description Language does not depend on a specific business process implementation language. Thus, it can be used to specify truly interoperable, peer-to-peercollaborations between any type of party regardless of the supporting platform or programming model used by the implementation of the hosting environment. Each party, adhering to a Choreography Description Language collaboration representation, could be implemented using completely different mechanisms such as:

  • Applications, whose implementation is based on executable business process languages [16, 17, 18, 19, 20][XLANG], [WSFL], [WSBPEL], [BPML], [XPDL]

  • Applications, whose implementation is based on general purpose programming languages [23, 26][JLS], [C#S]

  • Or human controlled software agents

2 Choreography Description Language Model

This section introduces the Web Services Choreography Description Language (WS-CDL) model.

2.1 WS-CDL Model Overview

WS-CDL describes interoperable, peer-to-peer collaborations between parties. In order to facilitate these collaborations, services commit onto mutual responsibilities by establishing Relationships. Their collaboration takes place in a jointly agreed set of ordering and constraint rules, whereby messages areinformation is exchanged between the parties.

The ChoreographyWS-CDL model consists of the following notations: Participants, Rolesentities:

2.2 ChoreographyWS-CDL Document Structure

A WS-CDL document is simply a set of definitions. Each definition is a named construct that can be referenced. There is a package element at the root, and the individual Choreography type definitions inside.

2.2.1 Choreography Package

A WS-CDLChoreography Package aggregates a set of ChoreographyWS-CDL type definitions, provides a namespace for the definitions and through the use of XInclude [27],[XInclude], MAY syntactically includes Choreographyinclude WS-CDL type definitions that are defined in other Choreography Packages.

The syntax of the package construct is:;is:

<package  
   name="ncname" 
   author="xsd:string"?
    version="xsd:string"version="xsd:string"?
   targetNamespace="uri"
    xmlns="http://www.w3.org/2004/10/ws-chor/cdl/">xmlns="http://www.w3.org/2004/12/ws-chor/cdl">
   informationType*
   token*
   tokenLocator*
   roleType*
   relationshipType*
   participantType*
   channelType*
   Choreography-Notation*
</package>

The Choreography Package contains:

  • Zero or more Information Types

  • Zero or more Tokens and Token Locators

  • Zero or more Role Types

  • Zero or more Relationship Types

  • Zero or more Participant Types

  • Zero or more Channel Types

  • Zero or more Package-level Choreographies

The top-level attributes name, author,name, author, and version define authoring properties of the Choreography document.

The targetNamespace attribute provides the namespace associated with all WS-CDL type definitions contained in this Package.Choreography Package. WS-CDL type definitions included toin this PackagePackage, using the inclusion mechanism, mayMAY be associated with other namespaces.

The elements informationType, token, tokenLocator, roleType, relationshipType,informationType, token, tokenLocator, roleType, relationshipType, participantType and channelType are sharedMAY be used as elements by all the Choreographies defined within this Choreography Package.

Within a WS-CDL Package, language constructs that need to be uniquely named MUST use the attribute name for specifying a distinct name.2.2.2 Choreography document Naming and LinkingIncluding WS-CDL Type Definitions

WS-CDL documents MUST be assigned a name attribute oftype NCNAME that serves as a lightweight form of documentation. The targetNamespace attributedefinitions or fragments of WS-CDL type URI MUSTdefinitions can be specified. The URI MUST NOTsyntactically reused in any WS-CDL type definition by using XInclude [XInclude]. The assembly of large WS-CDL type definitions from multiple smaller, well-formed WS-CDL type definitions or WS-CDL type definitions fragments is enabled using this mechanism.

Inclusion of fragments of other WS-CDL type definitions SHOULD be done carefully in order to avoid duplicate definitions (Variables, blocks, etc.). A WS-CDL processor MUST ensure that the document is correct before processing it. The correctness may involve XML well-formedness as well as semantic ;checks, such as unicity of Variable definitions, of a single root Choreography, etc.

The example below shows some possible syntactic reuses of Choreography type definitions.

<choreography name="newChoreography" root="true">
...
   <variable name="newVariable" informationType="someType"
             role="randomRome"/>
   <xi:include href="genericVariableDefinitions.xml" />
   <xi:include href="otherChoreography.xml"
               xpointer="xpointer(//choreography/variable[1]) />
... 
</choreography>

2.3 Collaborating Parties

The WSDL specification [7][WSDL20] describes the functionality of a service provided by a party based on a stateless, client-server model. The emerging Web Based applications require the ability to exchange messagesinformation in a peer-to-peer environment. In these types of environments a party represents a requester of services provided by another party and is at the same time a provider of services requested from other parties, thus creating mutual multi-party service dependencies.

A WS-CDL document describes how a party is capable of engaging in peer-to-peercollaborations with the same party or with different parties.

The Role Types, Participant Types, Relationship Types and Channel Types define the coupling of the collaborating parties.

2.3.2 ParticipantRelationship Types

A ParticipantRelationship Type identifies a set ofthe Role Types thatand Behaviors, where mutual commitments between two parties MUST be implemented by the same entity or organization. Its purpose is to group together the parts of the observable behavior that MUST be implemented by the same process. The syntax of the participantType construct is:; <participantType name="ncname"> <role type="qname" />+ </participantType> The attribute name is used for specifying a distinct name for each participantType element declared within a Choreography Package. An example is given below where the "SellerForBuyer" Role Type belonging to a "Buyer-Seller" Relationship Type is implemented by the Participant Type "Broker" which also implements the "SellerForShipper" Role Type belonging to a "Seller-Shipper" Relationship Type: <participantType name="Broker"> <role type="tns:SellerForBuyer" /> <role type="tns:SellerForShipper" /> </participantType> 2.3.3 Relationship Types A Relationship Type identifies the Role Type and Behaviors where mutual commitments between two parties MUST be made for themmade for them to collaborate successfully. For example the Relationship Types between a Buyer and a Seller could include:

Although Relationship Types are always between two Role Types, Choreographies involving more than two Role Types are possible. For example if the purchase of goods involved a third-party Shipper contracted by the Supplier to deliver the Supplier's goods, then, in addition to the Purchasing"Purchasing" and Customer Management"Customer Management" Relationship Types described above, the following Relationship Types might exist:

The syntax of the relationshipType construct is:;is:

The attribute name is used for specifying a distinct name for each relationshipType element declared within a Choreography Package.

A relationshipType element MUST have exactly two Role Types defined. WithinEach Role Type is specified by the type attribute within the role element.

Within each role element, the optionalOPTIONAL attribute behavior identifies the commitment of a party as aan XML-Schema list of behavior types belonging to thethis Role Type specified by the type attribute of the role element.Type. If the behavior attribute is missing then all the behaviors belonging to thethis Role Type specified by the type attribute of the role elementare identified as the commitment of a party.

2.3.4 Channel2.3.3 Participant Types

A Channel realizesParticipant Type identifies a pointset of collaboration between partiesRole Types that MUST be implemented by specifying where and how informationthe same logical entity or organization. Its purpose is exchanged. Additionally, Channel information can be passed among parties. This allowsto group together the modelingparts of both static and dynamic message destinations when collaborating within a Choreography. For example, a Buyer could specify Channel information tothe observable behavior that MUST be used for sending delivery information. The Buyer could then sendimplemented by the Channel information tosame logical entity or organization.

The syntax of the participantType construct is:

The attribute name is used for specifying a distinct name for each participantType element declared within a Choreography Package.

Within the participantType element, one or more role elements identify the Role Types that MUST be implemented by this Participant Type. Each Role Type is specified by the type attribute of the role element. A specific Role Type MUST NOT be specified in more than one participantType element.

An example is given below where the "SellerForBuyer" Role Type belonging to a "Buyer-Seller" Relationship Type is implemented by the Participant Type "Broker" which also implements the "SellerForShipper" Role Type belonging to a "Seller-Shipper" Relationship Type:

2.3.4 Channel Types

A Channel realizes a point of collaboration between parties by specifying where and how information is exchanged between collaborating parties. Additionally, Channel information can be passed among parties in information exchanges. The Channels exchanged MAY be used in subsequent Interaction activities. This allows the modeling of both static and dynamic message destinations when collaborating within a Choreography. For example, a Buyer could specify Channel information to be used for sending delivery information. The Buyer could then send the Channel information to the Seller who then forwards it to the Shipper. The Shipper could then send delivery information directly to the Buyer using the Channel information originally supplied by the Buyer.

A Channel Type MUST describe the Role Type and the reference type of a party, being the target of an Interaction,information exchange, which is then used for determining where and how to send/receivesend or receive information to/intoto or into the party.

A Channel Type MAY specify the instance identity of an entity implementing the behavior(s) of a party, being the target of an Interaction.information exchange.

A Channel Type MAY describe one or more logical conversations between parties, where each conversation groups a set of related messageinformation exchanges.

One or more Channel(s) MAY be passed around from one Roleparty to another.another in an information exchange. A Channel Type MAY restrict the Channel Type(s) allowed tobe exchanged betweenused to:

The syntax of the channelType construct is:;is:

The attribute name is used for specifying a distinct name for each channelType element declared within a Choreography Package.

The optionalOPTIONAL attribute usage is used to restrict the number of times a Channel of this Channel Type can be used.

The optionalOPTIONAL attribute action is used to restrict the type of information exchange that can be performed when using a Channel of this Channel Type. The type of information exchange performed could either be a request-respond exchange, a request exchange, or a respond exchange. The default for this attribute is set to "request".

The OPTIONAL element passing describes the Channel Type(s) of the Channel(s) that are exchangedpassed, from one Role Typeparty to another Role Type,another, when using an information exchange on a Channel of this Channel Type in an Interaction. In the case where the operation used to exchange the Channel is of request-response type, then theType. The OPTIONAL attribute action within the passing element defines if thea Channel will be exchangedpassed during thea request orexchange, during the response.a response exchange or both. The Channels exchanged MAYdefault for this attribute is set to "request". The OPTIONAL attribute new within the passing element when set to "true" enforces a passed Channel to be used in subsequent Interaction activities.always distinct. If the element passing is missing then this Channel Type MAY be used for exchanging business documents and all Channel Types withoutinformation but MUST NOT be used for passing Channels of any restrictions.Channel Type.

The element role is used to identify the Role Type of a party, being the target of an Interaction,information exchange, which is then used for statically determining where and how to send or receive information to or into the party.

The element reference is used for describing the reference type of a party, being the target of an Interaction,information exchange, which is then used for dynamically determining where and how to send or receive information to or into the party. The servicereference of a party is distinguished by a Token as specified by the name attribute of the token element within the reference element.

The optionalOPTIONAL element identity MAY be used for identifying an instance of an entity implementing the behavior of a party and for identifying a logical conversation between parties. The processidentity and the different conversations are distinguished by a set of Tokens as specified by the name attribute of the token element within the identity element.

The following rule applies for Channel Type:

The example below shows the definition of the Channel Type RetailerChannel."RetailerChannel" that realizes a point of collaboration with a Retailer. The Channel Type identifies the Role Type of the Retailer as the "tns:Retailer"."Retailer". The address ofinformation for locating the ChannelRetailer is specified in the reference element, whereas the processinstance can beof a process implementing the Retailer is identified for correlation purposes using the identity element for correlation purposes.element. The passingelement passing allows only a Channel instanceof the ConsumerChannel"ConsumerChannel" Type to be sent over the RetailerChannel Type.;passed in a request information exchange through a Channel of "RetailerChannel" Type.

2.4 Information Driven Collaborations

Parties make progress within a collaboration,collaboration when recordings of exchanged information are made, and changes to observable information changesoccur, that then cause ordering constraints to be fulfilled. A WS-CDL document allows defining information within a Choreography that can influence the observable behavior of the collaborating parties.

Variables capture information about objects in the Choreography, such as the messagesinformation exchanged or the observablesobservable information of the Roles involved. TokenTokens are aliases that can be used to reference parts of a Variable .Variable. Both Variables and Tokens have Information Types that define the type of information the Variable contains or the Token contain.references.

2.4.1 Information Types

Information typesTypes describe the type of information used within a Choreography. By introducing this abstraction, a Choreography definition avoids referencing directly the data types, as defined within a WSDL document or an XML Schema document.

The syntax of the informationType construct is:;is:

The attribute name is used for specifying a distinct name for each informationType element declared within a Choreography Package.

The OPTIONAL attributes type,type and element describe the document to betype of information used within a Choreography as a WSDL 1.1 Message Type, an XML Schema type, a WSDL 2.0 Schema element or an XML Schema element respectively.element. The document istype of information is exclusively one of these types exclusively.the aforementioned.

When the OPTIONAL attribute exceptionType is set to "true", this Information Type is an Exception Type and MAY map to a WSDL fault type. When the attribute exceptionType is set to "false", this information type MUST NOT map to a WSDL fault type. The default for this attribute is set to "false".

In case of WSDL 2.0, the attribute element within the informationType refers to a unique WSDL 2.0 faultname when the attribute exceptionType is set to "true".

The examples below show some possible usages of the informationType construct.

2.4.2 Variables

Variables capture information about objects in a Choreography as defined by their usage :usage:

The value of Variables:

The variableDefinitions construct is used for defining one or more Variables within a Choreography block.Choreography.

The syntax of the variableDefinitions construct is:;is:

TheA Variable defined Variables can be ofusing the following types:attribute informationType specifies either Information Exchange Capturing Variables,Variables or State Capturing Variables. TheA Variable defined using the attribute informationType describesspecifies Exception Capturing Variables when the referenced information type of the object captured byhas the attribute exceptionType set to "true". A Variable defined using the attribute channelType specifies Channel Capturing Variables. The attributeattributes informationType and channelType describes the type of the channel object captured by the Variableare mutually exclusive.

The optionalOPTIONAL attribute mutable,mutable, when set to "false" describes"false", specifies that the Variable information when initialized,cannot change anymore.once initialized. The default value for this attribute is "true".

The optionalOPTIONAL attribute silent, when set to "true" specifies that there SHOULD NOT be any activity used for creating or changing this Variable in the Choreography. A silent Variable is used to represent the result of actions within a party that are either not observable or are of no interest from the WS-CDL perspective. The default value for this attribute is "false".

The OPTIONAL attribute free, when set to "true" describesspecifies that a Variable defined in an enclosing Choreography is also used in this Choreography, thus sharing the Variables information. The following rules apply in this case:

when sharing the Variables informationThe optionalOPTIONAL attribute free,free, when set to "false" describesspecifies that a Variable is defined in this Choreography.

The default value for the free attribute is "false".

The optional attribute silentAction, when set to "true" describes that there SHOULD NOT be any activity used for creating or changing this Variable in the Choreography, if these operations should not be observable to other parties. The default value for this attribute is "false". The optionalOPTIONAL attribute roleTyperoleTypes is used to specify thean XML-Schema list of one or more Role TypeType(s) of a party at which the Variable information will reside. The following rules apply toA Variable Definitions: The attribute namedefined without a Role Type is used for specifying a distinct name for each variable element declared within a variableDefinitions element when needed. The Variables with Role Type not specified MUST have distinct names. The Variables with Role Type specified MUST have distinct names, when their Role Type is the same A Variable defined without a Role Type is equivalent toequivalent to a Variable that is defined at all the Role Types that are part of the Relationship Types of the Choreography where the Variable is defined. For example if Choreography C1"C1" has Relationship Type R"R" that has a tuple (Role1, Role2),Roles "Role1", "Role2", then a Variable x"var" defined in Choreography C1"C1" without a roleTyperoleTypes attribute means it is defined at Role1both "Role1" and Role2 2.4.2.1"Role2".

The attribute name is used for specifying a distinct name for each Variable declared within the variableDefinitions element. In those cases where the visibility of a Variable is wholly within a single Role then that Role needs to be named in the definition of the Variable as the Role Type using the attribute roleTypes. In those cases where the Variable is shared amongst a subset of Roles within a Choreography those Roles need to be listed within the definition of the Variable as the Role Types using the attribute roleTypes.

2.4.3 Expressions

Expressions arecan be used within WS-CDL to obtain existing information and to create new or change existing information.

Generic expressions and literals can be used for populating a Variable. Predicate expressions arecan be used within WS-CDL to specify conditions. Query expressions are used within WS-CDL to specify query strings.

The language used in WS-CDL for specifying expressions and query or conditional predicates is XPath 1.0.

WS-CDL defines XPath function extensions as described in Section 10.the following section. The function extensions are defined in the standard WS-CDL namespace "http://www.w3.org/2004/10/ws-chor/cdl"."http://www.w3.org/2004/12/ws-chor/cdl". The prefix "cdl:" is associated with this namespace.

2.4.3 Tokens A Token is an alias for a piece of data in a Variable or message2.4.3.1 WS-CDL Supplied Functions

There are several functions that needs tothe WS-CDL specification supplies as XPATH 1.0 extension functions. These functions can be used by a Choreography. Tokens differ from Variablesin that Variables contain values whereas Tokens contain information that definesany XPath expression as long as the piece oftypes are compatible:

xsd:time getCurrentTime(xsd:QName roleName)

Returns the data that is relevant. For example a Token for "Order Amount" within an Order XML document could be an aliascurrent time at the caller for an expression that pointed tothe Order Amount element within the Order XML document. This could then be used as part ofRole specified by roleName (for example a condition that controlsRole can ask only about it,s own time).

xsd:date getCurrentDate(xsd:QName roleName)

Returns the ordering of a Choreography,current date at the caller for the Role specified by roleName (for example "Order Amount > $1000". All Tokens MUST have an informationType, for example, an "Order Amount" would be of type "amount", "Order Id" could be alphanumeric anda counter an integer. Tokens types referenceRole can ask only about it,s own date).

xsd:dateTime getCurrentDateTime(xsd:QName roleName)

Returns the current date and time at the caller for the Role specified by roleName (for example a document fragment withinRole can ask only about it,s own date/time).

xsd:boolean hasDurationPassed(xsd:duration elapsedTime, xsd:QName roleName)

Returns "true" if, (a) used in a Choreography definition and Token Locators provideguard or repetition condition of a query mechanismWork Unit with the block attribute set to select them. By introducing these abstractions,"true" or in a complete condition of a Choreography definition avoids depending on specific message types, as describedand (b) the duration specified by WSDL, or a specific query string, aselapsedTime at the caller for the Role specified by XPATH, but insteadroleName has elapsed from the time either the query string can change without affectingguard or the repetition condition were enabled for matching or the Choreography definition. The syntaxwas enabled. Otherwise it returns "false".

xsd:boolean hasDeadlinePassed(xsd:dateTime deadlineTime, xsd:QName roleName)

Returns "true" if, (a) used in a guard or repetition condition of a Work Unit with the token construct is:; <token name="ncname" informationType="qname" /> Theblock attribute name is used for specifyingset to "true" or in a distinct name for each token element declared withincomplete condition of a Choreography Package. The attribute informationType identifiesand (b) the type oftime specified by deadlineTime at the document fragment. The syntax ofRole specified by roleName has elapsed given that either the tokenLocator construct is:; <tokenLocator tokenName="qname" informationType="qname" query="XPath-expression"? /> The attribute tokenName identifiesguard or the namerepetition condition were enabled for matching or the Choreography was enabled. Otherwise it returns "false".

xsd:string createNewID()

Returns a new globally unique value of XML-Schema 'string' type.

xsd:any getVariable(xsd:string varName, xsd:string part, xsd:string documentPath, xsd:QName roleName?)

Returns the Token thatinformation of the document fragment locator is associated with.Variable with name varName as a node set containing a single node. The attribute informationType identifiessecond parameter, part, specifies the type on whichmessage part of a WSDL1.1 document. For a WSDL 2.0 document it MUST be empty. When the querythird parameter documentPath is performed to locateempty, then this function retrieves the Token. The attribute query definesentire document from the query string thatVariable information. When it is used to select a documentnon-empty, then this function retrieves from the Variable information, the fragment within a document.of the document at the provided absolute location path. The example below shows thatfourth parameter is OPTIONAL. When the Token "purchaseOrderID"fourth parameter is of type xsd:int. The two tokenLocators show how to access this token in "purchaseOrder" and "purchaseOrderAck" messages.; <token name="purchaseOrderID" informationType="xsd:int"/> <tokenLocator tokenName="tns:purchaseOrderID" informationType="purchaseOrder" query="/PO/OrderId"/> <tokenLocator tokenName="tns:purchaseOrderID" informationType="purchaseOrderAck" query="/POAck/OrderId"/> 2.4.4 Choreographies . The operational semantics of these rules are based onused, the information-driven computational model, where availability of variableVariable information causes a guarded unit-of-work and its enclosed actions toMUST be enabled. A Choreography. defines re-usableavailable at the common rules, that governRole specified by roleName. If this parameter is not used then the ordering of exhanged messages andRole is inferred from the provisioning patterns of collaborative behavior, agreed between two or more interacting peer-to-peer parties A Choreography defined atcontext that this function is used.

xsd:boolean isVariableAvailable(xsd:string varName, xsd:QName roleName)

Returns "true" if the Package levelinformation of the Variable with name varName is calledavailable at the Role specified by roleName. Returns "false" otherwise.

xsd:boolean variablesAligned(xsd:string varName, xsd:string withVarName, xsd:QName relationshipName)

Returns "true" if within a top-level Choreography, and does not share its contextRelationship specified by relationshipName the Variable with other top-level Choreographies. A Package MAY contain exactly one top-level Choreography, marked explicitly asname varName residing at the root Choreography. A Choreography definesfirst Role of the re-usableRelationship has aligned its information with the common rules, that governVariable named withVarName residing at the orderingsecond Role of exhanged messages andthe provisioning patternsRelationship.

xsd:any getChannelReference(xsd:string varName)

Returns the reference information of behavior, asthe action(s) performingVariable with name varName. The Variable MUST be of Channel Type.

xsd:any getChannelIdentity(xsd:string varName)

Returns the actual work, such as exchangeidentity information of messages, whenthe specified ordering constraints are satisfied.Variable with name varName. The re-usable behavior encapsulated within a Choreography MAYVariable MUST be performed within an enclosing Choreography, thus facilitating recursive composition. The performed Choreography is then called an enclosed Choreography. The Choreographyof Channel Type.

xsd:boolean globalizedTrigger(xsd:string expression, xsd:string roleName, xsd:string expression2, xsd:string roleName2, . . .)

Combines expressions that is performed MAY be defined either: Locally - they are contained, in the same Choreography definition as the Choreographyinclude Variables that performed them Globally - theyare specified in a separate top-level Choreography definition that isdefined in the same or in aat different Choreography Package and can be used by other Choreographies and hence the contract is reusable A Choreography MUST contain at leastRoles. Only one Relationship Type, enumerating the observable behavior this Choreography requires its parties to exhibit. One or more Relationship Types MAYexpression MUST be defined within a Choreography, modeling multi-party collaborations. A Choreography acts as a lexical name scoping context for Variables.per Role name.

xsd:boolean cdl:hasExceptionOccurred(xsd:string exceptionType)

Returns "true" if an Exception of Exception Type identified by the parameter exceptionType has occurred. Otherwise it returns "false".

2.4.4 Tokens

A Variable defined in a ChoreographyToken is visiblean alias for usea piece of data in this Choreography and all its enclosed Choreographies up-to the point that the Variable is re-defined as an non-free Variable, thus forminga Choreography Visibility Horizon for thisVariable . A Choreography MAY contain oneor more Choreography definitionsmessage that MAYneeds to be performed only locally within thisused by a Choreography. A Choreography MUSTTokens differ from Variables in that Variables contain an Activity-Notation . The Activity-Notation specifiesvalues whereas Tokens contain information that define the enclosed actionspiece of the Choreographydata that perform the actual work. Ais relevant.

All Tokens MUST have an informationType, for example, an "Order Id" could be 'alphanumeric' and a "counter" an 'integer'.

Tokens reference a document fragment within a Choreography can recover from exceptional conditionsdefinition and Token Locators provide finalization actionsa query mechanism to select them. By introducing these abstractions, a Choreography definition avoids depending on specific message types, as described by defining: One Exception block , which MAY be definedWSDL, or a specific query string, as specified by XPATH. Instead the document part ofand the Choreography to recover from exceptional conditions thatquery string can occur in that enclosing Choreography One Finalizer block , which MAY be defined as part of the Choreography to providechange without affecting the finalization actions for that enclosingChoreography The Choreography-Notation is used to define a Choreography.definition.

The syntax is:; <choreographyof the token construct is:

The attribute name is used for specifying a distinct name for each choreographytoken element declared within a Choreography Package.

The optional completeattribute allows to explicitly complete a Choreography as described below ininformationType identifies the Choreography Life-line section.type of the document fragment.

The syntax of the tokenLocator construct is:

The optional isolationattribute specifies when Variable informationtokenName identifies the name of the Token that the document fragment locator is defined in an enclosing, and changed within an enclosed Choreography is available to its sibling Choreographies: When isolationassociated with.

The attribute informationType identifies the type of the document on which the query is setperformed to "dirty-write",locate the Variable information MAY be immediately overwritten by actions in other Choreographies When isolationToken.

The OPTIONAL attribute part defines the document part on which the query is setperformed to "dirty-read",locate the Variable information MAYToken. This attribute SHOULD NOT be immediately visible for read but notdefined for write to other Choreographies When isolationa WSDL 2.0 document.

The attribute query defines the query string that is setused to "serializable", the Variable information MUST be visible for readselect a document fragment within a document or for write to other Choreographies only after this Choreography has ended successfullya document part.

The relationship element within the choreography element enumeratesexample below shows that the Relationships this Choreography MAY participate in.Token "purchaseOrderID" is of XML-Schema type 'int'. The optional variableDefinitions element enumeratestwo Token Locators show how to access this Token in the Variables"purchaseOrder" and "purchaseOrderAck" messages.

2.4.5 Choreographies

A Choreography defines re-usable common rules, that govern the ordering of exhanged messages and the provisioning patterns of collaborative behavior, agreed between two or more interacting parties.

A Choreography defined in this Choreography. The optional root element marksat the Choreography Package level is called a top-level Choreography, and does not share its context with other top-level Choreographies. A Choreography Package MAY contain exactly one top-level Choreography, marked explicitly as the root Choreography. The root Choreography of ais the only top-level Choreography Package.that is enabled by default.

The optional Choreography-Notationre-usable behavior encapsulated within the choreography element defines the Choreographies thata Choreography MAY be performed onlywithin this Choreography.an enclosing Choreography, thus facilitating composition. The optional exception element definesperformed Choreography is then called an enclosed Choreography and MAY be defined:

A non-root Choreography is performed wheneverenabled when performed.

A Choreography MUST contain at least one Relationship Type, enumerating the Place Order Work Unit did not reachobservable behavior this Choreography requires its parties to exhibit. One or more Relationship Types MAY be defined within a "normal" conclusion. This would haveChoreography, modeling multi-party collaborations.

A Choreography acts as a guard conditionlexical name scoping context for Variables. A Variable defined in a Choreography is visible for use in this Choreography and all its enclosed Choreographies up-to the point that identifiesthe errorVariable is re-defined as an non-free Variable, thus forming a Choreography Visibility Horizon for this Variable.

A Change Order Work UnitChoreography MAY contain one or more Choreography definitions that canMAY be performed whenever an order acknowledgement message has been received and an order rejection has not been receivedonly locally within this Choreography.

A Work Unit MAY prescribe the constraints that preserveChoreography MUST contain an Activity-Notation. The Activity-Notation specifies the consistencyactions of the collaborations commonly performed betweenChoreography that perform the parties. Using a Work Unit an applicationactual work. These actions are enabled when the Choreography they belong to is enabled.

A Choreography can recover from exceptional conditions by defining one Exception Block, which MAY be defined as part of the Choreography to recover from faultsexceptional conditions that are the result of abnormal actions and also MAY finalize completed actionscan occur.

An enclosed Choreography that has successfully completed MAY need to be logically rolled back. When enabled, a Work Unit expresses interest(s) onprovide finalization actions that confirm, cancel or otherwise modify the availabilityeffects of its completed actions. To handle these modifications, one or more Variable information that already exist or willseparate Finalizer Block(s) MAY be created in the future. The Work Unit's interest(s) are matched when all the required Variable information are or become available and the specified matching condition on the Variable information is met. Availability of some Variable information does not meandefined for an enclosed Choreography.

A Choreography can also be coordinated. Choreography Coordination guarantees that a Work Unit matches immediately. Only whenall Variable information required by a Work Unit become available, ininvolved Roles agree on how the appropriate Visibility Horizon, does matching succeed. Variable information available within aChoreography MAY be matched with a Work Unit that will be enabled inended. That is, if the future. OneChoreography completed successfully or more Work Units MAY be matched concurrently if their respective interests are matched. When a Work Unit matching succeeds then its enclosed actions are enabled. A Work Unit MUST containsuffered an Activity-Notation that performsException, and if the actual work. A Work Unit completesChoreography completed successfully whenand Finalizer Block(s) were installed, all its enclosed actions complete successfully. A Work Unit that completes successfully MUST be considered again for matching (based on its guard condition), if its repetition condition evaluates to "true".Roles have the same Finalizer Block enabled.

The WorkUnit-NotationChoreography-Notation is definedused to define a Choreography as follows:; <workunitfollows:

The Activity-Notation specifies the enclosed actions ofattribute name is used for specifying a Work Unit.distinct name for each choreography element declared within a Choreography Package.

The guard condition ofOPTIONAL complete attribute allows to explicitly complete a Work Unit, specified by the optional guard attribute, describes the interest onChoreography as described below in the availability of one or more, existing or future Variable information.Choreography Life-line section.

The optional repeatOPTIONAL isolation attribute allows, when the condition itspecifies evaluates to "true",when a Variable defined in an enclosing Choreography, and changed within an enclosed Choreography is available to make the current Work Unit considered again for matching (based on the guard attribute).its sibling Choreographies. The optionaldefault for this attribute block specifies whether the matching condition relies onis set to "false". The following rules apply:

The OPTIONAL coordination attribute specifies whether Choreography Coordination is not currently available.required. The default for this attribute is set to "false". The following rules apply:

The relationship element within the informationchoreography element enumerates the Relationships this Choreography MAY participate in.

The OPTIONAL variableDefinitions element enumerates the Variables defined in this Choreography.

The OPTIONAL root element marks a top-level Choreography as the root Choreography of a Variable WhenChoreography Package.

The OPTIONAL Choreography-Notation within the WS-CDL function isVariableAvailable() is used inchoreography element defines the guard or repetition condition, it meansLocally defined Choreographies that MAY be performed only within this Choreography.

The OPTIONAL exceptionBlock element defines the Exception Block of a Choreography by specifying one or more Exception Work Unit that specifiesUnit(s) using a WorkUnit-Notation. Within this element, the guard conditionattribute name is checking ifused for specifying a Variable is already available atname for this Exception Block element.

The OPTIONAL finalizerBlock element defines a specific Role or is waitingFinalizer Block for a Variable to become available atChoreography. A Choreography MAY have more than one Finalizer Blocks. Each Finalizer Block specifies one Finalizer Work Unit using a specific Role, based onWorkUnit-Notation. If a Choreography defines more than one Finalizer Blocks, then each MUST be differentiated by a distinct name as specified with the blockname attribute being "false" or "true" respectively Whenwithin the WS-CDL function variablesAligned() is used infinalizerBlock element.

2.4.6 WorkUnits

A Work Unit can prescribe the guard or repetition condition, it meansconstraints that thehave to be fulfilled for making progress and thus performing actual work within a Choreography. A Work Unit can also prescribe the constraints that specifiespreserve the guard or repetition condition is checking or waiting for an appropriate alignment Interaction to happen between the two Roles, based onconsistency of the block attribute being "false" or "true" respectively. Whencollaborations commonly performed between the variablesAligned() WS-CDL function is used inparties. Using a guard or repetition condition, then the Relationship Type within the variablesAligned() MUST beWork Unit an application can recover from errors that are the subsetresult of the Relationship Typeabnormal actions and can also finalize successfully completed Choreographies that need further action, for example to confirm or logically roll back effects, or to close the immediate enclosingChoreography defines. If Variables areso that any defined at different Roles, then they can"rollback" Work Unit will not be combined together inenabled. Examples of a guard condition or repetition condition using only the globalizedTrigger() WS-CDL function If Variables are defined at the same Role, then theyWork Unit include:

The guard condition of a Work Unit, if specified, expresses the attribute block is set to "true" andinterest on one or more Variable(s) are not available, thenVariable information (that already exist or will become available in the future) being available under certain prescribed constraints. The Work UnitUnit's expressed interest MUST block waitingbe matched for the Variable informationits enclosed actions to become available. This attribute MUST notbe used in Exceptionenabled.

A Work Units. When the Variable information specified by the guard condition become available then the guard condition is evaluated: If theUnit completes successfully when all its enclosed actions complete successfully.

A Work Unit that completes successfully MUST be considered again for matching (based on its guard condition), if its repetition condition evaluates to "false", then the"true".

The WorkUnit-Notation is used to define a Work Unit matching fails and theas follows:

The attribute name is used for specifying a name for each Work Unit is skipped andelement declared within a Choreography Package.

The Activity-Notation specifies the repetition condition even if specified is not evaluated Ifenclosed actions within a Work Unit.

The OPTIONAL attribute guard specifies the guard condition evaluates to "true", then theof a Work Unit is matched and thenUnit.

The OPTIONAL attribute repeat specifies the repetition condition, if specified, is evaluated whencondition of a Work Unit.

The OPTIONAL attribute block specifies whether the Variable information specified byWork Unit has to block waiting for referenced Variables within the repetitionguard condition to become available If(if they are not already) and the repetitionguard condition evaluatesto "true",evaluate to "true". This attribute MUST always be set to "false" in Exception Work Units. The default for this attribute is set to "false".

The following rules apply:

The examples below demonstrate some usages of a Choreography to recover from exceptional conditions that can occur in that Choreography. A Finalizer WorkUnit MAY be defined as partWork Unit:

a. Example of a ChoreographyWork Unit with block equals to provide"true":

In the finalization actions that semantically "undo" that completed Choreography. 2.4.8.1 Exception Block A Choreography can sometimes fail as a result of an exceptional circumstance or error. Different types of exceptions are possible including this non-exhaustive list: Interaction Failures , for examplefollowing Work Unit, the sendingguard condition waits on the availability of a message did not succeed Protocol Based Exchange failures , for example no acknowledgement was received as part of a reliable messaging protocol [22] Security failures , for example a Message was rejected by a recipient because"POAcknowledgement" at "Customer" Role and if it is already available, the digital signature was not valid Timeout errors , for example an Interaction did not complete withinactivity happens, otherwise, the required time Validation Errors , for example an XML order document was not well formed or did not conform to its schema definition Application "failures" , for exampleactivity waits until the goods ordered were out of stock To handle these and other "errors" separate Exception Work Units MAY be defined inVariable "POAcknowledgement" become available at the Exception Block"Customer" Role.

b. Example of a Choreography, for each "exception" condition that needs to be handled. At least one ExceptionWork Unit MUST be defined as part of the Exceptionwith block of a Choreography for the purpose of handlingequals to "false":

In the exceptional conditions occurring on that Choreography. To handle these, an Exceptionfollowing Work Unit MAY express interest on fault information using its guard condition. If noUnit, the guard condition checks if the Variable "StockQuantity" at the "Retailer" Role is specified, thenavailable and is greater than 10 and if so, the default Exception Work Unit expresses interest on any type of fault. Withinactivity happens. If either the Exception Block of a Choreography there MUST NOT be moreVariable is not available or its value is less than one Exception Work Units without guard'10', then the matching condition defined. An Exception Work Unit MUST set its attribute block always tois "false" and MUST NOT define a repetition condition. Exception Work Units are enabled whenthe Choregraphy they belong toactivity is enabled. An Exceptionskipped.

c. Example of a Work Unit MAY be enabled only once. Exceptionwaiting for alignment to happen:

In the following Work Units enabled in a Choreography MAY behave asUnit, the default mechanism to recover from faultsguard condition waits for all its enclosed Choreographies. Withinan alignment Interaction to happen between the Exception Block"Customer" Role and the "Retailer" Role:

2.4.7 Choreography Life-line

A Choreography life-line expresses the progression of a collaboration through enabled activities and enclosed Choreographies. Initially, the collaboration is established between parties, then work is performed within it and finally it ends.

A Choreography only one Exception Work Unit MAY be matched. The rules for matchingis initiated, establishing a fault arecollaboration when an Interaction, explicitly marked as follows: If a faultan Choreography Initiator, is matched byperformed. This causes the guard condition of anException Work Unit, thenBlock to be installed and the actions ofChoreography enters the matched Work Unit are enabled for recovering fromEnabled State. Before this point there is no observable association between any of the fault. When twoparties.

Two or more Exception Work Units are defined thenInteractions MAY be marked as Choreography Initiators, indicating alternatives for establishing a collaboration. In this case, the order of evaluating their guard conditions is based onfirst performed Interaction will establish the order thatcollaboration and the Work Units have being defined withinother Interactions will enlist with the Exception Block. If none ofalready established collaboration.

A Choreography Initiator Interaction MAY be defined within a root Choreography or within an enclosed Choreography. In either case the guard condition(s) match, then if therecollaboration is a defaultestablished when the first Choreography Initiator Interaction is performed.

A Choreography in an Enabled State, completes unsuccessfully, when an Exception Work Unit without a guard condition defined thenis caused in the Choreography and its actions are enabled for recovering fromException Block is enabled, if present. This causes the fault Otherwise,Choreography to enter the faultUnsuccessfully Completed State.

The unsuccessfully completed Choreography, enters the Closed State once the Exception Block, if present, is not matched by ancompleted. If the Exception Work Unit defined withinBlock is not present, the Choreography in whichimplicitly enters the fault occurs,Closed State and in this casethe fault will be recursivelyException occurred is propagated to the Exception Work Unit of the immediateenclosing Choreography.

A Choreography until a match is successful If a fault occursin an Enabled State, completes successfully when there are no more enabled activities within a Choreography, thenits body. This causes its Exception Block to be deinstalled, Finalizer Blocks to be installed if specified, and the faultedChoreography enters the Successfully Completed State.

Alternatively, a Choreography completes unsuccessfully and this causessuccessfully if its Finalizer WorkUnitcomplete condition, is matched by evaluating to disabled. The actions, including enclosed Choreographies, enabled within"true". A complete condition is considered for matching while the faultedChoreography are completed abnormally before an Exception Work Unit can be matched.is in Enabled State. The actions within the Exception Work Unit MAY use Variable information visiblecomplete condition MUST be possible to be matched in all Roles that participate in the Visibility HorizonChoreography. When the complete condition of a Choreography is matched then all activities in the Choreography it belongs toare disabled, and the Choreography completes as they stand at the current time. The actions of an Exception Work Unit MAY also cause fault. The semantics for matching the fault and acting on it are the same as described in this section. 2.4.8.2 Finalizer Blockif there were no more enabled activities within it. When a Choreography encounters an exceptional condition it MAY need to revert the actions it had already completed, by providing finalization actionscompletes, all uncompleted enclosed Choreographies will automatically become completed. Messages that semantically rollback the effectswere sent as part of the completed actions. To handle thesea separate Finalizer Work Unit is definedChoreography that has since completed MUST be ignored.

A Choreography, in a Successfully Completed State, enters the Closed State if no Finalizer Block of aBlocks were specified in that Choreography.

A Choreography MAY defineChoreography, in a Successfully Completed State with Finalzer Block(s) specified enters the Closed State when one of its installed Finalizer Work Unit. A Finalizer WorkUnitBlock(s) is enabled only after the Choreography it belongs to completes successfully.and completed. The Finalizer Work Unit may beBlock of a Choreography is enabled only once. The actions within the Finalizer Work Unit MAY use Variable information visibleby a finalize activity in the Visibility Horizon of theimmediately enclosing Choreography. Alternatively, a Choreography it belongs to as they were at the timein Successfully Completed State with Finalzer Block(s) specified implicitly enters the Closed State when its enclosing Choreography completed or as they stand atenters the current time. The actions ofClosed State without enabling the Finalizer Work Unit MAY fault. The semantics for matching the fault and acting on it are the same as described in the previous section. 2.5 Activities Activities are the lowest level componentsBlock(s) of the Choreography, used to describe the actual work performedits enclosed Choreography. In other words, when a Choreography enters the specified ordering constraintsClosed State, all its enclosed successfully completed Choreographies are satisfied. An Activity-Notation is then either: An Ordering Structure which combines Activities with other Ordering Structures in a nested way to specifyimplicitly entering the ordering rulesClosed State even if none of activities within thetheir Finalizer Blocks has been enabled.

2.4.8 Choreography Exception Handling

A WorkUnit-Notation A Basic ActivityChoreography can sometimes fail as a result of an exceptional circumstance or an "error" that performsoccurred during its performance.

An Exception is caused in the actual work. A Basic ActivityChoreography when an Exception Variable is then either: An Interaction , which resultspopulated in an exchange of messages betweenInteraction activity with the attribute causeException set to "true".

An Exception MUST be propagated to all parties and possible synchronization of their observable information changes andin the actual values ofChoreography using explicitly modeled, Exception Causing Interactions when the exchanged information A Perform, which means that a complete, separately definedChoreography is performed An Assign , which assigns, within one Role,not coordinated. This causes the value of one VariableChoreography to enter the value of another Variable A Silent Action , which provides an explicit designator used for specifying the point where party specific operation(s) with non-observable operational details MUSTException state and its Exception Block to be performed A No Actionenabled, if specified.

Different types of errors are possible including this non-exhaustive list:

To handle these and other "errors" separate Exception Work Units MAY be enabled sequentially,defined in the same order that they are defined. The syntax of this construct is:; <sequence> Activity-Notation+ </sequence> 2.5.1.2 Parallel The parallel ordering structure contains one or more Activity-Notations that are enabled concurrently when the parallel activity is enabled. The syntaxException Block of this construct is:; <parallel> Activity-Notation+ </parallel> 2.5.1.3 Choice The choice ordering structure enablesa Work Unit to defineChoreography, for each Exception that only one of two or more Activity-Notations SHOULDneeds to be performed. When twohandled.

One or more activities are specified inException Work Unit(s) MAY be defined within the Exception Block of a choice element, onlyChoreography. At least one activity is selected and the other activities are disabled. If the choice hasException Work Units with guard conditions,Unit MUST be defined as part of the firstException Block of a Choreography. An Exception Work Unit that matches theMAY express interest on Exception information using its guard condition on Exception Types or Exception Variables. If no guard condition is selected andspecified, then the otherException Work Units are disabled. If the choice has other activities, itUnit is assumed that the selection criteria forcalled the activities are non-observable. The syntaxDefault Exception Work Unit and expresses interest on any type of this construct is:; <choice> Activity-Notation+ </choice> InException. Within the example below, choice element has two Interactions, "processGoodCredit"Exception Block of a Choreography there MUST NOT be more than one Default Exception Work Unit. An Exception Work Unit MUST always set its block attribute to "false" and "processBadCredit". The Interactions haveMUST NOT define a repetition condition.

Exception Work Units are enabled when the same directionality, participate withinException Block of the same Relationship and haveChoreography they belong to is enabled. Enabled Exception Work Units in a Choreography MAY behave as the same fromRolesmechanism to recover from Exceptions occuring in this and toRoles names. Ifits enclosed Choreographies.

Within the Exception Block of a Choreography only one Interaction happens,Exception Work Unit MAY be matched.

The rules for matching an Exception are:

The Channel Capturingactions within the Exception Work Unit MAY use Variable that specifiesinformation visible in the interface and other data that describe where and howVisibility Horizon of the message isChoreography it belongs to be sent The Operation that specifies whatas they stand at the recipientcurrent time.

The actions of the message should do with the message when it is receivedan Exception Work Unit MAY also cause an Exception. The From Rolesemantics for matching the Exception and To Role thatacting on it are involved The Information Type or Channel Typethe same as described in this section.

2.4.9 Choreography Finalization

After a Choreography instance has successfully completed, it MAY need to provide finalization actions that is being exchanged The Information Exchange Capturing Variables atconfirm, cancel or otherwise modify the From Role andeffects of its completed actions. To Role that arehandle these modifications, one or more separate Finalizer Block(s) MAY be defined for an enclosed Choreography. When its Choreography body completes successfully, any Finalizer Blocks specified in the source and destinationChoreography are installed.

If more than one Finalizer Blocks are defined for the Message Content A listsame Choreography, each of potential observable information changes thatthem MUST be differentiated by their name attributes. However, at most one Finalizer Block MAY occurbe enabled for any given Choreography instance during the subsequent progress, including Exception handling and finalization, of the enclosing Choreography.

Finalizer Block(s) MAY needimplement whatever actions are appropriate for the particular Choreography. Common patterns might include:

The actions within the RolesFinalizer Work Unit MAY use Variable information visible in the Choreography have agreement onVisibility Horizon of the outcome. More specifically within an Interaction, a Role MAY needChoreography it belongs to have a common understanding ofas they were at the observable information creations or changes of one or more State Capturing Variables that are complementary to one or more State Capturing Variables of its partner Role Additionally, within an Interaction a Role MAY need to have a common understanding oftime the values ofChoreography completed for the Information Exchange CapturingVariables at the partner Role With Interaction Alignment both the Buyerbelonging to this Choreography and the Seller have a common understanding that: State Capturing Variables, suchas "Order State", that contain observable informationthey stand at the Buyer and Seller, have values that are complementarycurrent time for the Variables belonging to each other, e.g. Sent atthe Buyer and Received atenclosing Choreography.

The actions of a Finalizer Work Unit MAY fault. The semantics for matching the Seller,fault and Information Exchange Capturing Variables haveacting on it are the same types withas described in the same content, e.g. The Order Variables atprevious section.

2.4.10 Choreography Coordination

Choreography Coordination guarantees that all involved Roles will agree on how the Buyer and Seller haveChoreography ended. That is, all Roles will agree on whether the same Information TypesChoreography completed successfully or suffered an Exception, and holdif the same order information In WS-CDL an alignmentChoreography completed successfully and Finalizer Blocks were installed, all Roles will agree on which Finalizer Block was enabled. Such agreement differs from Interaction MUST be explicitly used,based alignment in that the cases where two interacting parties require the alignmentChoreography as a whole is aligned, regardless of their observable information changes and their exchanged information. After the alignmentwhether each Interaction completes, both parties progress at the same time,in a lock-step fashion andthe Variable information in both partiesCoordinated Choreography is aligned. Their Variable alignment comes from the fact that the requesting party hasIn contrast to knowAlignment Interactions, a Coordinated Choreography provides a larger unit of coordination - a set of Interactions that end with shared knowledge among all the accepting party has received the message and the other way around, the accepting party has to knowparties that the requesting party has sent the message before both of them progress. Theretheir Relationship is no intermediate state, where one party sends a message and then it proceeds independently or the other party receives a message and then it proceeds independently. 2.5.2.2 Protocol Based Information Exchanges The one-way, request or response messagesin an Interaction may also be implemented usinga Protocol Based Exchange wheredefined state. Such a series of messagesunit need not be aligned at each step - it is only required that clear alignment points are exchanged accordingmade to some well-known protocol, such asguarantee that all involved Roles will agree on how the reliable messaging protocolsChoreography ended.

Choreographies defined in specifications such as WS-Reliability [22]. In both cases, the same or similar message content may be exchangedas inrequiring coordination must being bound to a simple Interaction, for exampleCoordination protocol. When Choreography Coordination is not required, then the exchanging of an Order betweenChoreography is not bound to a BuyerCoordination protocol, and a Seller. Therefore somesince none of the same information changes may result. However when protocols such as the reliable messaging protocols are used, additional information changes will occur. For example, if a Reliable Messaging protocol were being used then the Buyer, once confirmation of deliveryabove guarantees of agreement on the message was received, would also know that the Seller, s "Order State" Variable was in the state "Received" even though there was no separate Interaction that described this. 2.5.2.3 Interaction Life-line The Channel through which an Interaction occurs is used to determine whether to enlist the Interaction with an already initiated Choreography or to initiate a new Choreography. Within a Choreography, two or more related Interactions MAYoutcome apply any required coordination should be grouped to form a logical conversation.performed using explicitly modeled Interactions.

The Channel through which an Interaction occurs is used to determine whether to enlist the Interaction with an already initiated conversation or to initiate a new conversation.implications of Choreography Coordination differ for root Choreographies versus enclosed Choreographies:

The two examples below show two usages of Coordinated Choreographies.

Example 1: Coordinated credit authorization without Finalizer Block(s):
<informationType name="creditDeniedType" exceptionType="true"/>
<!-- Coordinated CreditAuthorization  choreography without Finalizer Block(s)-->
<choreography name="CreditAuthorization" root="false" coordination="true">
   <relationship type="tns:CreditReqCreditResp"/>
   <variableDefinitions>
      <variable name="CreditExtended" informationType="xsd:int" silent="true"       
                roleTypes="tns:CreditResponder"/>
      <variable name="creditRequest"/>
      <variable name="creditAuthorized"/>
      <variable name="creditDenied" informationType = "creditDeniedType"/>
   </variableDefinitions>
   
   <!-- the normal work - receive the request and decide whether to approve -->
   <interaction name="creditAuthorization" channelVariable="tns:CreditRequestor" 
                operation="authorize">
      <participate  relationship="qname" fromRole="qname" toRole="qname" />relationshipType="SuperiorInferior" fromRole="tns:Superior" 
                   toRole="Inferior"/>
      <exchange  name="ncname" informationType="qname"?|channelType="qname"? action="request"|"respond" >name="creditRequest" informationType="creditRequest" 
                action="request">
         <send  variable="XPath-expression"? recordReference="list of ncname"? />variable="tns:creditRequest"/>
         <receive  variable="XPath-expression"? recordReference="list of ncname"? /> </exchange>* <record name="ncname" when="before"|"after" > <source variable="XPath-expression" /> <target variable="XPath-expression" /> </record>*variable="tns:creditRequest"/>
      </exchange>
      <exchange name="creditAuthorized" informationType="creditAuthorizedType"   
                action="respond">
         <send variable="tns:creditAuthorized"/>
         <receive variable="tns:creditAuthorized"/>
      </exchange>
      <exchange name="creditDenied" informationType="creditDeniedType" 
                action="respond">
         <send variable="tns:creditDenied" causeException="true"/>
         <receive variable="tns:creditDenied" causeException="true"/>
      </exchange>
   </interaction>
    The channelVariable attribute specifies<!-- catch the  Channel Variable containing information of a party, being(application) exception - as an exception it will abort the 
         target ofchoreography -->
   <exceptionBlock name="handleBadCreditException">
     <workunit  name="handleBadCredit" >
                <interaction name="badCreditInteraction" 
                             channelVariable="tns:CreditResponder"
                             operation="creditDenied">
                    <participate relationshipType="CreditReqCreditResp"
                         fromRole="tns:Responder" toRole="CreditRequestor"/>
      </interaction>
     </workunit>
  </exceptionBlock>
</choreography>

Example 2: Coordinated credit authorization with Finalizer Block(s):
<informationType name="creditDeniedType" exceptionType="true"/>
<!-- Coordinated CreditAuthorization  choreography with Finalizer Block(s) -->
<choreography name="CreditAuthorization" root="false" coordination="true">
   <relationship type="tns:CreditReqCreditResp"/>
   <variableDefinitions>
      <variable name="CreditExtended" informationType="xsd:int" silent="true"  
                roleTypes="tns:CreditResponder"/>
      <variable name="creditRequest"/>
      <variable name="creditAuthorized"/>
      <variable name="creditDenied" informationType = "creditDeniedType"/>
   </variableDefinitions>
   <!-- the  Interaction, which is used for determining where and how to sendnormal work -receive the request and  receive informationdecide whether to  and intoapprove -->
   <interaction name="creditAuthorization" channelVariable="tns:CreditRequestor"  
                operation="authorize">
      <participate relationshipType="SuperiorInferior" fromRole="tns:Superior" 
                   toRole="Inferior"/>
      <exchange name="creditRequest" informationType="creditRequest"  
             action="request">
         <send variable="tns:creditRequest"/>
         <receive variable="tns:creditRequest"/>
      </exchange>
      <exchange name="creditAuthorized" informationType="creditAuthorizedType" 
                action="respond">
         <send variable="tns:creditAuthorized"/>
         <receive variable="tns:creditAuthorized"/>
      </exchange>
      <exchange name="creditDenied" informationType="creditDeniedType" 
                action="respond">
         <send variable="tns:creditDenied" causeException="true"/>
         <receive variable="tns:creditDenied" causeException="true"/>
      </exchange>
   </interaction>
   <!-- catch the  party. The Channel Variable used in(application) exception - as an  Interaction MUST be available atexception it will abort the 
         two Roles beforechoreography and the  Interaction occurs. At runtime, information about a Channel Variable is expanded further. This requires thatFinalizer Block(s) are not accessible -->
   <exceptionBlock name="handleBadCreditException">
       <workunit  name="handleBadCredit" >
          <interaction name="badCreditInteraction" 
                channelVariable="tns:CreditResponder"
                operation="creditDenied">
                <participate relationshipType="CreditReqCreditResp"
                      fromRole="tns:Responder" toRole="CreditRequestor"/>
          </interaction>
       </workunit>
   </exceptionBlock>
   <!-- Finalizer Block(s) -->
   <!-- what to do if the  messages incredit is drawn down -->
   <finalizerBlock name="drawDown">
      <!-- if there is no application content to send, this could just be an 
           assignment to the  Choreography also contain correlation information, for example by including: A protocol header, such as a SOAP header, that specifiesstatecapturevariable creditExtended -->
       <workunit  name="drawdown" >
            <interaction name="drawdownInteraction" 
                         channelVariable="tns:CreditRequestor"
                         operation="drawDown">
                  <participate relationshipType="CreditReqCreditResp"
                      fromRole="tns:CreditRequestor" toRole="CreditResponder"/>
                  <exchange name="dummy" action="request">
                      <send></send>
                      <receive recordReference="drawdownRecord"/>
                  </exchange>  
                 <record name="drawdownRecord" when="before">
                      <source expression="drawnDown"/>
                      <target variable="CreditExtended"/>
                  </record>               
            </interaction>
           </workunit>
   </finalizerBlock>
   <!-- what to do if the  correlation datacredit is not used -->
   <finalizerBlock name="replenish">      
   <!-- if there is no application content to send, this could just be  used with the Channel, or Usingan  
           assignment to the  actual value of data within a message, for examplestate capturing variable creditExtended -->
       <workunit name="replenishWU">
            <interaction name="replenishInteraction" 
                         channelVariable="tns:CreditRequestor"
                         operation="replenish">
                <participate relationshipType="CreditReqCreditResp"
                      fromRole="tns:CreditRequestor" toRole="CreditResponder"/>
                <exchange name="dummy" action="request">
                     <send></send>
                       <receive recordReference="replenishRecord"/>
                </exchange>                
                <record name="replenishRecord" when="before">
                       <source expression="released"/>
                       <target variable="CreditExtended"/>
                </record>
             </interaction>
        </workunit>
   </finalizerBlock>
</choreography>        

2.5 Activities

Activities are the Order Numberlowest level components of the Order that is commonChoreography, used to all the messages sent overdescribe the Channel In practice, when a Choreographyactual work performed.

The Activity-Notation is performed, several different ways of doing correlation may be employedused to define activities as either:

2.5.1 Ordering Structures

An Ordering Structure is one of the fromRole and toRole attributes specify the requesting and the accepting Role Types respectively.following:

2.5.1.3 Choice

The choice ordering structure enables specifying that is exchanged between the two Roles in an Interaction. If noneonly one of these attributes are specified, then it is assumed that either no actual data is exchangedtwo or the type of data being exchanged is of no interest to the Choreography definition Within the exchangemore activities (as defined by two or more Activity-Notations) SHOULD be performed.

When two or more activities are specified in a choice element, only one activity is selected and the attribute action specifies the direction ofother activities are disabled. If the information exchanged inchoice has Work Units with guard conditions, the Interaction: Whenfirst Work Unit that matches the action attributeguard condition is set to "request", thenselected and the message exchange happens fromRole to toRole Whenother Work Units are disabled. If the action attributechoice has other activities, it is set to "respond", thenassumed that the message exchange happens from toRole to fromRole Withinselection criteria for the exchange element,activities are non-observable.

The syntax of this construct is:

In the sendexample below, choice element shows that information is sent from a Rolehas two Interactions, "processGoodCredit" and the receive element shows that information is received at a Role respectively in the Interaction:"processBadCredit". The optional Variables specified usingInteractions have the WS-CDL function getVariable()same directionality, participate within the sendsame Relationship and receive elements MUST be of type as described in the informationType or channelType attributes Whenhave the action element is set to "request",same fromRoles and toRoles names. If one Interaction happens, then the Variable specified within the send element using the variable attribute MUST be defined atother one is disabled.

2.5.2 Interacting

An Interaction is the fromRolebasic building block of a Choreography, which results in information exchanged between collaborating parties and possibly the Variable specified withinsynchronization of their observable information changes and the receive element usingvalues of the variable attribute MUST be defined atexchanged information.

An Interaction forms the toRole Whenbase atom of the action element is setChoreography composition, where multiple Interactions are combined to "respond",form a Choreography, which can then the Variable specified within the send element using the variable attribute MUST be defined at the toRole and the Variable specified within the receive element using the variable attribute MUST be defined at fromRole The Variable specified within the receive element MUST notbe defined with the attribute silentAction set to "true" Within the send or the receive element(s)used in different business contexts.

An Interaction is initiated when one of an exchange element,the recordReference attribute containsRoles participating in the Interaction sends a list of referencesmessage, through a common Channel, to record element(s)another Role that is participating in the same InteractionInteraction, that receives the message. If the align attributeinitial message is set to "false" for the Interaction,a request, then it means that the: Request exchange completes successfully forthe requestingaccepting Role once it has successfully sent the information ofcan optionally respond with a normal response message or a fault message, which will be received by the initiating Role.

An Interaction also contains "references" to:

2.5.2.1 Interaction Based Information Alignment

In some Choreographies there may be a requirement that, when the send element andInteraction is performed, the accepting Role has successfully receivedRoles in the information ofChoreography have agreement on the Variable specifiedoutcome. More specifically within the receive element Response exchange completes successfully once both the acceptingan Interaction, a Role has successfully sent the informationMAY need to have a common understanding of the Variable specified within the send element and the requesting Role has successfully received theobservable information creations or changes of the Variable specified within the receive element The optional element record is used to createone or changemore State Capturing Variables that are complementary to one or more State Capturing Variables atof its partner Role. Additionally, within an Interaction a Role MAY need to have a common understanding of the send and receive endsvalues of the Interaction. WithinInformation Exchange Capturing Variables at the record element,partner Role.

For example, after an Interaction happens, both the sourceBuyer and target elements specify using the WS-CDL function getVariable()the Variables whoseSeller want to have a common understanding that:

In WS-CDL, an Alignment Interaction MUST be explicitly used, in the action element is set to "response", thencases where two interacting parties require the recording(s)alignment of the Variables specified within the sourcetheir observable information changes and the target elements occur at the toRole forvalues of their exchanged information. After the send andalignment Interaction completes, both parties progress at the fromRole for the receive Within the record element, the when attribute specifies if a recording happens "before" or "after" a send or a receive of a message at a Rolesame time, in a Request or Response exchange. The following rules apply for record: One or more record elements MAY be specified and performed at one or both the Roles within an Interaction The source and the target Variable MUST be of compatible type The sourcelock-step fashion and the target Variable MUST be defined at the same Role The targetVariable MUST not be defined with the attribute silentAction set to "true" A record element MUST NOT be specifiedinformation in both parties is aligned. Their Variable alignment comes from the absence of an exchange element within an Interaction Iffact that the align attribute is setrequesting party has to "false" for the Interaction, then it meansknow that the Role specified withinaccepting party has received the record element makes availablemessage and the creation or change ofother way around, the Variable specified withinaccepting party has to know that the record element immediately afterrequesting party has sent the successful completionmessage before both of each record If the align attributethem progress. There is set to "true" for the Interaction,no intermediate state, where one party sends a message and then it means that Both Roles know the availability of the creationproceeds independently or change of the Variables specified within the record element only atthe successful completion of the Interaction If there are two or more record elements specified within an Interaction,other party receives a message and then all record operations MUST complete successfully for the Interact toit proceeds independently.

2.5.2.3 Interaction Syntax

The message purchaseOrder is sent from Consumer to Retailer as a request messagesyntax of the interaction construct is:

The message purchaseOrderAckattribute name is sent from Retailer to Consumer asused for specifying a response message The Variable consumer-channel is populated at Retailer using the recordname for each Interaction element declared within a Choreography.

The Interaction happens onchannelVariable attribute specifies the retailer-channel which hasChannel Variable containing information of a Token Type purchaseOrderID used as an identityparty, being the target of the channel. This identity elementInteraction, which is used for determining where and how to identify the business process ofsend and receive information to and into the retailerparty. The request message purchaseOrder contains the identity of the retailer business process as specifiedChannel Variable used in an Interaction MUST be available at the tokenLocator for purchaseOrder message The response message purchaseOrderAck containstwo Roles before the identity ofInteraction occurs. At runtime, information about a Channel Variable is expanded further. This requires that the consumer business process as specifiedmessages exchanged in the tokenLocatorChoreography also contain reference and correlation information, for purchaseOrderAck message The consumer-channel is sentexample by:

The operation attribute specifies the record element populatesname of the consumer-channel atoperation that is associated with this Interaction. The specified operation belongs to the retailer role. Ifinterface, as identified by the role and behavior elements of the Channel Type of the Channel Variable used in this Interaction.

The OPTIONAL align attribute waswhen set to "true" for this Interaction, then it alsomeans that this Alignment Interaction results in the consumer knows thatcommon understanding of both the retailer now hasinformation exchanged and the contactresulting observable information creations or changes at the ends of the consumer. In another example,Interaction as specified in the consumer could set its Variable "OrderSent" to "true"fromRole and the retailer wouldtoRole. The default for this attribute is "false".

An Interaction activity can be marked as a Choreography Initiator when the OPTIONAL initiate attribute is set its Variable "OrderReceived"to "true" using"true". The default for this attribute is "false".

Within the participate element, the record element.; <package name="ConsumerRetailerChoreography" version="1.0" <informationType name="purchaseOrderType" type="pons:PurchaseOrderMsg"/> <informationType name="purchaseOrderAckType" type="pons:PurchaseOrderAckMsg"/> <token name="purchaseOrderID" informationType="tns:intType"/> <token name="retailerRef" informationType="tns:uriType"/> <tokenLocator tokenName="tns:purchaseOrderID" informationType="tns:purchaseOrderType" query="/PO/orderId"/> <tokenLocator tokenName="tns:purchaseOrderID" informationType="tns:purchaseOrderAckType" query="/PO/orderId"/> <roleType name="Consumer"> <behavior name="consumerForRetailer" interface="cns:ConsumerRetailerPT"/> <behavior name="consumerForWarehouse" interface="cns:ConsumerWarehousePT"/> </roleType> < roleType name="Retailer"> <behavior name="retailerForConsumer" interface="rns:RetailerConsumerPT"/> </ roleType > <relationshipType name="ConsumerRetailerRelationship"> <role type="tns:Consumer" behavior="consumerForRetailer"/> <role type="tns:Retailer" behavior="retailerForConsumer"/> </relationshipType > <channelType name="ConsumerChannel"> <role type="tns:Consumer"/> <reference> <token type="tns:consumerRef"/> </reference> <identity> <token type="tns:purchaseOrderID"/> </identity> </channelType> <channelType name="RetailerChannel"> <passing channel="ConsumerChannel" action="request" /> <role type="tns:Retailer" behavior="retailerForConsumer"/> <reference> <token type="tns:retailerRef"/> </reference> <identity> <token type="tns:purchaseOrderID"/> </identity> </channelType> <choreography name="ConsumerRetailerChoreography" root="true"> <relationship type="tns:ConsumerRetailerRelationship"/> <variableDefinitions> <variable name="purchaseOrder" informationType="tns:purchaseOrderType" silentAction="true" /> <variable name="purchaseOrderAck" informationType="tns:purchaseOrderAckType" /> <variable name="retailer-channel" channelType="tns:RetailerChannel"/> <variable name="consumer-channel" channelType="tns:ConsumerChannel"/> <interaction channelVariable="tns:retailer-channel " operation="handlePurchaseOrder" align="true" initiate="true"> <participate relationship="tns:ConsumerRetailerRelationship" fromRole="tns:Consumer" toRole="tns:Retailer"/> <exchange informationType="tns:purchaseOrderType" action="request"> <send variable="cdl:getVariable("tns:purchaseOrder")" /> <receive variable="cdl:getVariable("tns:purchaseOrder")" recordReference="populateChannel" /> </exchange> <exchange informationType="purchaseOrderAckType" action="respond"> <send variable="cdl:getVariable("tns:purchaseOrderAck")" /> <receive variable="cdl:getVariable("tns:purchaseOrderAck")" /> </exchange> <record name="populateChannel" when="after"> <source variable="cdl:getVariable("tns:purchaseOrder, "PO/CustomerRef")"/> <target variable="cdl:getVariable("tns:consumer-channel")"/> </record> </interaction> </choreography> </package> 2.5.3 Composing Choreographies The perform activity realizesattribute specifies the "composition of Choreographies", whereas combining existing Choreographies resultsRelationship Type this Interaction participates in the creation of new Choreographies. For example if two separate Choreographies were defined as follows: A Request for Quote (RFQ) Choreography that involves a Buyer Role sending a request for a quotation for goodsand services to a Supplier Role to whichthe Supplier Role responds with either a "Quotation" or a "Decline to Quote" message,fromRole and An Order Placement Choreography wheretoRole attributes specify the Buyer Role places and order for goods or servicesrequesting and the Supplieraccepting Role either accepts the order or rejects it You could then create a new "Quote and Order" ChoreographyTypes respectively. The Role Type identified by reusingthe two wheretoRole attribute MUST be the RFQ Choreography was performed first, and then, depending onsame as the outcomeRole Type identified by the role element of the RFQ Choreography,Channel Type of the order was placed using the Order Placement Choreography. In this case the new Choreography is "composed" out ofChannel Variable used in the two previously defined Choreographies. Using this approach, Choreographies can be recursively combinedinteraction activity.

The OPTIONAL exchange element allows information to support Choreographies of any required complexity allowing more flexibility as Choreographies defined elsewhere canbe reused.exchanged during an Interaction. The perform activity enables a Choreography to specify that another Choreographyattribute name is performed atused for specifying a name for this point in its definition, as an enclosed Choreography. The syntax of the perform construct is:; <perform choreographyName="qname"> <bind name="ncname"> <this variable="XPath-expression" role="qname"/> <free variable="XPath-expression" role="qname"/> </bind>* </perform>exchange element.

Within the perform elementexchange element, the choreographyName attribute references a LocallyOPTIONAL attributes informationType and channelType identify the Information Type or Globally defined Choreography to be performed. The performed Choreography even when defined in a different Choreography Packagethe Channel Type of the information that is conceptually treated as an enclosed Choreography. An enclosing Choreography MAY perform onlyexchanged between the two Roles in an immediately contained ChoreographyInteraction. The attributes informationType and channelType are mutually exclusive. If none of these attributes are specified, then it is assumed that either no actual information is Locally defined. The optional bind element withinexchanged or the perform element enablestype of information in the performing Choreographybeing exchanged is of no interest to be shared withthe performedChoreography and vice versa. The role attribute aliases the Roles fromdefinition.

Within the performing Choreography toexchange element, the performed Choreography. The variableattribute within this elementaction specifies that a Variable inthe performing Choreography is bound withdirection of the Variable identified by variable attribute within the free elementinformation exchanged in the performed Choreography. The following rules apply when a ChoreographyInteraction:

Within the exchange element, the send element shows that are declared ininformation is sent from a different Choreography Package MUST be included first TheRole Types within a single bindand the receive element MUST be carried out byshows that information is received at a Role respectively in the same party, hence theyInteraction:

Within the OPTIONAL timeout element, the time-to-complete attribute identifies the timeframe within which an Interaction MUST complete after it proceeds independentlywas initiated or the other party receives a message and then it proceeds independently. Implementing this type of handshaking in a distributed system requires support from a Transaction/Coordination protocol, where agreementdeadline before an Interaction MUST complete. The time-to-complete SHOULD be of XML-Schema duration type when conveying the outcome among parties cantimeframe and SHOULD be reached even in the caseof failures and lossXML-Schema dateTime type when conveying the deadline. The OPTIONAL fromRoleRecordReference attribute contains an XML-Schema list of messages. 7 Acknowledgments To be completed 8 References [1] S. Bradner, "Key words for usereferences to record element(s) in RFCsthe same Interaction that will take effect at the fromRole when a timeout occurs. The OPTIONAL toRoleRecordReference attribute contains an XML-Schema list of references to Indicate Requirement Levels", RFC 2119, Harvard University, March 1997 [2] T. Berners-Lee, R. Fielding, L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, MIT/LCS, U.C. Irvine, Xerox Corporation, August 1998. [3] http://www.w3.org/TR/html401/interact/forms.html#submit-format [4] http://www.w3.org/TR/html401/appendix/notes.html#ampersands-in-uris [5] http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4 [6] SOAP Version 1.2 "http://www.w3.org/TR/2003/REC-soap12-part1-20030624/" [7] Web Services Definition Language (WSDL) 2.0 "http://www.w3.org/TR/2004/WD-wsdl20-20040803/" [8] Industry Initiative "Universal Description, Discovery and Integration" [9] W3C Recommendation "The XML Specification" [10] XML-Namespaces " Namespacesrecord element(s) in XML, Tim Bray et al., eds., W3C, January 1999" http://www.w3.org/TR/REC-xml-names [11] W3C Working Draft "XML Schema Part 1: Structures". Thisthe same Interaction that will take effect at the toRole when a timeout occurs.

The OPTIONAL element record is work in progress. [12] W3C Working Draft "XML Schema Part 2: Datatypes". Thisused to create or change and then make available within one Role, the value of one or more Variables using another Variable or an expression. The attribute name is work in progress. [13] W3C Recommendation "XML Path Language (XPath) Version 1.0" [14] "Uniform Resource Identifiers (URI): Generic Syntax, " RFC 2396, T. Berners-Lee, R. Fielding, L. Masinter, MIT/LCS, U.C. Irvine, Xerox Corporation, August 1998. [15] WSCI: Web Services Choreography Interface 1.0, A. Arkin et.al [16] XLANG: Web Servicesused for Business Process Design, S. Thatte, 2001 Microsoft Corporation [17] WSFL: Web Service Flow Language 1.0, F. Leymann, 2001 IBM Corporation [18] OASIS Working Draft "BPEL: Business Process Execution Language 2.0". This is work in progress. [19] BPMI.org "BPML: Business Process Modeling Language 1.0" [20] Workflow Management Coalition "XPDL: XML Processing Description Language 1.0", M. Marin, R. Norin R. Shapiro [21] OASIS Working Draft "WS-CAF: Web Services Context, Coordinationspecifying a distinct name for a record element within an Interaction. Within the record element, the source and Transaction Framework 1.0". This is work in progress. [22] OASIS Working Draft "Web Services Reliability 1.0". Thistarget elements specify these recordings of information happening at the send and receive ends of the Interaction:

Within the record element, the when attribute specifies if a recording happens before or after a send or "before" or "after" a receive of a message at a Role in a Request or a Response exchange or when a timeout has expired. When the when attribute is set to be added. This type also contains"timeout", the optional descriptionrecord element that is appliedspecifies the recording to all CDL constructs. </documentation> </annotation> <sequence> <element name="description" minOccurs="0"> <complexType mixed="true"> <sequence minOccurs="0" maxOccurs="unbounded"> <any processContents="lax"/> </sequence> </complexType> </element> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </sequence> <anyAttribute namespace="##other" processContents="lax"/> </complexType> <element name="package" type="cdl:tPackage"/> <complexType name="tPackage"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="informationType" type="cdl:tInformationType" minOccurs="0" maxOccurs="unbounded"/> <element name="token" type="cdl:tToken" minOccurs="0" maxOccurs="unbounded"/> <element name="tokenLocator" type="cdl:tTokenLocator" minOccurs="0" maxOccurs="unbounded"/> <element name="roleType" type="cdl:tRole" minOccurs="0" maxOccurs="unbounded"/> <element name="relationshipType" type="cdl:tRelationship" minOccurs="0" maxOccurs="unbounded"/> <element name="participantType" type="cdl:tParticipant" minOccurs="0" maxOccurs="unbounded"/> <element name="channelType" type="cdl:tChannelType" minOccurs="0" maxOccurs="unbounded"/> <element name="choreography" type="cdl:tChoreography" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="author" type="string" use="optional"/> <attribute name="version" type="string" use="required"/> <attribute name="targetNamespace" type="anyURI" use="required"/> </extension> </complexContent> </complexType> <complexType name="tInformationType"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="name" type="NCName" use="required"/> <attribute name="type" type="QName" use="optional"/> <attribute name="element" type="QName" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tToken"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="name" type="NCName" use="required"/> <attribute name="informationType" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tTokenLocator"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="tokenName" type="QName" use="required"/> <attribute name="informationType" type="QName" use="required"/> <attribute name="query" type="cdl:tXPath-expr" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tRoleType"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="behavior" type="cdl:tBehavior" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tBehavior"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="name" type="NCName" use="required"/> <attribute name="interface" type="QName" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tRelationshipType"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="role" type="cdl:tRoleRef" minOccurs="2" maxOccurs="2"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tRoleRef"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="type" type="QName" use="required"/> <attribute name="behavior" use="optional"> <simpleType> <list itemType="NCName"/> </simpleType> </attribute> </extension> </complexContent> </complexType> <complexType name="tParticipantType"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="role" type="cdl:tRoleRef2" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tRoleRef2"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="type" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tChannelType"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="passing" type="cdl:tPassing" minOccurs="0" maxOccurs="unbounded"/> <element name="role" type="cdl:tRoleRef3"/> <element name="reference" type="cdl:tReference"/> <element name="identity" type="cdl:tIdentity" minOccurs="0" maxOccurs="1"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="usage" type="cdl:tUsage" use="optional" default="unlimited"/> <attribute name="action" type="cdl:tAction" use="optional" default="request-respond"/> </extension> </complexContent> </complexType> <complexType name="tRoleRef3"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="type" type="QName" use="required"/> <attribute name="behavior" type="NCName" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tPassing"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="channel" type="QName" use="required"/> <attribute name="action" type="cdl:tAction" use="optional" default="request-respond"/> <attribute name="new" type="boolean" use="optional" default="true"/> </extension> </complexContent> </complexType> <complexType name="tReference"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="token" type="cdl:tTokenReference" minOccurs="1" maxOccurs="1"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tTokenReference"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="name" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tIdentity"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="token" type="cdl:tTokenReference" minOccurs="1" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tChoreography"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="relationship" type="cdl:tRelationshipRef" maxOccurs="unbounded"/> <element name="variableDefinitions" type="cdl:tVariableDefinitions" minOccurs="0"/> <element name="choreography" type="cdl:tChoreography" minOccurs="0" maxOccurs="unbounded"/> <group ref="cdl:activity"/> <element name="exception" type="cdl:tException" minOccurs="0"/> <element name="finalizer" type="cdl:tFinalizer" minOccurs="0"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="complete" type="cdl:tBoolean-expr" use="optional"/> <attribute name="isolation" type="cdl:tIsolation" use="optional" default="dirty-write"/> <attribute name="root" type="boolean" use="optional" default="false"/> </extension> </complexContent> </complexType> <complexType name="tRelationshipRef"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="type" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tVariableDefinitions"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="variable" type="cdl:tVariable" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tVariable"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="name" type="NCName" use="required"/> <attribute name="informationType" type="QName" use="optional"/> <attribute name="channelType" type="QName" use="optional"/> <attribute name="mutable" type="boolean" use="optional" default="true"/> <attribute name="free" type="boolean" use="optional" default="false"/> <attribute name="silentAction" type="boolean" use="optional" default="false"/> <attribute name="role" type="QName" use="optional"/> </extension> </complexContent> </complexType> <group name="activity"> <choice> <element name="sequence" type="cdl:tSequence"/> <element name="parallel" type="cdl:tParallel"/> <element name="choice" type="cdl:tChoice"/> <element name="workunit" type="cdl:tWorkunit"/> <element name="interaction" type="cdl:tInteraction"/> <element name="perform" type="cdl:tPerform"/> <element name="assign" type="cdl:tAssign"/> <element name="silentAction" type="cdl:tSilentAction"/> <element name="noAction" type="cdl:tNoAction"/> </choice> </group> <complexType name="tSequence"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <group ref="cdl:activity" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tParallel"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <group ref="cdl:activity" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tChoice"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <group ref="cdl:activity" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tWorkunit"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <group ref="cdl:activity"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="guard" type="cdl:tBoolean-expr" use="optional"/> <attribute name="repeat" type="cdl:tBoolean-expr" use="optional"/> <attribute name="block" type="boolean" use="optional" default="false"/> </extension> </complexContent> </complexType> <complexType name="tPerform"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="bind" type="cdl:tBind" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="choreographyName" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tBind"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="this" type="cdl:tBindVariable"/> <element name="free" type="cdl:tBindVariable"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tBindVariable"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="variable" type="cdl:tXPath-expr" use="required"/> <attribute name="role" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tInteraction"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="participate" type="cdl:tParticipate"/> <element name="exchange" type="cdl:tExchange" minOccurs="0" maxOccurs="unbounded"/> <element name="record" type="cdl:tRecord" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="channelVariable" type="QName" use="required"/> <attribute name="operation" type="NCName" use="required"/> <attribute name="time-to-complete" type="duration" use="optional"/> <attribute name="align" type="boolean" use="optional" default="false"/> <attribute name="initiate" type="boolean" use="optional" default="false"/> </extension> </complexContent> </complexType> <complexType name="tParticipate"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="relationship" type="QName" use="required"/> <attribute name="fromRole" type="QName" use="required"/> <attribute name="toRole" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tExchange"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="send" type="cdl:tVariableRecordRef"/> <element name="receive" type="cdl:tVariableRecordRef"/> </sequence> <attribute name="name" type="string" use="optional"/> <attribute name="informationType" type="QName" use="optional"/> <attribute name="channelType" type="QName" use="optional"/> <attribute name="action" type="cdl:tAction2" use="required"/> </extension> </complexContent> </complexType> <complexType name="tVariableRecordRef"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="variable" type="cdl:tXPath-expr" use="optional"/> <attribute name="recordReference" use="optional"> <simpleType> <list itemType="NCName"/> </simpleType> </attribute> </extension> </complexContent> </complexType> <complexType name="tVariableRef"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="variable" type="cdl:tXPath-expr" use="required"/> </extension> </complexContent> </complexType> <complexType name="tRecord"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="source" type="cdl:tVariableRef"/> <element name="target" type="cdl:tVariableRef"/> </sequence> <attribute name="name" type="string" use="optional"/> <attribute name="when" type="string" use="required"/> </extension> </complexContent> </complexType> <complexType name="tAssign"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="copy" type="cdl:tCopy" maxOccurs="unbounded"/> </sequence> <attribute name="role" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tCopy"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="source" type="cdl:tVariableRef"/> <element name="target" type="cdl:tVariableRef"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tSilentAction"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="role" type="QName" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tNoAction"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="role" type="QName" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tException"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="workunit" type="cdl:tWorkunit" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tFinalizer"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="workunit" type="cdl:tWorkunit"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <simpleType name="tAction"> <restriction base="string"> <enumeration value="request-respond"/> <enumeration value="request"/> <enumeration value="respond"/> </restriction> </simpleType> <simpleType name="tAction2"> <restriction base="string"> <enumeration value="request"/> <enumeration value="respond"/> </restriction> </simpleType> <simpleType name="tUsage"> <restriction base="string"> <enumeration value="once"/> <enumeration value="unlimited"/> </restriction> </simpleType> <simpleType name="tBoolean-expr"> <restriction base="string"/> </simpleType> <simpleType name="tXPath-expr"> <restriction base="string"/> </simpleType> <simpleType name="tIsolation"> <restriction base="string"> <enumeration value="dirty-write"/> <enumeration value="dirty-read"/> <enumeration value="serializable"/> </restriction> </simpleType> </schema> 10be performed when a timeout occurs. If two or more record elements have the same value in their when attribute and are referenced within the recordReference attribute of a send or a receive element, then they are performed in the order in which they are specified.

The following rules apply for the information recordings when using the record element:

The example below shows a complete Choreography that involves one Interaction performed from Role Type "Consumer" to Role Type "Retailer" on the Channel "retailer-channel" as a request/response exchange:

<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.w3.org/2004/12/ws-chor/cdl"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"     
     targetNamespace="http://www.oracle.com/ashwini/sample"
     xmlns:tns=http://www.oracle.com/ashwini/sample"
     name="ConsumerRetailerChoreography"
     version="1.0">
  <informationType name="purchaseOrderType" type="tns:PurchaseOrderMsg"/>
  <informationType name="purchaseOrderAckType" type="tns:PurchaseOrderAckMsg"/>
  <informationType name="badPOAckType"  type="xsd:string" exceptionType="true"/>
  <token name="purchaseOrderID" informationType="tns:intType"/>
  <token name="retailerRef" informationType="tns:uriType"/>
  <tokenLocator tokenName="tns:purchaseOrderID"
                informationType="tns:purchaseOrderType" query="/PO/orderId"/>
  <tokenLocator tokenName="tns:purchaseOrderID"
                informationType="tns:purchaseOrderAckType" query="/PO/orderId"/>
  <roleType name="Consumer">
    <behavior name="consumerForRetailer" interface="tns:ConsumerRetailerPT"/>
    <behavior name="consumerForWarehouse" interface="tns:ConsumerWarehousePT"/>
  </roleType>
  <roleType name="Retailer">
    <behavior name="retailerForConsumer" interface="tns:RetailerConsumerPT"/>
  </roleType>
  <relationshipType name="ConsumerRetailerRelationship">
    <role type="tns:Consumer" behavior="consumerForRetailer"/>
    <role type="tns:Retailer" behavior="retailerForConsumer"/>
  </relationshipType>
  <channelType name="ConsumerChannel">
    <role type="tns:Consumer"/>
    <reference>
      <token name="tns:consumerRef"/>
    </reference>
    <identity>
      <token name="tns:purchaseOrderID"/>
    </identity>
  </channelType>
  <channelType name="RetailerChannel">
    <passing channel="ConsumerChannel" action="request" />
    <role type="tns:Retailer" behavior="retailerForConsumer"/>
    <reference>
      <token name="tns:retailerRef"/>
    </reference>
    <identity>
      <token name="tns:purchaseOrderID"/>
    </identity>
  </channelType>
  <choreography name="ConsumerRetailerChoreography" root="true">
    <relationship type="tns:ConsumerRetailerRelationship"/>
    <variableDefinitions>
      <variable name="purchaseOrder" informationType="tns:purchaseOrderType" 
                silent="true" />
      <variable name="purchaseOrderAck" 
                informationType="tns:purchaseOrderAckType" />
      <variable name="retailer-channel" channelType="tns:RetailerChannel"/>
      <variable name="consumer-channel" channelType="tns:ConsumerChannel"/>
      <variable name="badPurchaseOrderAck"   
                informationType="tns:badPOAckType" roleTypes="tns:Consumer"/>
      <variable name="badPurchaseOrderAck"   
                informationType="tns:badPOAckType" roleTypes="tns:Retailer"
                silent="true" />
    </variableDefinitions>
    <interaction name="createPO"
                 channelVariable="tns:retailer-channel" 
                 operation="handlePurchaseOrder" align="true" 
                 initiate="true">
      <participate relationshipType="tns:ConsumerRetailerRelationship" 
                   fromRole="tns:Consumer" toRole="tns:Retailer"/>
      <exchange name="request" 
                informationType="tns:purchaseOrderType" action="request">
        <send variable="cdl:getVariable("tns:purchaseOrder", "", "")" />
        <receive variable="cdl:getVariable("tns:purchaseOrder", "", "")"
                 recordReference="record-the-channel-info" />
      </exchange>
      <exchange name="response"
                informationType="purchaseOrderAckType" action="respond">
        <send variable="cdl:getVariable("tns:purchaseOrderAck", "", "")" />
        <receive variable="cdl:getVariable("tns:purchaseOrderAck", "", "")" />
      </exchange>
      <exchange name="badPurchaseOrderAckException" 
                informationType="badPOAckType" action="respond">
        <send variable="cdl:getVariable(,tns:badPurchaseOrderAck,, ,,, ,,)"
                causeException="true" />
        <receive variable="cdl:getVariable("tns:badPurchaseOrderAck", "", "")"
                causeException="true" />                 
      </exchange>
      <record name="record-the-channel-info" when="after">
        <source variable="cdl:getVariable("tns:purchaseOrder, "", 
                                          "PO/CustomerRef")"/>
        <target variable="cdl:getVariable("tns:consumer-channel", "", "")"/>
      </record>
    </interaction>
 </choreography>    
</package>

2.5.3 Composing Choreographies

The perform activity realizes the "composition of Choreographies", whereas combining existing Choreographies results in the creation of new Choreographies. For example if two separate Choreographies were defined as follows:

One could then create a new "Quote and Order" Choreography by reusing the two, where the "RFQ" Choreography was performed first, and then, depending on the outcome of the "RFQ" Choreography, the order is placed using the "Order Placement" Choreography. In this case the new Choreography is "composed" out of the two previously defined Choreographies. Using this approach, Choreographies can be combined to support Choreographies of any required complexity, allowing more flexibility as Choreographies defined elsewhere can be reused.

The perform activity enables a Choreography to specify that another Choreography is performed at this point in its definition, as an enclosed Choreography. The performed Choreography, even when defined in a different Choreography Package, is conceptually treated as an enclosed Choreography.

The syntax of the perform construct is:

Within the perform element, the choreographyName attribute references the name of the Choreography to be performed.

The OPTIONAL choreographyInstanceId attribute defines an identifier for this performance of the Choreography identified by the choreographyName attribute. If the performed Choreography can only be performed once within the enclosing Choreography, the choreographyInstanceId attribute is OPTIONAL. Otherwise it MUST be specified and the value MUST be different for each performance. This is a dynamic requirement. For example, if a single perform element appears in a Work Unit that can repeat, each use of perform must assign a different ChoreographyInstanceId identifier.

The OPTIONAL Choreography-Notation within the perform element defines a Locally defined Choreography that is performed only by this perform activity. If specified, the choreographyName attribute within the perform element MUST match the attribute name within the choreography element of the Choreography-Notation.

The OPTIONAL bind element within the perform element enables information in the performing Choreography to be shared with the performed Choreography and vice versa. Within the bind element, the attribute name is used for specifying a name for each bind element declared within this perform activity. Within the bind element, the role attribute aliases the Roles from the performing Choreography to the performed Choreography.

The variable attribute within this element specifies that a Variable in the performing Choreography is bound with the Variable identified by the variable attribute within the free element in the performed Choreography.

The following rules apply:

The example below shows a Choreography composition, where a Choreography "PurchaseChoreography" is performing the Globally defined Choreography "RetailerWarehouseChoreography" and aliases the Variable "purchaseOrderAtRetailer" to the Variable "purchaseOrder" defined at the performed Choreography "RetailerWarehouseChoreography". Once aliased, the Variable "purchaseOrderAtRetailer" extends to the enclosed Choreography and thus these Variables can be used interchangeably for sharing their information.

2.5.4 Assigning Variables

The Assign activity is used to create or change, and then make available within one Role, the value of one or more Variables using the value of another Variable or expression.

The assign activity MAY also be used to cause an Exception at a Role.

The syntax of the assign construct is:

The copy element within the assign element creates or changes, at the Role specified by the roleType attribute, the Variable defined by the target element using the Variable or expression defined by the source element at the same Role. Within the copy element, the attribute name is used for specifying a name for each copy element declared within this assign activity.

The following rules apply to assignment:

The examples below show some possible usages of assign.

2.5.7 Finalizing a Choreography

The finalize activity is used to enable a specific Finalizer Block in successfully completed instances of immediately enclosed Choreographies, and thus bring those Choreographies to defined conclusions.

A Choreography that does not perform any Choreographies that have Finalizer Block(s) defined MUST NOT have any finalize activities specified within it. A finalize activity MAY be present within a Choreography that has performed a Choreography with one or more defined Finalizer Block(s) - that is a finalize activity can be specified within the Choreography body, within an Exception Block and within Finalizer Blocks.

For a single performed Choreography instance, at most one of its Finalizer Block(s) SHOULD be enabled by a finalize activity during the subsequent progress, including Exception handling and finalization, of the enclosing Choreography.

The syntax of the finalize construct is:

The OPTIONAL attribute name is used for specifying a distinct name for each finalize element declared within a Choreography Package.

Each finalizerReference element enables a Finalizer Block in a performed instance of an immediately enclosed Choreography. Within a finalize element, each finalizerReference MUST refer to a different performed Choreography instance.

Within the finalizerReference element, the choreographyName attribute identifies the Choreography referenced by the choreographyName attribute of the perform construct.

Within the finalizerReference element, the OPTIONAL choreographyInstanceId attribute identifies the performed Choreography instance to be finalized, using the value defined by the choreographyInstanceId attribute of the perform construct. The choreographyInstanceId attribute MAY be omitted if the contract logic of the performing Choreography is such that only one instance of the Choreography identified by the choreographyName attribute could have been performed when the finalize activity is enabled. If more than one instance of the Choreography identified by the choregraphyName attribute could have been performed, the choreographyInstanceId attribute MUST be present.

Within the finalizerReference element, the attribute finalizerName indicates which Finalizer Block is to be enabled in the performed instance. If the targeted, immediately enclosed, Choreography has only one defined Finalizer Block, then the finalizerName attribute is OPTIONAL.

In the example below, Choreography "CreditDecider" gets credit authorizations for two bidders, "A" and "B", at most one of which can be selected. The "CreditDecider" performs a "CoordinatedCreditAuthorization" Choreography for each bidder, and then finalizes each performed Choreography depending on whether "A", "B" or neither was selected.

<choreography name="CreditDecider">
 
    <!-- only a snippet is shown here -->
    <parallel>
        <perform name="creditForA"
            choreographyName="CoordinatedCreditAuthorization" 
            choreographyInstance="creditForA">
            <!-- bind such that this does the business for A -->
        </perform>
        <perform name="creditForB"
            choreographyName="CoordinatedCreditAuthorization" 
            choreographyInstance="creditForB">
            <!-- bind such that this does the business for A -->
        </perform>
    </parallel>
        
    <!--  other stuff here -->
    
    <workunit name="chooseA"
        guard="cdl:getVariable(,Chosen,,,,,Broker,)=,A," >
        <finalize>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForA"
                finalizerName="drawDown"/>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForB"
                finalizerName="replenish"/>
        </finalize>
    </workunit>            
    <workunit name="chooseB"
        guard="cdl:getVariable(,Chosen,,,,,Broker,)=,B," >
        <finalize>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForB"
                finalizerName="drawDown"/>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForA"
                finalizerName="replenish"/>
        </finalize>
    </workunit>            
    <workunit name="chooseNeither"
        guard="cdl:getVariable(,Chosen,,,,,Broker,)=,0," >
        <finalize>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForA"
                finalizerName="replenish"/>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForB"
                finalizerName="replenish"/>
        </finalize>
    </workunit> 
</choreography>

3 Example

To be completed.

4 Relationship with the Security framework

The WS-Security specification [WSS] provides enhancements to SOAP messaging to provide quality of protection through message integrity, message confidentiality, and single message authentication, including a general-purpose mechanism for associating security tokens with messages, and a description of how to encode binary security tokens.

As messages can have consequences in the real world, collaboration parties will impose security requirements on their information exchanges. WS-Security can be used satisfy many of these requirements.

5 Relationship with the Reliable Messaging framework

The WS-Reliability specification [WSRM] provides a reliable mechanism to exchange information among collaborating parties. The WS-Reliability specification prescribes the formats for all information exchanged without placing any restrictions on the content of the encapsulated business documents. The WS-Reliability specification supports message exchange patterns, over various transport protocols (examples are HTTP/S, FTP, SMTP, etc.). The WS-Reliability specification supports sequencing of messages and guaranteed, exactly once delivery.

A violation of any of these consistency guarantees results in an "error", which MAY be reflected in the Choreography with an Exception.

6 Relationship with the Coordination framework

In WS-CDL, Alignment Interactions and Coordinated Choreographies require support from a Coordination protocol, where agreement on the WS-CDLoutcome among parties can be reached even in the case of failures and loss of messages. In this case, the Alignment Interactions and the Coordinated Choreographies MUST be bound to a Coordination protocol.

7 Relationship with the Addressing framework

The WS-Addressing specification supplies[WSAD] provides transport-neutral mechanisms to address Web services and messages, specifically, XML [XML], [XMLNS] elements to identify Web service endpoints and to secure end-to-end endpoint identification in messages. WS-Addressing enables messaging systems to support message transmission through networks that include processing nodes such as XPATHendpoint managers, firewalls, and gateways in a transport-neutral manner.

WS-Addressing can be used to convey the reference and correlation information for normalizing expanded Channel Variable information into an uniform format that can be processed independently of transport or application.

The WS-Addressing specification is in progress and the WS-Choreography Working Group will review and comment on developments in this effort on an ongoing basis.

8 Conformance

To be completed

9 Acknowledgments

This document has been produced by the members of the Web Services Choreography Working Group. The chairs of this Working Group are Martin Chapman (Oracle Corporation) and Steve Ross-Talbot (Enigmatec Corporation).

The editors would like to thank the Working Group members for their contributions. Members of the Working Group are (at the time of writing): Abbie Barbir (Nortel Networks), Charlton Barreto (webMethods, Inc.), Carine Bournez (W3C), Gary Brown (Enigmatec Corporation), Anthony Fletcher (Choreology Ltd), Peter Furniss (Choreology Ltd), Jim Hendler (University of Maryland (Mind Lab)), Kohei Honda (Queen Mary and Westerfield College), Nickolas Kavantzas (Oracle Corporation), Yutaka Kudou (Hitachi, Ltd.), Yves Lafon (W3C), Monica Martin (Sun Microsystems, Inc.), Robin Milner (Cambridge University), Jeff Mischkinsky (Oracle Corporation), Bijan Parsia (University of Maryland (Mind Lab)), Greg Ritzinger (Novell), Yoko Seki (Hitachi, Ltd.), Prasad Yendluri (webMethods, Inc.), Nobuko Yoshida (Imperial College London).

Previous members of the Working Group were: Assaf Arkin (Intalio Inc.), Daniel Austin (Sun Microsystems, Inc.), Alistair Barros (DSTC Pty Ltd (CITEC)), Richard Bonneau (IONA), Allen Brown (Microsoft Corporation), Mike Brumbelow (Apple), David Burdett (Commerce One), Ravi Byakod (Intalio Inc.), Michael Champion (Software AG), David Chapell (Sonic Software), Ugo Corda (SeeBeyond Technology Corporation), Fred Cummins (EDS), Jon Dart (TIBCO Software), Jean-Jacques Dubray (Attachmate), William Eidson (TIBCO Software), Colleen Evans (Sonic Software), Keith Evans (Hewlett-Packard), Yaron Goland (BEA Systems), Leonard Greski (W. W. Grainger, Inc.), Ricky Ho (Cisco Systems Inc.), Andre Huertas (Uniform Code Council), Duncan Johnston-Watt (Enigmatec Corporation), Eunju Kim (National Computerization Agency), Mayilraj Krishnan (Cisco Systems Inc.), Melanie Kudela (Uniform Code Council), Bruno Kurtic (webMethods, Inc.), Paul Lipton (Computer Associates), Kevin Liu (SAP AG), Francis McCabe (Fujitsu Ltd.), Carol McDonald (Sun Microsystems, Inc.), Greg Meredith (Microsoft Corporation), Eric Newcomer (IONA), Sanjay Patil (IONA), Ed Peters (webMethods, Inc.), Steve Pruitt (Novell), Dinesh Shahane (TIBCO Software), Evren Sirin (University of Maryland (Mind Lab)), Ivana Trickovic (SAP AG), William Vambenepe (Hewlett-Packard), Jim Webber (Arjuna Technologies Ltd.), Stuart Wheater (Arjuna Technologies Ltd.), Steven White (SeeBeyond Technology Corporation), Hadrian Zbarcea (IONA).

10 References

RFC 2119
Key words for use in RFCs to Indicate Requirement Levels, S. Bradner, Editor. IETF, March 1997. This RFC is available at http://www.ietf.org/rfc/rfc2119.txt.
RFC 2396
Uniform Resource Identifiers (URI): Generic Syntax, T. Berners-Lee, R. Fielding and L. Masinter, Editors. IETF, August 1998. This RFC is available at http://www.ietf.org/rfc/rfc2396.txt.
SOAP Version 1.2 Part 1: Messaging Framework
SOAP Version 1.2 Part 1: Messaging Framework, Marc Hadley, Noah Mendelsohn, Jean-Jacques Moreau, et. al., Editors. World Wide Web Consortium, 24 June 2003. This version is http://www.w3.org/TR/2003/REC-soap12-part1-20030624/. The latest version is available at http://www.w3.org/TR/soap12-part1/.
Web Services Description Language (WSDL) Version 2.0 Part 1: Core Language
Web Services Description Language (WSDL) Version 2.0 Part 1: Core Language, Sanjiva Weerawarana, Roberto Chinnici, Martin Gudgin, et. al., Editors. World Wide Web Consortium, 03 August 2004. This version is http://www.w3.org/TR/2004/WD-wsdl20-20040803. The latest version is available at http://www.w3.org/TR/wsdl20.
UDDI v3
UDDI Version 3.0.2, Luc Clement, Andrew Hately, Claus von Riegen, Tony Rogers, Editors. OASIS Open, 19 October 2004. This version is http://uddi.org/pubs/uddi-v3.0.2-20041019.htm. The latest version is available at http://uddi.org/pubs/uddi_v3.htm
Extensible Markup Language (XML) 1.0 extension functions. These functions can be used in any XPath expression as long as the types are compatible. xsd:time getCurrentTime(xsd:QName roleName). Returns the current time(Third Edition)
Extensible Markup Language (XML) 1.0 (Third Edition), Jean Paoli, Eve Maler, Tim Bray, et. al., Editors. World Wide Web Consortium, 04 February 2004. This version is http://www.w3.org/TR/2004/REC-xml-20040204. The latest version is available at the Role specified by roleName. xsd:date getCurrentDate(xsd:QName roleName). Returns the current datehttp://www.w3.org/TR/REC-xml.
Namespaces in XML
Namespaces in XML, Andrew Layman, Dave Hollander, and Tim Bray, Editors. World Wide Web Consortium, 14 January 1999. This version is http://www.w3.org/TR/1999/REC-xml-names-19990114. The latest version is available at the Role specified by roleName. xsd:dateTime getCurrentDateTime(xsd:QName roleName) Returns the current datehttp://www.w3.org/TR/REC-xml-names.
XML Schema Part 1: Structures Second Edition
XML Schema Part 1: Structures Second Edition, David Beech, Murray Maloney, Henry S. Thompson, and timeNoah Mendelsohn, Editors. World Wide Web Consortium, 28 October 2004. This version is http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/. The latest version is available at the Role specified by roleName. xsd:boolean hasTimeElapsed(xsd:duration elapsedTime, xsd:QName roleName). Returns "true" if used in a guard or repetition condition of a Work Unit with the block attribute set to "true"http://www.w3.org/TR/xmlschema-1/.
XML Schema Part 2: Datatypes Second Edition
XML Schema Part 2: Datatypes Second Edition, Ashok Malhotra and the time specified by elapsedTimePaul V. Biron, Editors. World Wide Web Consortium, 28 October 2004. This version is http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/. The latest version is available at the Role specified by roleName has elapsed from the time the either the guard or the repetition condition were enabled for matching. Otherwise it returns "false". xsd:string createNewID() Returns a new globally unique string value for use as an identifier. xsd:any getVariable(xsd:string varName, xsd:string documentPath?, xsd:QName roleName?) Returns the information of the Variable with name varName as a node set containing a single node.http://www.w3.org/TR/xmlschema-2/.
XPointer Framework
XPointer Framework, Paul Grosso, Eve Maler, Jonathan Marsh, and Norman Walsh, Editors. World Wide Web Consortium, 25 March 2003. This version is http://www.w3.org/TR/2003/REC-xptr-framework-20030325/. The second parameterlatest version is optional. When the second parameteravailable at http://www.w3.org/TR/xptr-framework/.
Web Service Choreography Interface (WSCI) 1.0
Web Service Choreography Interface (WSCI) 1.0, Assaf Arkin, Sid Askary, Scott Fordin, et. al., Editors. W3C Note. This version is not used, this function retrieves from the Variable information the entire document. When the second parameterhref="http://www.w3.org/TR/2002/NOTE-wsci-20020808. The latest version is used, this function retrieves from the Variable information, the fragment of theavailable at href="http://www.w3.org/TR/2002/NOTE-wsci-20020808.
XLANG
XLANG, Satish Thatte, Author. Microsoft Corporation, 2001. This document is available at the provided absolute location path.http://www.gotdotnet.com/team/xml_wsspecs/xlang-c/default.htm.
WSFL 1.0
Web Services Flow Language (WSFL) Version 1.0, Frank Leymann, Editor. IBM, May 2001. This PDF document is available at http://www-3.ibm.com/software/solutions/webservices/pdf/WSFL.pdf.
WS-BPEL 2.0
Web Services Business Process Execution Language Version 2.0, Assaf Arkin, Sid Askary, Ben Bloch, et. al., Editors. OASIS Open, December 2004. This document is available at http://www.oasis-open.org/committees/download.php/10347/wsbpel-specification-draft-120204.htm.
BPML 1.0
Business Process Modeling Language, Assaf Arkin, Editor. BPMI.org, November 2002. This document is available at http://www.bpmi.org/downloads/BPML1.0.zip.
WPDI XML PDL
Workflow Process Definition Interface -- XML Process Definition Language, Roberta Norin, Editor. The third parameterWorkflow Management Coalition, October 2002. This pdf document is optional. When the third parameteravailable at http://www.wfmc.org/standards/docs/TC-1025_10_xpdl_102502.pdf.
WS-CAF 1.0
OASIS Web Services Composite Application Framework (WS-CAF) TC, This TC page is used that the Variable information MUST beavailable at the Role specified by roleName. If this parameterhttp://www.oasis-open.org/committees/tc_home.php?wg_abbrev=ws-caf.
WS-Reliability 1.1
, Kazunori Iwasa, Jacques Durant, Tom Rutt, et. al., Editors. OASIS Open, August 2004. This document is not used then the Roleavailable at http://www.oasis-open.org/committees/download.php/9330/WS-Reliability-CD1.086.zip.
Java Language Specification
, James Gosling, Bill Joy, Guy Steele, Gilad Bracha, Editors. Sun Microsystems, Inc., 2000. This document is inferred from the context that this functionavailable at http://java.sun.com/docs/books/jls/second_edition/html/j.title.doc.html.
WS-Security TC
OASIS Web Services Security (WSS) TC , This TC page is available at http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wss.
Java 2 Entreprise Edition
Java 2 Platform, Enterprise Edition (J2EE), See http://java.sun.com/j2ee/.
XML Inclusions (XInclude) Version 1.0
XML Inclusions (XInclude) Version 1.0, Jonathan Marsh and David Orchard, Editors. World Wide Web Consortium, 30 September 2004. This version is http://www.w3.org/TR/2004/PR-xinclude-20040930/. The latest version is available at http://www.w3.org/TR/xinclude/.
C# Language Specification
C# Language Specification, ECMA.. This document is available at http://www.ecma-international.org/publications/standards/Ecma-334.htm.
Web Services Addressing - Core
Web Services Addressing - Core, Martin Gudgin, Marc Hadley, Editors. World Wide Web Consortium, 08 December 2004. This version is used. xsd:boolean isVariableAvailable(xsd:string varName, xsd:QName roleName) Returns "true" if the information of the Variable with name varNamehttp://www.w3.org/TR/2004/WD-ws-addr-core-20041208/. The latest version is available at the Role specified by roleName. Returns "false" otherwise. xsd:boolean variablesAligned(xsd:string varName, xsd:string withVarName, xsd:QName relationshipName) Returns "true" if withinhttp://www.w3.org/TR/ws-addr-core.

11 Last Call Issues

12 WS-CDL XSD Schemas

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:cdl="http://www.w3.org/2004/12/ws-chor/cdl"
    targetNamespace="http://www.w3.org/2004/12/ws-chor/cdl"
    elementFormDefault="qualified">
  <complexType name="tExtensibleElements">
    <annotation>
      <documentation>
        This type is extended by other CDL component types to allow 
          elements and attributes from other namespaces to be  of Channel Type. xsd:boolean globalizedTrigger(xsd:string expression, xsd:string roleName, xsd:string expression2, xsd:string roleName2, ) Combines expressions that include Variablesadded. 
        This type also contains the optional description element that 
         are defined at different Roles.is applied to all CDL constructs.
       </documentation>
    </annotation>
    <sequence>
      <element name="description" minOccurs="0">
        <complexType mixed="true">
          <sequence minOccurs="0" maxOccurs="unbounded">
            <any processContents="lax"/>
          </sequence>
          <attribute name="type" type="cdl:tDescriptionType" use="optional" 
                 default="documentation"/>
        </complexType>
      </element>
      <any namespace="##other" processContents="lax" 
          minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <anyAttribute namespace="##other" processContents="lax"/>
  </complexType>
    <element name="package" type="cdl:tPackage"/>
    
  <complexType name="tPackage">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="informationType" type="cdl:tInformationType" 
                  minOccurs="0" maxOccurs="unbounded"/>
          <element name="token" type="cdl:tToken" minOccurs="0"
                  maxOccurs="unbounded"/>
          <element name="tokenLocator" type="cdl:tTokenLocator" 
                  minOccurs="0" maxOccurs="unbounded"/>
          <element name="roleType" type="cdl:tRoleType" minOccurs="0"
                  maxOccurs="unbounded"/>
          <element name="relationshipType" type="cdl:tRelationshipType" 
                  minOccurs="0" maxOccurs="unbounded"/>
          <element name="participantType" type="cdl:tParticipantType" 
                  minOccurs="0" maxOccurs="unbounded"/>
          <element name="channelType" type="cdl:tChannelType"
                  minOccurs="0" maxOccurs="unbounded"/>
          <element name="choreography" type="cdl:tChoreography" 
                  minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="author" type="string" use="optional"/>
        <attribute name="version" type="string" use="optional"/>
        <attribute name="targetNamespace" type="anyURI" 
                 use="required"/>
      </extension>
    </complexContent>
  </complexType>
    
  <complexType name="tInformationType">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="type" type="QName" use="optional"/>
        <attribute name="element" type="QName" use="optional"/>
        <attribute name="exceptionType" type="boolean" use="optional"    
                   default="false" />
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tToken">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="informationType" type="QName"
                 use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tTokenLocator">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="tokenName" type="QName" use="required"/>
        <attribute name="informationType" type="QName"
                 use="required"/>
        <attribute name="part" type="NCName" use="optional" />
        <attribute name="query" type="cdl:tXPath-expr" 
                 use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tRoleType">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="behavior" type="cdl:tBehavior"
                  maxOccurs="unbounded"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tBehavior">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="interface" type="QName" use="optional"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tRelationshipType">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="role" type="cdl:tRoleRef" minOccurs="2"
                  maxOccurs="2"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tRoleRef">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="type" type="QName" use="required"/>
        <attribute name="behavior" use="optional">
          <simpleType>
             <list itemType="NCName"/>
          </simpleType>
        </attribute>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tParticipantType">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="role" type="cdl:tRoleRef2" 
                  maxOccurs="unbounded"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tRoleRef2">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="type" type="QName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tChannelType">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="passing" type="cdl:tPassing" minOccurs="0"
                  maxOccurs="unbounded"/>
          <element name="role" type="cdl:tRoleRef3"/>
          <element name="reference" type="cdl:tReference"/>
          <element name="identity" type="cdl:tIdentity" minOccurs="0" 
                  maxOccurs="1"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="usage" type="cdl:tUsage" use="optional" 
                     default="unlimited"/>
        <attribute name="action" type="cdl:tAction" use="optional"
                     default="request"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tRoleRef3">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="type" type="QName" use="required"/>
        <attribute name="behavior" type="NCName" use="optional"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tPassing">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="channel" type="QName" use="required"/>
        <attribute name="action" type="cdl:tAction" use="optional" 
                 default="request"/>
        <attribute name="new" type="boolean" use="optional"
                 default="false"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tReference">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="token" type="cdl:tTokenReference"
                      minOccurs="1" maxOccurs="1"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tTokenReference">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="name" type="QName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tIdentity">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="token" type="cdl:tTokenReference" 
                  minOccurs="1" maxOccurs="unbounded"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tChoreography">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="relationship" type="cdl:tRelationshipRef" 
                  maxOccurs="unbounded"/>
          <element name="variableDefinitions"
                  type="cdl:tVariableDefinitions" minOccurs="0"/>
          <element name="choreography" type="cdl:tChoreography"
                   minOccurs="0" maxOccurs="unbounded"/>
          <group ref="cdl:activity"/>
          <element name="exceptionBlock" type="cdl:tException"
                  minOccurs="0"/>
          <element name="finalizerBlock" type="cdl:tFinalizer"
                      minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="complete" type="cdl:tBoolean-expr" 
                     use="optional"/>
        <attribute name="isolation" type="boolean" 
                     use="optional" default="false"/>
        <attribute name="root" type="boolean" use="optional" 
                     default="false"/>
        <attribute name="coordination" type="boolean" use="optional" 
                     default="false"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tRelationshipRef">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="type" type="QName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tVariableDefinitions">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="variable" type="cdl:tVariable"
                  maxOccurs="unbounded"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tVariable">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="informationType" type="QName" 
                 use="optional"/>
        <attribute name="channelType" type="QName" use="optional"/>
        <attribute name="mutable" type="boolean" use="optional"
                 default="true"/>
        <attribute name="free" type="boolean" use="optional" 
                 default="false"/>
        <attribute name="silent" type="boolean" use="optional"
                 default="false"/>
        <attribute name="roleTypes" use="optional">
           <simpleType>
              <list itemType="QName"/>
           </simpleType>
        </attribute>
      </extension>
    </complexContent>
  </complexType>
  <group name="activity">
    <choice>
      <element name="sequence" type="cdl:tSequence"/>
      <element name="parallel" type="cdl:tParallel"/>
      <element name="choice" type="cdl:tChoice"/>
      <element name="workunit" type="cdl:tWorkunit"/>
      <element name="interaction" type="cdl:tInteraction"/>
      <element name="perform" type="cdl:tPerform"/>
      <element name="assign" type="cdl:tAssign"/>
      <element name="silentAction" type="cdl:tSilentAction"/>
      <element name="noAction" type="cdl:tNoAction"/>
      <element name="finalize" type="cdl:tFinalize"/>
    </choice>
  </group>
  <complexType name="tSequence">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <group ref="cdl:activity" maxOccurs="unbounded"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tParallel">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <group ref="cdl:activity" maxOccurs="unbounded"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tChoice">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <group ref="cdl:activity" maxOccurs="unbounded"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tWorkunit">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <group ref="cdl:activity"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="guard" type="cdl:tBoolean-expr" 
                 use="optional"/>
        <attribute name="repeat" type="cdl:tBoolean-expr" 
                 use="optional"/>
        <attribute name="block" type="boolean" 
                 use="optional" default="false"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tPerform">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="bind" type="cdl:tBind" 
                  minOccurs="0" maxOccurs="unbounded"/>
          <element name="choreography" type="cdl:tChoreography"
                   minOccurs="0" maxOccurs="1"/>
        </sequence>
        <attribute name="choreographyName" type="QName" use="required"/>
        <attribute name="choreographyInstanceId" type="cdl:tXPath-expr" use="optional"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tBind">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="this" type="cdl:tBindVariable"/>
          <element name="free" type="cdl:tBindVariable"/>
        </sequence>
         <attribute name="name" type="NCName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tBindVariable">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="variable" type="cdl:tXPath-expr" 
                 use="required"/>
        <attribute name="role" type="QName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tInteraction">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="participate" type="cdl:tParticipate"/>
          <element name="exchange" type="cdl:tExchange" minOccurs="0"
                  maxOccurs="unbounded"/>
          <element name="timeout" type="cdl:tTimeout" minOccurs="0"
                  maxOccurs="1"/>
          <element name="record" type="cdl:tRecord" minOccurs="0" 
                  maxOccurs="unbounded"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="channelVariable" type="QName" 
                 use="required"/>
        <attribute name="operation" type="NCName" use="required"/>
        <attribute name="align" type="boolean" use="optional" 
                 default="false"/>
        <attribute name="initiate" type="boolean" 
                 use="optional" default="false"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tTimeout">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="time-to-complete" type="cdl:tXPath-expr" use="required"/>
        <attribute name="fromRoleRecordReference" use="optional">
          <simpleType>
             <list itemType="NCName"/>
          </simpleType>
        </attribute>
        <attribute name="toRoleRecordReference" use="optional">
          <simpleType>
             <list itemType="NCName"/>
          </simpleType>
        </attribute>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tParticipate">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="relationshipType" type="QName" use="required"/>
        <attribute name="fromRole" type="QName" use="required"/>
        <attribute name="toRole" type="QName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tExchange">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="send" type="cdl:tVariableRecordRef"/>
          <element name="receive" type="cdl:tVariableRecordRef"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="informationType" type="QName" 
                 use="optional"/>
        <attribute name="channelType" type="QName" 
                 use="optional"/>
        <attribute name="action" type="cdl:tAction2" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tVariableRecordRef">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="variable" type="cdl:tXPath-expr" 
                use="optional"/>
        <attribute name="recordReference" use="optional">
          <simpleType>
             <list itemType="NCName"/>
          </simpleType>
        </attribute>
        <attribute name="causeException" type="boolean" 
                use="optional" default="false"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tRecord">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="source" type="cdl:tSourceVariableRef"/>
          <element name="target" type="cdl:tVariableRef"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="causeException" type="boolean" use="optional" default="false"/>
        <attribute name="when" type="cdl:tWhenType" use="required"/>
      </extension>
    </complexContent>
  </complexType>
   <complexType name="tSourceVariableRef">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="variable" type="cdl:tXPath-expr" 
                use="optional"/>
        <attribute name="expression" type="cdl:tXPath-expr" 
                use="optional"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tVariableRef">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="variable" type="cdl:tXPath-expr" 
                use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tAssign">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
      <element name="copy" type="cdl:tCopy"
               maxOccurs="unbounded"/>
        </sequence>
        <attribute name="roleType" type="QName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tCopy">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="source" type="cdl:tSourceVariableRef"/>
          <element name="target" type="cdl:tVariableRef"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="causeException" type="boolean" 
                use="optional" default="false"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tSilentAction">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="roleType" type="QName" use="optional"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tNoAction">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="roleType" type="QName" use="optional"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tFinalize">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="finalizerReference" type="cdl:tFinalizerReference"
                                maxOccurs="unbounded"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tFinalizerReference">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="choreographyName" type="NCName" use="required"/>
        <attribute name="choreographyInstanceId" type="cdl:tXPath-expr"
                                                      use="optional"/>
        <attribute name="finalizerName" type="NCName" use="optional"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tException">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="workunit" type="cdl:tWorkunit"
                  maxOccurs="unbounded"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tFinalizer">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="workunit" type="cdl:tWorkunit"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <simpleType name="tAction">
    <restriction base="string">
      <enumeration value="request-respond"/>
      <enumeration value="request"/>
      <enumeration value="respond"/>
    </restriction>
  </simpleType>
  <simpleType name="tAction2">
    <restriction base="string">
      <enumeration value="request"/>
      <enumeration value="respond"/>
    </restriction>
  </simpleType>
  <simpleType name="tUsage">
    <restriction base="string">
      <enumeration value="once"/>
      <enumeration value="unlimited"/>
    </restriction>
  </simpleType>
  <simpleType name="tWhenType">
    <restriction base="string">
      <enumeration value="before"/>
      <enumeration value="after"/>
      <enumeration value="timeout"/>
    </restriction>
  </simpleType>
  <simpleType name="tBoolean-expr">
    <restriction base="string"/>
  </simpleType>
  <simpleType name="tXPath-expr">
    <restriction base="string"/>
  </simpleType>
  <simpleType name="tDescriptionType">
    <restriction base="string">
      <enumeration value="documentation"/>
      <enumeration value="reference"/>
      <enumeration value="semantics"/>
    </restriction>
  </simpleType>
</schema>