W3C

Web Services Choreography Description Language Version 1.0

Editor's Draft 3 April 2004

This version:
TBD
Latest version:
TBD
Previous version:
Not Applicable
Editor:
Nickolaos Kavantzas, Oracle <nickolas.kavantzas@oracle.com>

Abstract

The Web Services Choreography Description Language (WS-CDL) is an XML-based language that describes peer-to-peer collaborations of Web Services participants 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 Web Service participant regardless of the supporting platform or programming model used by the implementation of the hosting environment.

Status of this Document

This specification is an editors draft and will be updated' extended or replaced by other documents' if necessary. It is for review and evaluation only. The authors of this specification provide this document as is and provide no warranty about the use of this document in any case. The authors welcome feedback and contributions to be considered for updates to this document in the near future.

Table of Contents

1 Introduction
    1.1 Notational Conventions
    1.2 Purpose of the Choreography Language
    1.3 Goals
    1.4 Relationship with XML and WSDL
    1.5 Relationship with Business Process Languages
2 Choreography Model
    2.1 Model Overview
    2.2 Choreography Document Structure
        2.2.1 Package
        2.2.2 Choreography document Naming and Linking
        2.2.3 Language Extensibility and Binding
        2.2.4 Semantics
    2.3 Coupling Web Service participants
        2.3.1 Roles
        2.3.2 Participants
        2.3.3 Relationships
        2.3.4 Channels
    2.4 Information Driven Collaborations
        2.4.1 Information Types
        2.4.2 Variables
            2.4.2.1 Expressions
        2.4.3 Tokens
        2.4.4 Choreographies
        2.4.5 WorkUnits
            2.4.5.1 Reacting
        2.4.6 Reusing existing Choreographies
            2.4.6.1 Composing Choreographies
            2.4.6.2 Importing Choreographies
        2.4.7 Choreography Life-line
        2.4.8 Choreography Recovery
            2.4.8.1 Exception Block
            2.4.8.2 Finalizer Block
    2.5 Activities
        2.5.1 Ordering Structures
            2.5.1.1 Sequence
            2.5.1.2 Parallel
            2.5.1.3 Choice
        2.5.2 Interaction
            2.5.2.1 Interaction State Changes
            2.5.2.2 Interaction Based Information Alignment
            2.5.2.3 Protocol Based Information Exchanges
            2.5.2.4 Interaction Life-line
        2.5.3 Performed Choreography
        2.5.4 Assigning Variables
        2.5.5 Actions with non-observable effects
3 Example
4 Relationship with the Security framework
5 Relationship with the Reliable Messaging framework
6 Relationship with the Transaction/Coordination framework
7 Acknowledgments
8 References
9 WS-CDL XSD Schemas
10 WS-CDL Supplied Functions


1 Introduction

For many years' organizations have being developing solutions for automating 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-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 interaction with the 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-peer collaborations between any type of Web Service participant 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].

The following namespace prefixes are used throughout this document:

Prefix Namespace URI Definition
wsdl http://schemas.xmlsoap.org/wsdl/ WSDL namespace for WSDL framework.
cdl http://www.w3.org/ws/choreography/2004/02/WSCDL WSCDL namespace for Choreography language.
xsi http://www.w3.org/2000/10/XMLSchema-instance Instance namespace as defined by XSD [10].
xsd http://www.w3.org/2000/10/XMLSchema Schema namespace as defined by XSD [10].
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://sample.com" represent some application-dependent or context-dependent URI [4].

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

XSD schemas are provided as a formal definition of WS-CDL grammar (see Appendix A).

1.2 Purpose of the Choreography Language

Business or other activities that involve multiple different organizations or independent processes that collaborate using the Web Services technology can be successful if they are properly integrated.

To solve this problem' a "global" definition of the common ordering conditions and constraints under which messages are exchanged is produced that describes from a global viewpoint the common and complementary observable behavior of all the Web Services participants involved. Each participant can then use the global definition to build and test solutions that conform to it.

