Copyright © 2004 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use andsoftwarerules apply.licensing
The Web Services Choreography Description Language (WS-CDL) is an XML-based language that describes peer-to-peer collaborations of WebServicesparties by defining, from a global viewpoint, their common and complementary observable behavior; where ordered message exchanges result in accomplishing a common business goal.participants
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 interoperableWebServiceparty regardless of the supporting platform or programming model used by the implementation of the hosting environment.participant
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 Firstsecond published Working Draft of the Web Services Choreography Description Language document. It should be the last version before Last Call WD.Public
It has been produced by the Web Services Choreography Working Group, which is part of the Web Services Activity.
AlthoughtheWorkingGroupagreedtorequestpublicationofthisdocument,thisdocumentdoesnotrepresentconsensuswithintheWorkingGroupaboutWebServiceschoreographydescriptionThis document is a chartered deliverable of the Web Services Choreography Working Group. language.ItisanearlystagedocumentandmajorSome issues are changesalready identified and in the expectednearprocess of being fixed before going to Last Call, see the group's issue section.future.
This document is based upon the Working Draft published on 27 April 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.
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 CouplingWebServiceCollaborating Partiesparticipants
2.3.1 Role TypesRoles
2.3.2 Participant TypesParticipants
2.3.3 Relationship TypesRelationships
2.3.4 Channel TypesChannels
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 2.4.6 ReactingReusingexistingChoreographies 2.4.6.1ComposingChoreographies 2.4.6.2Including ChoreographiesImporting
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 InteractingInteraction
2.5.2.1 Interaction StateChanges 2.5.2.2Based Information AlignmentInteraction
2.5.2.2 Protocol Based Information Exchanges 2.5.2.3
2.5.2.3 Interaction Life-line 2.5.2.4
2.5.2.4 Interaction Syntax
2.5.3 PerformedComposing ChoreographiesChoreography
2.5.4 Assigning Variables
2.5.5 Marking Silent Actions
2.5.6 Marking the Absence of Actions
withnon-observable3 Exampleeffects
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
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-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 interactiona Web Service in a manner prescribed by its definition, using XML based messages conveyed by Internet protocols.the
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:
SOAP: defines the basic formatting of a message and the basic delivery options independent of programming language, operating system, or platform. A SOAP compliant Web Service knows how to send and receive SOAP-based messages
WSDL: describes the static interface of a Web Service. It defines the protocol and the message characteristics of end points. Data types are defined by XML Schema specification, which supports rich type definitions and allows expressing any kind of XML type requirement for the application data
UDDI: allows publishing the availability of a Web Service and its discovery from service requesters using sophisticated searching mechanims
Security layer: ensures that exchanged information are not modified or forged
Reliable Messaging layer: provides exactly-once and guaranteed delivery of information exchanged between partiesparticipants
Context, Coordination and Transaction layer: defines interoperable mechanisms for propagating context of long-lived business transactions and enables parties to meet correctness requirements by following a global agreement protocolparticipants
Business Process Languages layer: describes the execution logic of Web Services based applications by defining their control flows (such as conditional, sequential, parallel and exceptional execution) and prescribing the rules for consistently managing their non-observable data
Choreography layer: describes peer-to-peer collaborations of WebServicesparties by defining from a global viewpoint their common and complementary observable behavior, where information exchanges occur, when the jointly agreed ordering rules are satisfiedparticipants
The Web Services Choreography specification is targeted for composing interoperable, peer-to-peer collaborations between any type of WebServiceparty regardless of the supporting platform or programming model used by the implementation of the hosting environment.participant
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 |
| WSDL namespace for WSDL framework. |
| cdl |
| WSCDL namespace for Choreography language. |
| xsi |
|
Instance namespace as defined by XSD |
| xsd |
|
Schema namespace as defined by XSD |
| 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 |
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/> or <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; others examples are fragments and require additional information to be specified in order to conform.
XSD schemas are provided as a formal definition of WS-CDL grammar (see AppendixSection 9).A).
Business or other activities that involve multiple different organizations or independent processes thatcollaborateare engaged in a collaborative fashion to achieve a common business goal, such as Order Fulfillment.using
For the WebServicestechnologycollaboration to work successfully, the rules of engagement between all the interacting parties must be cansuccessfulifprovided. Whereas today these rules are theyproperlyintegrated.Tosolvethisfrequently written in English, a standardized way for precisely defining these interactions, leaving unambiguous documentation of the parties and responsibilities of each, is missing.problem,
The Web Services Choreography specification is targeted for precisely describing 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.
Using the Web Services Choreography specification, a contract containing 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 WebServicesparties involved. Each participantsparty can then use the global definition to build and test solutions that conform to it.participant
The main advantage of a contract with 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 the common view.their
The figure below demonstrates a possible usage of the Choreography Language.

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 BusinessthecaseofCompanyA,reliesthis example, a onBPEL4WS[18]solution.CompanyB,havinggreaterlegacydrivenintegrationneeds,reliesonaJ2EE[25]solutionincorporatingJavaandEnterpriseJavaBeanComponentsora.NET[26]solutionincorporatingC#.InthisChoreography specifies the interoperability and interactions between services across business entities, while leaving actual implementation decisions in the hands of each individual example,company:company.
Company "A" relies on a WS-BPEL [18] solution to implement its own part of the Choreography
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# to implement its own part of the Choreography
Similarly, a Choreography can specify the interoperability and interactions between services within one business entity.
The primary goal of a Choreography Language forWebis to specify a declarative, XML based language that defines from a global viewpoint Servicesthe common and complementary observable behavior, where message exchanges occur, and when the jointly agreed ordering rules are satisfied.their
Some additional goals of this definition language are to permit:
Reusability. The same Choreography definition is usable by different choreographyparties operating in different contexts (industry, locale, etc.) with different software (e.g. application software)participants
Cooperation. Choreographies define the sequence of exchanging messages between two (or more) independent Cooperativeparties or processes by describing how they should cooperateparticipants
Multi-Party Collaboration. Choreographies can be defined involving any number of parties or processesparticipants
Semantics. Choreographies can include human-readable documentation and semantics for all the components in the Choreographychoreography
Composability. Existing Choreographies can be combined to form new Choreographies that may be reused in different contexts
Modularity. Choreographies can be defined using an Modular."inclusion" facility that allows a "import"Choreography to be created from choreographyparts contained in several different Choreographiescomponents
Information Driven Collaboration. Choreographies describe how participantsthattakepartinChoreographiesmaintainwheretheyareintheChoreographybyrecordingparties make progress within a collaboration, when recordings of exchanged information and theirobservable thestatechangescausedbytheseexchangesinformation ofandalsotheirchanges cause ordering constraints to reactionsbe fulfilledthem
Information Alignment. Choreographies allow the parties that take part in Choreographies to communicate and synchronize their observable participantsinformation changes and the actual values of the exchanged information as wellstate
Exception Handling. Choreographies can define how exceptional or unusual conditions that occur while the whilstChoreography is performed are handledchoreography
Transactionality. The processes or parties that take part in a participantsChoreography can work in a "transactional" way with the ability to coordinate the outcome of the long-lived collaborations, which include multiple, often recursive collaboration units, each with its own business rules and goalschoreography
CompatibilitywithotherSpecification Composability. This specification will work alongside and complement other specifications such as the WS-Reliability [22], WS-Composite Application Framework (WS-CAF) [21], WS-Security [24], Business Process Execution Language for WS Specifications(WS-BPEL) [18], etc.(BPEL4WS)
This specification depends on the following specifications: XML 1.0 [9], XML-Namespaces [10], XML-Schema 1.0 [11, 12] and XPath 1.0 [13]. In addition, support for including and referencing service definitions given in WSDL 2.0 [7] is a normative part of this specification.importing
A Choreography Language is not an "executable business process description language" [16, 17, 18, 19, 20] or an implementation language [23]. The role of specifying the execution logic of an application will be covered by these specifications;byenablingthedefinitionofthecontrolflows(suchasconditional,sequential,parallelandexceptionalexecution)andtherulesforconsistentlymanagingtheirnon-observablebusinessspecifications. data.
A Choreography Language does not depend on a specific business process implementation language. Thus, it can be used to specify truly interoperable, peer-to-peer collaborations between any type of trullyWebServiceparty regardless of the supporting platform or programming model used by the implementation of the hosting environment. Each participantparty, adhering to a Choreography Language collaboration representation, could be implemented participantusing completely different bymechanisms such as:languages
WebServicesApplications, whose implementation is based on executable business process languages [16, 17, 18, 19, 20]applications,
WebServicesApplications, whose implementation is based on general purpose programming languages [23, 26]applications,
Or human controlled software agents
This section introduces the Web Services Choreography Description Language (WS-CDL) model.
WS-CDL describes interoperable, peer-to-peer collaborations between WebServiceparties. 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.parties.participants.
The Choreography model consists of the following notations:
Participants, Roles and Relationships - In a Choreography, information is always exchanged between ChoreographyParticipants within the same or across trust boundariesParticipants,
Types, Variables and Tokens - Variables contain information about commonly observable objects in a collaboration, such as the messages exchanged or the observable information of the Roles involved. Tokens are aliases that can be used to reference parts of a Variable. Both Variables and Tokens have Types that define the structure of what the Variable or Token containsstate
Choreographies - A Choreography allows defining collaborations between interacting peer-to-peerbusinesspeer-to-peer parties:processes:
Choreography Composition allows the creation of new Choreographies by reusing existing Choreography definitions
Choreography Life-line expresses the progression of a collaboration. Initially, the collaboration is started at a specific business process, then work is performed withinby following the Choreography and finally itthe Choreography completes, either normally or abnormallyit
Choreography Recovery consists of:
Choreography Exception Block - describes how to specify what additional interactions should occur when a Choreography behaves in an abnormal way
Choreography Finalizer Block - describes how to specify what additional interactions should occur to reverse the effect of an earlier successfully completed Choreographychoreography
Channels - A Channel realizes a point of collaboration between parties by specifying where and how participantstoinformation is exchangedexchange
WorkUnits - A Work Unit prescribes the constraints that must be fulfilled for making progress and thus performing actual work within a ChoreographyWorkUnit
Interactions-AnInteractionisthebasicbuildingblockofaChoreography,whichresultsinexchangeofmessagesbetweenparticipantsandpossiblesynchronizationoftheirstatesandtheactualvaluesoftheexchangedActivities and Ordering Structures - Activities are the lowest level components of the Choreography that perform the actual work. Ordering Structures combine activities with other Ordering Structures in a nested structure to express the ordering conditions in which the messages in the informationChoreography are exchangedchoreography
Interaction Activity - SemanticsSemanticsAn Interaction is the allowbasic building block of creationa Choreography, which results in an exchange of messages between parties and possible synchronization of their observable information changes and the actual values of the exchanged informationdescriptions
Semantics - Semantics allow the creation of descriptions that can record the semantic definitions of every single component in the modelalmost
A WS-CDL document is simply a set of definitions. TheWS-CDLdefinitionsEach definition is a named areconstruct that can be referenced. There is a package element at the root, and the individual Choreography type definitions inside.constructs
A WS-CDL packagecontainsasetofoneormoreChoreographiesChoreography Package aggregates a set of andoneormoreChoreography type definitions, collaborationprovides a namespace for the definitions and through the allowingvarioustypesuse whosemaybewiderthanaof XInclude [27], syntactically includes Choreography singletotype definitions that are defined beonce.in other Choreography Packages. The
The syntax of the package construct is:;
<package name="ncname" author="xsd:string"? version="xsd:string" targetNamespace="uri" xmlns="http://www.w3.org/2004/10/ws-chor/cdl/"> informationType* token* tokenLocator* roleType* relationshipType* participantType* channelType* Choreography-Notation* </package>
The Choreography Package contains:
Zero or more ImportdefinitionsZeroorInformation Typesmore
Zero or more TokenTokens and Token Locatorstypes
Zero or more Role Typestypes
Zero or more Relationship Typestypes
Zero or more Participant TypesParticipants
Zero or more Channel Typestypes
Zero or more,more Package-level Choreographiespackage-level
The top-level attributes name, author, and version define authoring properties of the syntaxpackageconstructis:;<packagename="ncname"author="xsd:string"?version="xsd:string"targetNamespace="uri"xmlns="http://www.w3.org/2004/04/ws-chor/cdl">importDefinitions*informationType*token*tokenLocator*role*relationship*participant*channelType*Choreography-Notation*</package>ThepackageconstructallowsaggregatingasetChoreography ofdefinitions,wheretheelementsinformationType,token,tokenLocator,role,relationship,participantandchannelTypearesharedbyalltheChoreographiesdefinedwithinthisdocument.package.
The targetNamespace attribute provides the namespace associated with all definitions contained in this Package. Choreography definitions package.included to this importedPackage using the inclusion mechanism, may be associated with other namespaces. package
The top-levelattributeselements informationType, token, tokenLocator, roleType, relationshipType, participantType and author,version,defineauthoringpropertieschannelType are shared by all the ofChoreographyChoreographies defined within this Package.document.
Within a WS-CDL Package, language constructs that need to be uniquely named MUST use the attribute name for specifying a distinct name.
WS-CDL documents MUST be assigned a name attribute of type NCNAME that serves as a lightweight form of documentation.
The targetNamespace attribute of type URI MUST be specified.
The URI MUST NOT be a relative URI.
A reference to a definition is made using a QName.
Each definition type has its own name scope.
Names within a name scope MUST be unique within a WS-CDL document.
The resolution of QNames in WS-CDL is similar to the resolution of QNames described by the XML Schemas specification [11].
IfdesiredtoTo support extending the WS-CDL language, this specification allows extendinsideaWS-CDLthe use of extensibility elements and/or attributes defined in other XML namespaces. Extensibility elements and/or attributes MUST use an XML namespace different from that of WS-CDL. All extension namespaces used in a WS-CDL document MUST be declared.document
Extensions MUST NOT change the semantics of any element or attribute from the WS-CDL namespace.
Within a WS-CDL document, descriptions will be required to allow the recording of semantics definitions. The optional description sub-element is used as a textual description for documentation purposes. This element is allowed inside any WS-CDL language element.
The information provided by the description element will allow for the recording of semantics in any or all of the following ways:
Text. This will be in plain text or possibly HTML and should be brief
Document Reference. This will contain a URI to a document that more fully describes the component. For example on the top level Choreography Definition that might reference a complete paperURL
Structured Attributes. This will contain machine processable definitions in languages such as RDF or OWL
Descriptions that are text or TextDocumentdocument references can be defined in multiple different human readable languages.References
The WSDL specification [7] describes the functionality of a service provided by a party based on a stateless, participantclient-server model. The emerging Web Based applications require the ability to exchange messages in a peer-to-peer environment. In these connected,types of typeenvironments a environmentparty represents a requester of services provided by another participantparty and is at the same time a provider of services requested from other participantparties, thus creating mutual participants,multi-party service dependencies.multi-participant
A WS-CDL document describes how a WebServiceparty is capable of engaging in peer-to-peer collaborations with the same participantparty or with different participantparticipants.WithinaChoreography,informationisalwaysexchangedbetweenParticipantsparties..
The Role Types, Participant Types, Relationship Types and RolesChannel Types define the coupling of the collaborating ChannelsWebServicesparties.participants.
A Role Type enumerates the observable behavior a party exhibits in order to collaborate with other participantparties. For example the Buyer Role Type is associated with purchasing of goods or services and the Supplier Role Type is associated with providing those goods or services for a fee.participants.
The syntax of the roleType construct is:;role
<rolename="ncname"<roleType name="ncname"> <behavior name="ncname" interface="qname"? />+></roleType></role>
The attribute name is used for specifying a distinct name for each roleType element declared within a Choreography Package.
Within the roleType element, the behavior element specifies a subset of the observable behavior a roleparty exhibits. A Role Type MUST contain one or more behavior elements.participant
The behavior element defines an optional interface attribute, which identifies a WSDL interface type. A behavior without an interface describes a Role Type that is not required to support a specific Web Service interface.
A Participant Type identifies a set of relatedRoles.ForexampleaCommercialOrganizationcouldtakebothaRole BuyerwhenpurchasinggoodsandaSellerRolewhensellingTypes that 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.them.
The syntax of the participantType construct is:;participant
<participantType name="ncname"> <role type="qname" />+<participant</participant>2.3.3Relationships</participantType>A
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 associationoftwoRolesParticipant Type "Broker" which also implements the "SellerForShipper" Role Type belonging to a for"Seller-Shipper" Relationship Type:purpose.
<participantType name="Broker"> <role type="tns:SellerForBuyer" /> <role type="tns:SellerForShipper" /> </participantType>
A Relationship Type identifies the representspossiblewaysinRole Type and Behaviors where mutual commitments between two whichRolescanparties MUST be made for them to collaborate successfully. For example the interact.Relationship Types between a Buyer and a Seller could include:Relationships
A "Purchasing" Relationship Type, for the initial procurement of goods or services, andRelationship,
A "Customer Management" Relationship Type to allow the Supplier to provide service and support after the goods have been purchased or the service provided
Although Relationship Types are always between two RelationshipsRole Types, Choreographies involving more than two Roles,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 and Customer Management RolesRelationship Types described above, the following RelationshipsRelationship Types might exist:Relationships
A "Logistics Provider" Relationship Type between the Supplier and the Shipper, and
A "Goods Delivery" Relationship Type between the Buyer and the Shipper
The syntax of the relationshipType construct is:;relationship
<relationshipType name="ncname"> <role type="qname"<relationshipbehavior="list of ncname"? /> <role type="qname"behavior="ncname"behavior="list of ncname"? />behavior="ncname"</relationshipType></relationship>
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 relationshiproleRole Types defined.types
Within the role element, the optional attribute behaviorpointsbehavior identifies the commitment of a party as a list of behavior types belonging to the Role Type specified by the type toattribute of the role withinelement. If the behavior attribute is missing then all the behaviors belonging to the Role Type specified by the type attribute of the role typeelement are identified as the commitment of a party.element.
A Channel realizes a point of collaboration between parties by specifying where and how participantstoexchangeinformation is exchanged. Additionally, Channel information can be passed among information.parties. This allows participants.modelingthe howmodeling of destinationmessagesisdetermined,both static and staticallydynamic 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.dynamically,
A Channel Type MUST describe the Role Type and the typeofaWebreference type of a Serviceparty, being the target of an Interaction, which is then used for determining where and how to send/receive information to/into the participant,party.participant.
A Channel Type MAY specify the instance identity of abusinessan entity implementing the processbehavior(s) of a behaviorparty, being the target of an Interaction.participant,
A Channel Type MAY describe one or more logical conversations between parties, where each conversation groups a set of related message exchanges. participants,
One or more Channel(s) MAY be passed around from one Role to another. A Channel Type MAY restrict the typesofChannel Type(s) allowed to be exchanged between the Channel(s)WebServicesparties, through a Channel of this participants,Channel Type. Additionally, a Channel Type MAY restrict Channel.itsusagebythe number of times a Channel specifyingcanof this Channel Type is used.be
The syntax of the channelType construct is:;
<channelType name="ncname"
usage="once"|"unlimited"?
action="request-respond"|"request"|"respond"? >
<passing channel="qname"
action="request-respond"|"request"|"respond"?
new="true"|"false"?new="xsd:boolean"? />*
<role type="qname" behavior="ncname"? />
<reference>
<token type="qname"/>+type="qname"/>
</reference>
<identity>
<token type="qname"/>+
</identity>*</identity>?
</channelType>
The attribute name is used for specifying a distinct name for each channelType element declared within a Choreography Package.
The optional attribute usage is used to restrict the number of times a Channel can be used.
The optional element passing describes the restrictsChannel(s)allowedtoChannel Type(s) that are exchanged from one Role Type to another beRole Type, when using 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 the attribute action within the passing element defines if the Channel will be exchanged during the request or during the response. The Channels exchanged Role,MAY be used in subsequent Interaction activities. If the element passing is missing then this Channel canType MAY be used for exchanging business documents and all cantypesofChannel Types without any restrictions.Channels
The element role is used to identify the Role Type of a party, being the target of an Interaction, which is then used for statically determining where and how to participant,send or receive information send/receiveto or into the to/intoparty.participant.
The element reference is used for describing the identifyingWSDLreference type of a serviceparty, being the target of an Interaction, which is then used for dynamically determining where and how to participant,send or receive information send/receiveto or into the to/intoparty. The service reference of a participant.party is distinguished by a participantsetToken ofas specified by the token element within the reference element.types
The optional element identity MAY be used for identifying an instance of abusinessan entity implementing the behavior of a processparty and for identifying a logical conversation between participantparties. The participants.process identity and the different conversations are distinguished by a set of businessTokenTokens as specified by the token element within the identity element.types
The following rule applies for Channel Type:
If two or more Channel Types SHOULD point to Role Types that MUST be implemented by the same entity or organization, then the specified Role Types MUST belong to the same Participant Type. In addition the identity elements within the Channel Types MUST have the same number of Tokens with the same informationTypes specified in the same order
The example below shows the definition of the Channel declarationType RetailerChannel. The Channel Type identifies the Role typetypeType as the "tns:Retailer". The address of the Channel is specified in the reference element, whereas the tns:Retailer.process instance can be identified using the identity businesselement for correlation purposes. The passing element allows only a Channel instance of the ConsumerChannel Type to be sent over the element.RetailerChannel Type.;RetailerChannel.;
<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>
Parties make progress within a collaboration, when recordings of exchanged information and observable information changes cause ordering constraints to be fulfilled. A WS-CDL document allows defining information within a Choreography that can influence the behavior of the collaborating observableparties.participants.
Variables capture information about objects in the containChoreography, such as the messages exchanged or the Choreographyobservables information of the Roles involved. stateToken are aliases that can be used to reference parts of a Variable. Both Variables and Tokens have Information Types that define the Tokensdatatype of structureinformation the Variable or Token whatcontain.contains.
Information types 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:;
<informationType name="ncname"; type="qname"? | element="qname"? />
The attribute name is used for specifying a distinct name for each informationType element declared within a Choreography Package.
The attributes type, and element describe the document to be an XML Schema type, or an XML Schema element respectively. The document is of one of these types exclusively.
Variables capture information about objects in a Choreography as defined by theVariabletheir usage:Usage
Information Exchange Capturing Variables , which contain information such as an Order that is used thattoto:
Populate the content of a message to be sent, or
Populated as a result of a message received
State VariablesCapturing Variables, which contain thatinformation about the observableobservable changes of a Role as a result of information being exchanged. For Stateexample:example when a Buyer sends an WhenOrder to a Seller, the Buyer could have a orderVariable called "OrderState" set to a value of "OrderSent" and once the message was received by the Seller, the Seller could have Stateana Variable called "OrderState" set to a value of "OrderReceived". Note that the StateVariable "OrderState" at the Buyer is a different variableVariable to the "OrderState" at the Sellervariable
Onceanorderisreceived,thenitmightbevalidatedandcheckedforacceptabilityinotherwaysthataffecthowtheChoreographyisperformed.Thiscouldrequireadditionalstatestobedefinedfor"OrderState",suchas:"OrderError",whichmeansanerrorwasdetectedthatstopsprocessingofthemessage,"OrderAccepted",whichmeansthattherewerenoproblemswiththeOrderanditcanbeprocessed,and"OrderRejected",whichmeans,althoughtherewerenoerrors,itcannotbeprocessed,e.g.becauseacreditcheckChannel Capturing Variables. For example, a Channel Variable could contain information such as the URL to which the message failedcould be sent, the policies that are to be applied, such as security, whether or not reliable messaging is to be used, etc.should
The value of Variables:
Is available to allRoles thebyinitializingthempriortothestartwithin a ofChoreographyChoreography, when the Variables Commoncontain information that is common thatknowledgetotwoormoreRoles,knowledge. For example the Variable "OrderResponseTime" which is the time in hours in which a response to an Order must be sent is initialized prior to the initiation of a Choreography and can be used by all Roles within the Choreographye.g.
Can be made available as a result of an Interaction
Information Exchange Capturing Variables are populated and become available at the Roles in the ends of an Interaction
State Capturing Variables, that contain information about the observable information changes of a Role bypopulatingas a result of themaninformation being exchanged, are recorded and become availableInteraction
Can be created or changed and made available locally at a Role by assigning data from other informationLocallyDefinedVariablesthatcontaininformationcreatedandchangedlocallybyainformation. They can be Information Exchange, State or Channel Role.VariablesaswellasvariablesofotherCapturing Variables. For example "Maximum Order Amount" could be data created by a types.Seller that is used together with an actual order amount from an Order received to control the ordering of the Choreography. In this case how seller"Maximum Order MaximumAmount" is calculated and its value would not be known by the other RolesAmount
Can be used to determine the decisions and actions to be taken within a Choreography
The variableDefinitions construct is used for defining one or more declaringVariables within a Choreography block.variables
The syntax of the variableDefinitions construct is:;
<variableDefinitions>
<variable name="ncname"
informationType="qname"|channelType="qname"
mutable="true|false"?
free="true|false"?
silent-action="true|false"? role="qname"?silentAction="true|false"?
roleType="qname"? />+
</variableDefinitions>
The declareddefined Variables can be of the following types:variables
Information Exchange Capturing Variables, State Capturing Variables. The attribute informationType describes the type of the object captured by the Variablevariable
Channel Capturing Variables. The attribute channelType describes the type of the channel object captured by the VariableChannel
The optional attribute mutable, when set to "false" describes that the Variable information when initialized, cannot change anymore. The variabledefault value for this attribute is "true".optional
The optional attribute free, when set to "true" describes that a variableVariable defined in an enclosing Choreography is also used in this Choreography, thus sharing the declaredVariables information. variableWhentheattributefreeissetto"true",theThe following rules apply in this case:variable
The type of a free Variable MUST match the type of the variableVariable defined in declaredan enclosing theChoreographyChoreography.
A perform activity MUST bind a free Variable defined in an enclosed Choreography with a Variable defined in an enclosing Choreography when sharing the Variables information
The optional attribute free, when set to "false" describes that a Variable is variabledefined in this Choreography. declared
The default value for the Whenfree attribute is attributesetto"false",thevariableresolvestotheclosestenclosingChoreography,regardlessofthetypeofthe"false".variable.
The optional attribute silentAction, when set to "true" describes that silent-action,there SHOULD NOT be any activity used for activitiescreating or changing this makingvariableavailableMUSTNOTbeVariable in the presentChoreography, if these operations should not be observable to other parties. The default value for this attribute is "false".Choreography.
The optional attribute roleType is used to specify the roleRole Type of a party at which the locationVariable information will reside.variable
The following rules apply to Variable Declarations:Definitions:If
The attribute name 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 sameis
A Variable defined without a Role,Role Type is itequivalent to a Variable that impliedis itdefined at all the declaredRole Types that are part of the RolesRelationship Types of the RelationshipsChoreography where the Variable is defined. For example if Choreography C1 has Relationship Type R that has a tuple (Role1, Role2), then a Choreography.Variable x defined in variableChoreography C1 without a ChreographyroleType attribute means it is Roledefined at Role1 and Role2declared
Expressions are used inanassignwithin WS-CDL to obtain existing information and to create new activityvariableinformationbygeneratingitfromaconstantor change existing information.value.
Predicate expressions are used inaWorkwithin WS-CDL to specify UnititsGuardconditions. Query expressions are used within WS-CDL to specify query strings.condition.
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 Additionally,AppendixSection 10. The function extensions are defined in the standard WS-CDL namespace "http://www.w3.org/2004/10/ws-chor/cdl". The prefix "cdl:" is associated with this namespace.B.
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 variableXML document could be an alias for an expression that pointed to the Order Amount element within businessthe Order XML document. This could then be used as part of a condition that controls the ordering of a Choreography, for example "Order Amount > $1000".an
All Tokens MUST have aan informationType, for example, an type,Order"Order Amount" would be of type Amountamount,Order"amount", "Order Id" could be alphanumeric and a counter an integer.Id
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 types, as described by WSDL, or a specific query string, as specified by XPATH, but instead the parts,partsthe query string can change without affecting the Choreography definition.or
The syntax of the token construct is:;
<token name="ncname" informationType="qname" />
The attribute name is used for specifying a distinct name for each token element declared within a Choreography Package.
The attribute informationType identifies the type of the document fragment.
The syntax of the tokenLocator construct is:;
<tokenLocator tokenName="qname"
informationType="qname"
query="XPath-expression"? />
The attribute tokenName identifies the name of the tokenToken that the document fragment locator is associated with.type
The attribute informationType identifies the type on which the query is performed to locate the Token.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 tokenToken "purchaseOrderID" is of type xsd:int. The two tokenLocators show how to access this token in "purchaseOrder" and "purchaseOrderAck" messages.;purchaseOrderID
<token name="purchaseOrderID" informationType="xsd:int"/>
<tokenLocator tokenName="tns:purchaseOrderID" informationType="purchaseOrder"
part="PO"query="/PO/OrderId"/>
<tokenLocator tokenName="tns:purchaseOrderID" informationType="purchaseOrderAck"
part="POAck"query="/POAck/OrderId"/>
AWS-CDLdocumentexplicitlyprescribestherules,agreedbetweenWebServiceparticipants,thatgoverntheorderingofexhangedmessagesandtheprovisioningofalternativepatternsof. 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.behavior.
A ChoreographyallowsconstructingglobalcompositionsofWebServiceparticipantsbyexplicitlyassertingChoreography. defines re-usable the common rules, that govern the ordering of exhanged messages and theircomplementaryobservablethe provisioning patterns of collaborative behavior, agreed between two or more interacting peer-to-peer partiesbehaviors.
A Choreography defined at the declaredPackage level is called a top-level Choreography, and does not share its context with other top-level Choreographies. A packageChoreographyperformedwithinanotherChoreographyiscalledanenclosedChoreography.Package AMAY contain exactly one top-level Choreography, MUSTthatismarked explicitly as the root Choreography.explicitly
TheA Choreography rootdefines the isonlytop-levelre-usable the common rules, that govern the ordering of exhanged messages and the provisioning patterns of behavior, as the action(s) performing the actual work, such as exchange of messages, when the specified ordering constraints are satisfied.Choreography
The re-usable behavior encapsulated within a Choreography MAY be performed within an enclosing Choreography, thus facilitating recursive composition. The initiated.performed Choreography is rootenabledwhenthen called an enclosed Choreography.it
The Choreography that is initiated.Allnon-root,top-levelperformed MAY be Choreographiesenabledwhenperformed.defined either:A
Locally - they are contained, in the same Choreography facilitatesrecursivecomposition,wherecombiningtwoormoreChoreographiescanformanewdefinition as the Choreography that enclosingmaybeperformed themre-used
Globally - they are specified in differentcontexts.a separate top-level Choreography definition that is defined in the same or in a different Choreography Package and can be used by other Choreographies and hence the contract is reusableA
A Choreography MUST contain at least one Relationship Type, enumerating the observable behavior this Choreography requires its type,parties to exhibit. One or more participantsRelationship Types MAY be defined within a Choreography, modeling Relationshipsmulti-party collaborations.multi-participant
A Choreography acts as a lexical name scoping context asitrestrictsthevisibilityofvariablefor Variables. A information.Variable defined in a Choreography is visible for use in this Choreography and all its enclosed variableChoreographies up-to the point that the Variable is re-defined as an non-free Variable, thus forming a Choreography Visibility Horizon for this Variable.Choreographies,
A Choreography MUSTMAY contain one or more Choreography definitions that MAY be performed only locally within this Choreography.contains
A Choreography MUST contain an 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:
One Exception block, which MAY be defined as part of the Choreography to recover from exceptional conditions that can occur in that enclosing Choreography
One Finalizer block, which MAY be defined as part of the Choreography to provide the finalization actions for that enclosing Choreography
The Choreography-Notation is used to define a rootoraChoreography. The syntax is:;top-level
<choreography name="ncname"
complete="xsd:boolean XPath-expression"?
isolation="dirty-write"| "dirty-read"|"serializable"?isolation="dirty-write"|"dirty-read"|"serializable"?
root="true"|"false"? >
<relationship type="qname" />+
variableDefinitions?
Choreography-Notation*
Activity-Notation
<exception name="ncname">
WorkUnit-Notation+
</exception>?
<finalizer name="ncname">
WorkUnit-Notation
</finalizer>?
</choreography>
The attribute name is used for specifying a distinct name for each choreography element declared within a Choreography Package.
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 aVariable information that is variabledefined in an declaredenclosing, and changed within an enclosed Choreography is enclosingavailable to its visibleenclosingsibling Choreographies:and
When isolation is set to "dirty-write", the Variable information variableMAY be immediately overwritten by actions in other Choreographiescan
When isolation is set to "dirty-read", the Variable information variableMAY be immediately visible for read but not for write to other Choreographiesis
When isolation is set to "serializable", the Variable information variableMUST be visible for read or for write to other Choreographies only after this Choreography has ended successfullyis
The relationship element within the choreography element enumerates the Relationships this Choreography MAY participate in.
The optional variableDefinitions element enumerates the declaresvariablesthatareVariables defined in this visibleChoreographyandallitsenclosedChoreographiesandChoreography.activities.
The optional root element marks a top-level Choreography as the root Choreography of a Choreography Package.package.
The optional Choreography-Notation within the choreography element defines the Choreographies that MAY be performed only within this Choreography.declares
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.
A Work Unit prescribes the constraints that must be fulfilled for making progress and thus performing actual work within a Choreography. Examples of a Work Unit include:
A Send PO Work Unit that includes Interactions for the Buyer to send an Order, the Supplier to acknowledge the order, and then later accept (or reject) the Order. This order.workWork Unit would probably not have a unitguard conditionGuard
An Order Delivery Error Work Unit that is performed whenever the Place Order Work Unit did not reach a "normal" conclusion. This would have a guard condition that identifies the Guarderror,seealsoChoreographyExceptionsanderrorTransactions
A Change Order Work Unit that can be performed whenever an order acknowledgement message has been received and an order rejection has not been received
A Work Unit MAY prescribe the canexplicitrulesforenforcingconstraints that preserve the consistency of the collaborations commonly performed between the theWebServiceparties. Using a Work Unit an application participants.MAY recover from faults that are the result canof abnormal actions and also MAY finalize completed actions that need to be logically rolled back.from
When enabled, a Work Unit Aspecifiesthedatadependenciesthatmustbesatisfiedbeforeenablingoneormoreenclosedactions.Thesedependenciesexpresses interest(s) on the availability of expressone or more Variable information that already variableexist or will be created in the future.exists
The Work Unit's interest(s) are matched when all the Unitsrequired,oneormorerequired Variable information are or become variableavailable and the specified matching condition on the Variable information is met. Availability of some available.Variable information does not mean that a Work Unit matches immediately. Only when all variableVariable 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. One or more Work Units MAY be matched concurrently if their respective interests are matched. When variablethematchingsucceedsa Work Unit thematching succeeds then its enclosed actions are enabled.is
A Work Unit MUST contain an Activity-Notation ,whichisenabledwhenitsenclosingWorkUnitisthat performs the actual work.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".Guard
The WorkUnit-Notation is defined as follows:;
<workunit name="ncname"
guard="xsd:boolean XPath-expression"?
repeat="xsd:boolean XPath-expression"?
block="true|false"block="true|false"? >
Activity-Notation
</workunit>
The Activity-Notation specifies the enclosed actions of a Work Unit.
The guard condition of a Work Unit, specified by the optional guard attribute, describes the attributeinterest on the availability of one or more, existing or future reactivevariableinformationanditsusageisexplainedinsectionVariable infor2.4.5.1.