The main advantage of a global definition approach is that it separates the process being followed by an individual business or system within a "domain of control" from the definition of the sequence in which each business or system exchanges information with others. This means that' as long as the "observable" sequence does not change' the rules and logic followed within the domain of control can change at will.

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 their common view.

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

./images/figure1.gif

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 interactions and their common ordering and constraint rules under which the interactions occur and then generate a Choreography Language based representation.

In the case of Company A' relies on a BPEL4WS [18] solution. Company B' having greater legacy driven integration needs' relies on a J2EE [25] solution incorporating Java and Enterprise Java Bean Components or a .NET [26] solution incorporating C#.

In this example' Choreography specifies the interoperability and interactions between services across business entities' while leaving actual implementation decisions in the hands of each individual company. Similarly' a Choreography can specify the interoperability and interactions between services within one business entity.

1.3 Goals

The primary goal of a Choreography Language for Web Services is to specify a declarative' XML based language that defines from a global viewpoint their common and complementary observable behavior' where message exchanges occur' when the jointly agreed ordering rules are satisfied.

Some additional goals of this definition language are to permit:

2 Choreography Model

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

2.1 Model Overview

WS-CDL describes interoperable' peer-to-peer collaborations between Web Service participants. In order to facilitate these collaborations' services commit on mutual responsibilities by establishing Relationships. Their collaboration takes place in a jointly agreed set of ordering and constraint rules' whereby messages are exchanged between the participants.

The Choreography model consists of the following notations:

2.2 Choreography Document Structure

A WS-CDL document is simply a set of definitions. The WS-CDL definitions are named constructs that can be referenced. There is a package element at the root' and individual Choreography definitions inside.

2.3 Coupling Web Service participants

The WSDL specification describes the functionality of a service provided by a participant based on a stateless' connected' client-server model. The emerging Web Based applications require the ability to exchange messages in a peer-to-peer environment. In these type of environment a participant represents a requester of services provided by another participant and is at the same time a provider of services requested from other participants' thus creating mutual multi-participant service dependencies.

A WS-CDL document describes how a Web Service participant is capable of engaging in peer-to-peer collaborations with the same participant or with different participants.

Within a Choreography' information is always exchanged between Participants.

The Roles' Relationship and Channels define the coupling of the collaborating Web Services participants.

2.3.4 Channels

A Channel realizes a point of collaboration between participants by specifying where and how to exchange information. Additionally' Channel information can be passed among participants. This allows modeling how the destination of messages is determined' statically and dynamically' 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 MUST describe the Role and the type of a Web Service reference of a participant' being the target of an Interaction' which is then used for determining where and how to send/receive information to/into the participant.

A Channel MAY specify the instance identity of a business process implementing the behavior of a participant' being the target of an Interaction.

A Channel MAY describe one or more logical conversations between participants' where each conversation groups a set of related message exchanges.

One or more Channel(s) MAY be passed around from one Role to another. A Channel MAY restrict the types of Channel(s) allowed to be exchanged between the Web Services participants' through this Channel. Additionally' a Channel MAY restrict its usage by specifying the number of times a Channel can be used.

The syntax of the channelType construct is:;

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

The optional element passing restricts the Channel(s) allowed to be exchanged from one Role to another Role' when using this Channel in an Interaction. In the case where the operation used to exchange the Channel is of request-response type' then the attribute action within the passing element defines if the Channel will be exchanged during the request or during the response. The Channels exchanged can be used in subsequent Interaction activities. If the element passing is missing then this Channel can be used for exchanging business documents and all types of Channels without any restrictions.

The element role is used to identify the Role of a participant' being the target of an Interaction' which is then used for statically determining where and how to send/receive information to/into the participant.

The element reference is used for identifying the WSDL service reference of a participant' being the target of an Interaction' which is then used for dynamically determining where and how to send/receive information to/into the participant. The service reference of a participant is distinguished by a set of Token types as specified by the token element within the reference element.

The optional element identity MAY be used for identifying an instance of a business process implementing the behavior of a participant and for identifying a logical conversation between participants. The business process identity and the different conversations are distinguished by a set of Token types as specified by the token element within the identity element.

The example below shows the declaration of the Channel type RetailerChannel. The Channel identifies the Role type tns:Retailer. The address of the Channel is specified in reference element' whereas the business process instance can be identified using identity element. The passing element allows ConsumerChannel to be sent over the RetailerChannel.;

2.4 Information Driven Collaborations

A WS-CDL document allows defining information within a Choreography that can influence the observable behavior of the collaborating participants.

Variables contain information about objects in the Choreography such as the messages exchanged or the state of the Roles involved. Tokens are aliases that can be used to reference parts of a Variable. Both Variables and Tokens have Information Types that define the data structure of what the Variable or Token contains.

2.4.2 Variables

Variables capture information about objects in a Choreography as defined by the Variable Usage:

The value of Variables:

The variableDefinitions construct is used for declaring one or more variables within a Choreography block.

The syntax of the variableDefinitions construct is:;

The declared variables can be of the following types:

The optional attribute mutable' when set to "false" describes that the variable information when initialized' cannot change anymore.

The optional attribute free' when set to "true" describes that a variable declared in an enclosing Choreography is also used in this Choreography' thus sharing the variable information. When the attribute free is set to "true"' the variable type MUST match the type of the variable declared in the enclosing Choreography.

The optional attribute free' when set to "false" describes that a variable is declared in this Choreography. When the attribute free is set to "false"' the variable resolves to the closest enclosing Choreography' regardless of the type of the variable.

The optional attribute silent-action' when set to "true" describes that activities used for making this variable available MUST NOT be present in the Choreography.

The optional attribute role is used to specify the location at which the variable information will reside.

The following rules apply to Variable Declarations:

2.4.3 Tokens

A Token is an alias for a piece of data in a variable or message that needs to be used by a Choreography. Tokens differ from Variables in that Variables contain values whereas Tokens contain information that defines the piece of the data that is relevant. For example a Token for "Order Amount" within an Order business could be an alias for an expression that pointed to the Order Amount element within an XML document. This could then be used as part of a condition that controls the ordering of a Choreography' for example "Order Amount > $1000".

All Tokens MUST have a type' for example' an Order Amount would be of type amount' Order Id could be alphanumeric and counter an integer.

Tokens types reference a document fragment within a Choreography definition and Token Locators provide a query mechanism to select them. By introducing these abstractions' a Choreography definition avoids depending on specific message parts' as described by WSDL' or a specific query string' as specified by XPATH' but instead the parts or the query string can change without affecting the Choreography definition.

The syntax of the token construct is:;

The attribute informationType identifies the type of the document fragment.

The syntax of the tokenLocator construct is:;

The attribute tokenName identifies the name of the token type that the document fragment locator is associated with.

The attribute informationType identifies the type on which the query is performed to locate the token.

The attribute query defines the query string that is used to select a document fragment within a document.

The example below shows that the token purchaseOrderID is of type xsd:int. The two tokenLocators show how to access this token in "purchaseOrder" and "purchaseOrderAck" messages.;

2.4.4 Choreographies

A WS-CDL document explicitly prescribes the rules' agreed between Web Service participants' that govern the ordering of exhanged messages and the provisioning of alternative patterns of behavior. The operational semantics of these rules are based on the information-driven computational model' where availability of variable information causes a guarded unit-of-work and its enclosed actions to be enabled.

A Choreography allows constructing global compositions of Web Service participants by explicitly asserting their common and complementary observable behaviors.

A Choreography declared at the package level is called a top-level Choreography' and does not share its context with other top-level Choreographies. A Choreography performed within another Choreography is called an enclosed Choreography. A Package MUST contain exactly one top-level Choreography' that is explicitly marked as the root Choreography. The root Choreography is the only top-level Choreography that MAY be initiated. The root Choreography is enabled when it is initiated. All non-root' top-level Choreographies MAY be enabled when performed.

A Choreography facilitates recursive composition' where combining two or more Choreographies can form a new enclosing Choreography that may be re-used in different contexts.

A Choreography MUST contain at least one Relationship type' enumerating the observable behavior this Choreography requires its participants to exhibit. One or more Relationships MAY be defined within a Choreography' modeling multi-participant collaborations.

A Choreography acts as a name scoping context as it restricts the visibility of variable information. A variable defined in a Choreography is visible in this Choreography and all its enclosed Choreographies' forming a Choreography Visibility Horizon.

A Choreography MUST contains one Activity-Notation. The Activity-Notation specifies the enclosed actions of the Choreography that perform the actual work.

A Choreography can recover from exceptional conditions and provide finalization actions by defining:

The Choreography-Notation is used to define a root or a top-level Choreography.

The syntax is:;

The optional complete attribute allows to explicitly complete a Choreography as described below in the Choreography Life-line section.

The optional isolation attribute specifies when a variable information that is declared in an enclosing and changed within an enclosed Choreography is visible to its enclosing and sibling Choreographies:

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

The optional variableDefinitions element declares the variables that are visible in this Choreography and all its enclosed Choreographies and activities.

The optional root element marks a top-level Choreography as the root Choreography of a package.

The optional Choreography-Notation within the choreography element declares the Choreographies that MAY be performed only within this Choreography.

The optional exception element defines the Exception block of a Choreography by specifying one or more Exception Work Unit(s).

The optional finalizer element defines the Finalizer block of a Choreography by specifying one Finalizer Work Unit.

2.4.5 WorkUnits

A Work Unit prescribes the constraints that must be fulfilled for making progress within a Choreography. Examples of a Work Unit include:

A Work Unit can prescribe the explicit rules for enforcing the constraints that preserve the consistency of the collaborations commonly performed between the Web Service participants. Using a Work Unit an application can recover from faults that are the result from abnormal actions and also finalize completed actions that need to be logically rolled back.

A Work Unit specifies the data dependencies that must be satisfied before enabling one or more enclosed actions. These dependencies express interest(s) on the availability of variable information that already exists or will be created in the future.

Work Units interest(s) are matched when the required' one or more variable information become available. Availability of some variable information does not mean that a Work Unit matches immediately. Only when all variable information required by a Work Unit become available' in the appropriate Visibility Horizon' does matching succeed. Variable information available within a Choreography MAY be matched with a Work Unit that will be enabled in the future. When the matching succeeds the Work Unit is enabled.

A Work Unit MUST contain an Activity-Notation' which is enabled when its enclosing Work Unit is enabled.

A Work Unit 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 "true".

The WorkUnit-Notation is defined as follows:;

The Activity-Notation specifies the enclosed actions of a Work Unit.

The optional guard attribute describes the reactive interest on the availability of one or more' existing or future variable information and its usage is explained in section 2.4.5.1.

The optional repeat attribute allows' when the condition it specifies evaluates to "true"' to make the current Work Unit considered again for matching (based on the guard condition attribute).

The block attribute specifies whether the matching condition relies on the variable that is currently available' or whether the Work Unit has to block for the variable to be available and its usage is explained in section 2.4.5.1.

The WS-CDL functions' as described in Appendix B' MAY be used within a guard' and a repeat condition.

2.4.5.1 Reacting

A Guard describes the Work Units interest for reacting on the availability of variable information and on a constraint condition' including these variable information' being satisfied.

The following rules apply when a Work Unit uses a Guard for reacting:

The examples below demonstrate the possible use of a Work Unit:

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

In the following Work Unit' the Guard waits on the availability of POAcknowledgement at customer Role and if it is already available' the activity happens' otherwise' the activity waits until the variable POAcknowledgement is initialized at the customer Role.;

b. Example of a Work Unit with block equals to "false":

In the following Work Unit' the Guard checks if StockQuantity at retailer Role is available and is greater than 10 and if so' the activity happens. If either the Variable is not available or the value is less than 10' the matching condition is "false" and the activity is skipped.;

2.4.6 Reusing existing Choreographies

Choreographies can be combined and built from other Choreographies.

2.4.6.1 Composing Choreographies

Choreography Composition is the creation of new Choreographies by reusing existing Choreography definitions. For example if two separate Choreographies were defined as follows:

You could then create a new "Quote and Order" Choreography by reusing the two where the RFQ Choreography was executed first' and then' depending on the outcome of the RFQ Choreography' the order was placed using the Order Placement Choreography.

In this case the new Choreography is "composed" out of the two previously defined Choreographies. These Choreographies may be specified either:

Using this approach' Choreographies can be recursively combined to support Choreographies of any required complexity allowing more flexibility as Choreographies defined elsewhere can be reused.

The example below shows a Choreography composition using an enclosed Choreography:

The root Choreography "PurchaseChoreo" has an enclosed Choreography "CustomerNotifyChoreo". The variable RetailerNotifyCustomer is visible to the enclosed Choreography.;

2.4.8 Choreography Recovery

One or more Exception WorkUnit(s) MAY be defined as part of an enclosing Choreography to recover from exceptional conditions that may occur in that Choreography.

A Finalizer WorkUnit MAY be defined as part of an enclosing Choreography to provide the finalization actions that semantically rollback the completed enclosing 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:

To handle these and other "errors" separate Work Units are defined in the Exception Block of a Choreography for each "exception" condition (as identified by its Guards) that needs to be handled. Only one Work Unit per exception SHOULD be performed.

When a Choreography encounters an exceptional condition it MAY need to act on it.

One or more Exception WorkUnit(s) MAY be defined as part of the Exception block of an enclosing Choreography for the purpose of handling the exceptional conditions occurring on that Choreography. To handle these an Exception Work Unit expresses interest on fault variable information that MAY become available.

A fault variable information is a result of:

Exception Work Units are enabled when the enclosing Choregraphy is enabled. An Exception Work Unit MAY be enabled only once for an enclosing Choreography. Exception Work Units enabled in an enclosing Choreography MAY behave as the default mechanism to recover from faults for all its enclosed Choreographies. Exception Work Units enabled in an enclosed Choreography MAY behave as a mechanism to recover from faults for any of its enclosing Choreographies.

If a fault occurs within the top-level Choreography' then the faulted Choreography completes unsuccessfully and its Finalizer WorkUnit is not enabled. The actions' including enclosed Choreographies' enabled within the faulted Choreography are completed abnormally before an Exception Work Unit can be matched.

Within a Choreography only one Exception Work Unit MAY be matched. When an Exception Work Unit matches' it enables its appropriate activities for recovering from the fault.

Matching a fault with an Exception Work Unit is done as follows:

The actions within the Exception Work Unit MAY use variable information visible in the Visibility Horizon of its enclosing Choreography as they stand at the current time.

The actions of an Exception Work Unit MAY also fault. The semantics for matching the fault and acting on it are the same as described in this section.

2.5 Activities

Activities are the lowest level components of the Choreography' used to perform the actual work.

An Activity-Notation is then either:

2.5.1 Ordering Structures

An Ordering Structure is one of the following:

2.5.2 Interaction

An Interaction is the basic building block of a Choreography' which results in the

exchange of messages between participants and possibly the synchronization of their states and the values of the exchanged information.

An Interaction forms the base atom of the recursive Choreography composition' where multiple Interactions are combined to form a Choreography' which can then be used in different business contexts.

An Interaction is initiated when a participant playing the requesting Role sends a service request' through a common Channel' to a participant playing the accepting Role. The Interaction is continued when the accepting participant' sends zero or one response back to the requesting participant. This means an Interaction can be one of two types:

An Interaction also contains "references" to:

2.5.2.2 Interaction Based Information Alignment

In some Choreographies there may be a requirement that' at the end of an Interaction' the Roles in the Choreography have agreement of the outcome.

With Interaction Alignment both the Buyer and the Seller have a common understanding that:

In WS-CDL an alignment Interaction MUST be explicitly used' in the cases where two interacting participants require the alignment of their States or their exchanged information between them. After the alignment Interaction completes' both participants progress at the same time' in a lock-step fashion and the variable information in both participants is aligned. Their variable alignment comes from the fact that the requesting participant has to know that the accepting participant has received the message and the other way around' the accepting participant has to know that the requesting participant has sent the message before both of them progress. There is no intermediate variable' where one participant sends a message and then it proceeds independently or the other participant receives a message and then it proceeds independently.

2.5.2.4 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 MAY be grouped to form a logical conversation. 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.

An Interaction completes normally when the request and the response (if there is one) complete successfully. In this case the business documents and Channels exchanged during the request and the response (if there is one) result in the exchanged variable information being aligned between the two participants.

An Interaction completes abnormally if the following faults occur:

In these cases the variable information remain the same at the both Roles as if this Interaction had never occurred.

The syntax of the interaction construct is:;

The channel attribute specifies the Channel variable containing information of a participant' being the target of an Interaction' which is used for determining where and how to send/receive information to/into the participant. The Channel variable is used in an Interaction MUST be available at the two Roles before the Interaction occurs.

At runtime' information about a Channel variable is expanded further. This requires that the messages in the Choreography also contain correlation information' for example by including:

In practice' when a Choreography is performed' several different ways of doing correlation may be employed which vary depending on the Channel Type.

The attribute operation specifies a one-way or a request-response WSDL 2.0 operation that is the target for the service request/acceptance. The specified operation belongs to the WSDL interface' identified by the role element of the Channel used in the Interaction activity.

The optional time-to-complete attribute identifies the timeframe within which an Interaction MUST complete.

The optional align when set to "true" means that the Interaction results in the common understanding of the messages exchanged and the resulting complementary state changes/state creation at both endpoints specified in fromRole and toRole.

An Interaction activity can be marked as a Choreography initiator when the optional initiateChoreography attribute is set to "true".

Within the participate element' the relationship attribute specifies the Relationship this Choreography participates in and the fromRole and toRole attributes specify the requesting and the accepting Roles respectively.

The exchange element allows one or two messages to be exchanged during a one-way request or a request/response Interaction. When the exchange is missing' it means that there was no message exchange that populated new variable information at a Role.

The messageContentType attribute of the exchange element identifies the informationType or the channelType of the information that is exchanged between the Roles and the Information Exchange Variables used as follows:

The attribute action specifies the direction of Message Exchange that is performed in the Interaction. A Request message exchange happens fromRole to toRole and a respond message exchange happens from toRole to fromRole.

The attributes use and populate describe the message at the source and the destination respectively:

The element record is used to create/change one or more states at both the Roles at the ends of the Interaction. For example' the PurchaseOrder message contains the Channel of the Role "customer" when sent to the Role "Retailer". This can be copied into the appropriate state variable of the "Retailer" within the record element. When align is set to "true" for the Interaction' it also means that the Customer knows that the Retailer now has the address of the Customer.

Another usecase of the record element is that it can be used to record the states at each Role. The Customer sets the state "OrderSent" to "true" and the Retailer sets the state "OrderReceived" to "true" at the end of the request part of the Interaction. Similarly the Customer sets "OrderAcknowledged""true" at the end of the Interaction.

The source and the target elements within record element represent the variable names at the Role that is specified in the role attribute of the record element.

The example below shows a complete Choreography that involves one interaction. The interaction happens from Role Consumer to Role Retailer on the Channel "retailer-channel" as a request/response message exchange.

<package name="ConsumerRetailerChoreo" 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"/>
  <role name="Consumer">
    <behavior name="consumerForRetailer" interface="cns:ConsumerRetailerPT"/>
    <behavior name="consumerForWarehouse" interface="cns:ConsumerWarehousePT"/>
  </role>
  <role name="Retailer">
    <behavior name="retailerForConsumer" interface="rns:RetailerConsumerPT"/>
  </role>
  <relationship name="ConsumerRetailerRelationship">
    <role type="tns:Consumer" behavior="consumerForRetailer"/>
    <role type="tns:Retailer" behavior="retailerForConsumer"/>
  </relationship>
  <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="ConsumerRetailerChoreo" root="true">
    <relationship type="tns:ConsumerRetailerRelationship"/>
    <variableDefinitions>
    <variable name="purchaseOrder" informationType="tns:purchaseOrderType" 
              silent-action="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" 
                 initiateChoreography="true">
      <participate relationship="tns:ConsumerRetailerRelationship" 
                   fromRole="tns:Consumer" toRole="tns:Retailer"/>
      <exchange messageContentType="tns:purchaseOrderType" action="request">
        <use variable="cdl:getVariable(tns:purchaseOrder' tns:Consumer)"/>
        <populate variable="cdl:getVariable(tns:purchaseOrder' tns:Retailer)"/>
      </exchange>
      <exchange messageContentType="purchaseOrderAckType" action="respond">
        <use variable="cdl:getVariable(tns:purchaseOrderAck' tns:Retailer)"/>
        <populate variable="cdl:getVariable(tns:purchaseOrderAck' tns:Consumer)"/>
      </exchange>
    <record role="tns:Retailer" action="request">
    <source variable="cdl:getVariable(tns:purchaseOrder' PO/CustomerRef' 
tns:Retailer)"/>
    <target variable="cdl:getVariable(tns:consumer-channel' tns:Retailer)"/>
  </record>
  </interaction>
  </choreography>
</package>

2.5.3 Performed Choreography

The Performed Choreography activity enables a Choreography to define that a separately defined Choreography is to be performed as an enclosed Choreography. The Choreography that is performed can be defined either within the same Choreography Definition or separately.

The syntax of the perform construct is:;

Within the perform element the choreographyName attribute references a top-level' non-root Choreography defined in the same or in a different Choreography package that is to be performed. The performed Choreography can be defined locally within the same Choreography or globally' in the same or different Choreography package. The performed Choreography defined in a different package is conceptually treated as an enclosed Choreography.

The alias element within the perform helps in aliasing the variables from the performing Choreography to the performed Choreography. The role attribute aliases the Roles from the performing Choreography to the performed Choreography.

The following rules apply on the performed Choreography:

The example below shows a Choreography performing another Choreography:

The root Choreography "PurchaseChoreo" performs the Choreography "RetailerWarehouseChoreo" and aliases the variable "purchaseOrderAtRetailer" defined in the enclosing Choreography to "purchaseOrder" defined at the performed enclosed Choreography "RetailerWarehouseChoreo". Once aliased' the visibility horizon of the variable purchaseOrderAtRetailer is the same as it would be for the enclosed Choreography.;

3 Example

To be completed

4 Relationship with the Security framework

Because messages can have consequences in the real world' the collaboration participants will impose security requirements on the message exchanges. Many of these requirements can be satisfied by the use of WS-Security [24].

5 Relationship with the Reliable Messaging framework

The WS-Reliability specification [22] provides a reliable mechanism to exchange business documents among collaborating participants. The WS-Reliability specification prescribes the formats for all messages exchanged without placing any restrictions on the content of the encapsulated business documents. The WS-Reliability specification supports one-way and request/response 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 condition' reflected in the Choreography as an Interaction fault.

6 Relationship with the Transaction/Coordination framework

In WS-CDL' two Web Service participants make progress by interacting. In the cases where two interacting participants require the alignment of their States or their exchanged information between them' an alignment Interaction is modeled in a Choreography. After the alignment Interaction completes' both participants progress at the same time' in a lock-step fashion. The variable information alignment comes from the fact that the requesting participant has to know that the accepting participant has received the message and the other way around' the accepting participant has to know that the requesting participant has sent the message before both of them progress. There is no intermediate variable' where one participant sends a message and then it proceeds independently or the other participant 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 agreement of the outcome among participants can be reached even in the case of failures and loss of messages.

7 Acknowledgments

To be completed

8 References

[1] S. Bradner' "Key words for use in RFCs 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/interaction/forms.html#submit-format

[4] http://www.w3.org/TR/html401/appendix/notes.html#ampersands-in-uris

[5] http://www.w3.org/TR/html401/interaction/forms.html#h-17.13.4

[6] Simple Object Access Protocol (SOAP) 1.1 "http://www.w3.org/TR/2000/NOTE-SOAP-20000508/"

[7] Web Services Definition Language (WSDL) 2.0

[8] Industry Initiative "Universal Description' Discovery and Integration"

[9] W3C Recommendation "The XML Specification"

[10] XML-Namespaces " Namespaces 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". This is work in progress.

[12] W3C Working Draft "XML Schema Part 2: Datatypes". This 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 Services for Business Process Design

[17] WSFL: Web Service Flow Language 1.0

[18] BPEL: Business Process Execution Language 1.1

[19] BPML: Business Process Modeling Language 1.0

[20] XPDL: XML Processing Description Language 1.0

[21] WS-CAF: Web Services Context' Coordination and Transaction Framework 1.0

[22] Web Services Reliability 1.0

[23] The Java Language Specification

[24] Web Services Security

[25] J2EE: Java 2 Platform' Enterprise Edition' Sun Microsystems

[26] ECMA. 2001. Standard ECMA-334: C# Language Specification

9 WS-CDL XSD Schemas

<?xml version="1.0" encoding="UTF-8"?>
<schema 
     targetNamespace=http://www.w3.org/ws/choreography/2004/02/WSCDL/
     xmlns=http://www.w3.org/2001/XMLSchema
     xmlns:cdl=http://www.w3.org/ws/choreography/2004/02/WSCDL/
     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 added. 
        This type also contains the optional description element that 
        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>
        </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="importDefinitions" 
                  type="cdl:tImportDefinitions" minOccurs="0" 
                  maxOccurs="unbounded"/>
          <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="role" type="cdl:tRole" minOccurs="0"
                  maxOccurs="unbounded"/>
          <element name="relationship" type="cdl:tRelationship" 
                  minOccurs="0" maxOccurs="unbounded"/>
          <element name="participant" 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="tImportDefinitions">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="import" type="cdl:tImport" 
                  maxOccurs="unbounded"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tImport">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <attribute name="namespace" type="anyURI" use="required"/>
        <attribute name="location" 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="tRole">
    <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="tRelationship">
    <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" type="NCName" use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tParticipant">
    <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="unbounded"/>
        </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"
                      maxOccurs="unbounded"/>
        </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" 
                  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="silent-action" 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="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="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tPerform">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="alias" type="cdl:tAlias" 
                  maxOccurs="unbounded"/>
        </sequence>
        <attribute name="choreographyName" type="QName"
                 use="required"/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tAlias">
    <complexContent>
      <extension base="cdl:tExtensibleElements">
        <sequence>
          <element name="this" type="cdl:tAliasVariable"/>
          <element name="free" type="cdl:tAliasVariable"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="tAliasVariable">
    <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="initiateChoreography" 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="use" type="cdl:tVariableRef"/>
          <element name="populate" type="cdl:tVariableRef"/>
        </sequence>
        <attribute name="messageContentType" type="QName" 
                 use="required"/>
        <attribute name="action" type="cdl:tAction2" use="required"/>
      </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="required"/>
        <attribute name="role" type="QName" use="required"/>
        <attribute name="action" type="cdl:tAction2" 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="tNoaction">
    <complexContent>
      <extension base="cdl:tExtensibleElements"/>
    </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>

10 WS-CDL Supplied Functions

There are several functions that the WS-CDL specification supplies as XPATH extension functions. These functions can be used in any XPath expression as long as the types are compatible.

xsd:dateTime getCurrentTime()

xsd:dateTime getCurrentDate()

xsd:dateTime getCurrentDateTime()

Returns the current date/time.

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:string roleName)

Returns the information of the variable with name stateName at a Role as a node set containing a single node. The second parameter is optional. When the second parameter is not used' this function retrieves from the variable information the entire document. When the second parameter is used' this function retrieves from the variable information' the fragment of the document at the provided absolute location path.

xsd:boolean isAligned(xsd:string varName' xsd:string withVarName' xsd:string relationshipName)

Returns "true" if the variable with name varName has aligned its information (states or values) with the variable named withVarName' within a Relationship as specified by the relationshipName.