Copyright <ylafon@w3.org> © 2004 W3C © 2004 ® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark ®and document use rules apply.,
The Web Services Choreography Description Language (WS-CDL) is an XML-based language that describes peer-to-peer collaborations of parties by defining, from a global viewpoint, their common and complementary observable behavior; where ordered message exchanges result in accomplishing a common business goal.
The Web Services specifications offer a communication bridge between the heterogeneous computational environments used to develop and host applications. The future of E-Business applications requires the ability to perform long-lived, peer-to-peer collaborations between the participating services, within or across the trusted domains of an organization.
The Web Services Choreography specification is targeted for composing interoperable, peer-to-peer collaborations between any type of party regardless of the supporting platform or programming model used by the implementation of the hosting environment.
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 theseconda Last Call Working Draft of the Web Services Choreography Description Language document. publishedThe Last Call review period ends 31 January 2005.
Comments on this document should be sent to public-ws-chor-comments@w3.org
(public archive). It is inappropriate to send discussion emails to this address.It
Discussion of this document takes place on the lastversionbeforeLastCallpublic public-ws-chor@w3.org mailing list (public archive) per the email communication rules in the Web Services Choreography Working Group charter.WD
It has been produced by the Web Services Choreography Working Group, which is part of the Web Services Activity.
This document is a chartered deliverable of the Web Services Choreography Working Group. SomeIssues are issuesalreadyidentifiedrecorded in the andprocessofbeingfixedbeforegoingtoLastCall,seegroup's issue section.the
The Working Group identified two issues. Those issues may be dropped or fixed in the future, but the Working Group does not believe that the resolution will result in a substantive change.
This document is based upon the Working Draft published on 2712 October 2004. Changes between these two versions are described in a diff document.April
Commentsonthisdocumentshouldbesenttopublic-ws-chor-comments@w3.org(publicarchive).Itisinappropriatetosenddiscussionemailstothisaddress.Discussionofthisdocumenttakesplaceonthepublicpublic-ws-chor@w3.orgmailinglist(publicarchive)pertheemailcommunicationrulesintheWebServicesChoreographyWorkingGroupcharterThis 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.1
1.2 Purpose of the Choreography Description Language 1.2
1.3 Goals 1.3
1.4 Relationship with XML and WSDL 1.4
1.5 Relationship with Business Process Languages 1.5
1.6 Time Assumptions
2 Choreography Description Language Model
2.1 WS-CDL Model Overview 2.1
2.2 2.2 WS-CDL Document StructureChoreography
2.2.1Package 2.2.1 Choreography Package 2.2.2
2.2.2 Including WS-CDL Type Definitions
2.2.3 WS-CDL document Naming and Linking
2.2.4 Language Extensibility and Binding 2.2.3
2.2.5 Semantics 2.2.4
2.3 Collaborating Parties 2.3
2.3.1 Role Types 2.3.1
2.3.2ParticipantTypes 2.3.2 Relationship Types 2.3.3
2.3.3 Participant Types 2.3.4
2.3.4 Channel Types
2.4 Information Driven Collaborations 2.4
2.4.1 Information Types 2.4.1
2.4.2 Variables 2.4.2
2.4.3 Expressions 2.4.2.1
2.4.3.1 WS-CDL Supplied Functions 2.4.3
2.4.4 Tokens
2.4.5 Choreographies 2.4.4
2.4.6 WorkUnits 2.4.5
2.4.6IncludingChoreographies 2.4.7 Choreography Life-line 2.4.7
2.4.8 Choreography 2.4.8RecoveryException 2.4.8.1Block 2.4.8.2FinalizerBlockHandling 2.5
2.4.9 Choreography Finalization
2.4.10 Choreography Coordination
2.5 Activities
2.5.1 Ordering Structures 2.5.1
2.5.1.1 Sequence 2.5.1.1
2.5.1.2 Parallel 2.5.1.2
2.5.1.3 Choice 2.5.1.3
2.5.2 Interacting 2.5.2
2.5.2.1 Interaction Based Information Alignment 2.5.2.1
2.5.2.2ProtocolBasedInformationExchanges 2.5.2.2 Interaction Life-line 2.5.2.3
2.5.2.3 Interaction Syntax 2.5.2.4
2.5.3 Composing Choreographies 2.5.3
2.5.4 Assigning Variables 2.5.4
2.5.5 Marking Silent Actions 2.5.5
2.5.6 Marking the Absence of Actions 2.5.6
2.5.7 Finalizing a Choreography
3 Example
4 Relationship with the Security framework
5 Relationship with the Reliable Messaging framework
6 Relationship with the Coordination frameworkTransaction/Coordination
7 Relationship with the Addressing frameworkAcknowledgments
8 ConformanceReferences
9 Acknowledgments
10 References
11 Last Call Issues
11.1 Issue 1
11.2 Issue 2
12 WS-CDL XSD Schemas
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.de-facto
Web Services are a key component of the emerging, loosely coupled, Web-based computing architecture. A Web Service is an autonomous, standards-based component whose public interfaces are defined and described using XML. Other systems may interact with a Web Service in a manner prescribed by its definition, using XML based messages conveyed by Internet protocols.
The Web Services specifications offer a communication bridge between the heterogeneous computational environments used to develop and host applications. The future of E-Business applications requires the ability to perform long-lived, peer-to-peer collaborations between the participating services, within or across the trusted domains of an organization.
The Web Service architecture stack targeted for integrating interacting applications consists of the following components:
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 message set 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 dataprotocol
Registry: allows publishing the availability of a Web Service and its discovery from service requesters using sophisticated searching mechanimsUDDI
Security layer: ensures that exchanged information are not modified or forged in a verifiable manner and that parties can be authenticated
Reliable Messaging layer: provides exactly-once and guaranteed delivery of information exchanged between parties
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 protocol
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 collaborations of parties by defining from a global viewpoint their common and complementary observable behavior, where information exchanges occur, when the jointly agreed ordering rules are satisfiedpeer-to-peer
The Web Services Choreography specification is targetedforcomposinginteroperable,aimed at the composition of interoperable collaborations between any type of party regardless of the supporting platform or programming model used by the implementation of the hosting environment.peer-to-peer
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 [RFC2119].[2].
The following namespace prefixes are used throughout this document:
| Prefix | Namespace URI | Definition |
|---|---|---|
| wsdl | http://www.w3.org/2004/08/wsdl | WSDL 2.0 namespace for WSDL framework. |
| cdl |
|
WSCDL namespace for Choreography |
| xsi | http://www.w3.org/2001/XMLSchema-instance |
Instance namespace as defined by XSD |
| xsd | http://www.w3.org/2001/XMLSchema |
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 "http://example.com" represent some application-dependent or context-dependent URIs |
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/><element. . .>) indicate that elements/attributes irrelevant to the context are being omitted. <element>)
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; other examples are fragments and require additional information to be specified in order to conform. others
An XSD schemasis provided as a formal definition of WS-CDL grammar (see Section are11).9).
Business or other activities that involve different organizations or independent processes are engaged in a collaborative fashion to achieve a common business goal, such as Order multipleFulfillment.Fulfillment.
For the collaboration to work successfully, the rules of engagement between all the interacting parties must be provided. Whereas today these rules are frequently written in English, a standardized way for precisely defining these interactions, leaving unambiguous documentation of the parties and responsibilities of each, is missing.
The Web Services Choreography specification is targetedaimed at being able to precisely fordescribingdescribe collaborations between any type of party regardless of the supporting platform or programming model used by the implementation of the hosting environment.peer-to-peer
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 exchangeddescribes, from a global describesviewpoint, the common and complementary observable behavior of all the parties involved. Each party can then use the global definition to build and test solutions that conform to it. The viewpointglobal specification is in turn realized by combination of the resulting local systems, on the basis of appropriate infrastructure support.main
The advantage of a contract based on a global withdefinitionviewpoint as opposed to anyone endpoint is that it separates the overall "global" process being followed by an individual business or system within a "domain of control" (an endpoint) from the definition of the approachsequences in which each business or system exchanges information with others. This means that, as long as the "observable" sequencesequencesequences do not change, the rules and logic followed within doesa domain of control (endpoint) can change at thewill and interoperability is therefore guaranteed.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 or global view. It is the intent of CDL that the conformance of each implementation to the common view expressed in CDL is easy to determine.
The figure below demonstrates a possible usage of the Choreography Description Language.

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 interactionsoccuroccur. They then generate a Choreography Description Language based representation. In this example, a Choreography specifies the andinteroperabilityinteractions between services across business andentities ensuring interoperability, while leaving actual implementation decisions in the hands of each individual company:entities,
Company "A" relies on a WS-BPEL [WSBPEL] solution to implement its own part of the Choreography[18]
Company "B", having greater legacy driven integration needs, relies on a J2EE [J2EE] solution incorporating Java and Enterprise Java Bean Components or a .NET [25][C#S] solution incorporating C# to implement its own part of the Choreography[26]
Similarly, a Choreography can specify the interoperability and interactions between services within one business entity.
The primary goal of a Choreography Description Language is to specify a declarative, XML based language that defines from a global viewpoint the common and complementary observable behavior,wherebehavior specifically, the information exchanges messagethat occur and occur,the jointly agreed ordering rules whenthat need to be satisfied.are
SomeMore specifically, the goals of additionalthisdefinitionthe Choreography Description Language are to permit: language
Reusability. The same Choreography definition is usable by different parties operating in different contexts (industry, locale, etc.) with different software (e.g. application software)
Cooperation. Choreographies define the sequence of exchanging messages between two (or more) independent parties or processes by describing how they should cooperate
Multi-Party Collaboration. Choreographies can be defined involving any number of parties or processes
Semantics. Choreographies can include human-readable documentation and semantics for all the components in the Choreography
Composability. Existing Choreographies can be combined to form new Choreographies that may be reused in different contexts
Modularity. Choreographies can be defined using an "inclusion" facility that allows a Choreography to be created from parts contained in several different ChoreographiesModularity.
Information Driven Collaboration. Choreographies describe how parties make progress within a collaboration, whenthrough the recording of exchanged information and changes to observable information recordingsthat cause ordering constraints to be fulfilled and progress to be madechanges
Information Alignment. Choreographies allow the parties that take part in Choreographies to communicate and synchronize their observable information
changesandtheactualvaluesoftheexchangedinformationasException Handling. Choreographies can define how exceptional or unusual conditions that occur while the Choreography is performed are handledwell
Transactionality. The processes or parties that take part in a Choreography can work in a "transactional" way with the ability to coordinate the outcome of the long-lived collaborations, which include multiple,oftenrecursivecollaborationmultiple participants, each with units,itstheir own, non-observable business rules and goalsown
Specification Composability. This specification will work alongside and complement other specifications such as the WS-Reliability [WSRM], WS-Composite Application Framework (WS-CAF) [22],[WSCAF], WS-Security [21],[WSS], Business Process Execution Language for WS (WS-BPEL) [24],[WSBPEL], etc. [18],
The WS-CDL specification depends on the following specifications: XML 1.0 This[XML], XML-Namespaces [9],[XMLNS], XML-Schema 1.0 [10],[11,[XMLSchemaP1], [XMLSchemaP2] and XPointer [XPTRF]. Support for including and 12]XPath1.0referencing service definitions given in WSDL 2.0 [WSDL20] is a normative part of the WS-CDL specification. In addition, support for including and referencing service definitions given in WSDL [13].2.01.1 as constrained by WS-I Basic Profile [Action: add references] is a normative part of [7]the WS-CDL specification.this
A Choreography Description Language is not an "executable business process description language" [16,17,18,19,or an implementation 20]languagelanguage. The role of specifying the execution logic of an application will be covered by these [XLANG], [WSFL], [WSBPEL], [BPML], [XPDL], [JLS], [C#S] and other specifications.[23].
A Choreography Description Language does not depend on a specific business process implementation language. Thus, it can be used to specify truly interoperable, collaborations between any type of party regardless of the supporting platform or programming model used by the implementation of the hosting environment. Each party, adhering to a Choreography Description Language collaboration representation, could be implemented using completely different mechanisms such as:peer-to-peer
Clock synchronization is unspecified in the WS-CDL technical specification and is considered design-specific. In specific environments between involved parties, it can be assumed that all parties are reasonably well synchronized on second time boundaries. However, finer grained time synchronization within or across parties, or additional support or control are undefined and outside the scope of the WS-CDL specification.
This section introduces the Web Services Choreography Description Language (WS-CDL) model.
WS-CDL describes interoperable, peer-to-peer collaborations between parties. In order to facilitate these collaborations, services commit to mutual responsibilities by establishing Relationships. Their collaboration takes place in a jointly agreed set of ordering and constraint rules, whereby onmessagesinformation is exchanged between the parties.are
The WS-CDL model consists of the following Choreographynotations:Participants,entities:Roles
Participant Types, Role Types and Relationship Types - RelationshipsWithin a Choreography, information is always exchanged between Inparties within Participantstheor across trust sameboundariesTypes,VariablesandTokens-Variablescontaininformationaboutboundaries. A Role Type enumerates the observable behavior a party exhibits in order to collaborate with other parties. A Relationship Type identifies the mutual commitments that must be made between two parties for them to collaborate successfully. A Participant Type is grouping together those parts of the observable behavior that must be implemented by the same logical entity or organizationcommonly
Information Types, Variables and Tokens - Variables contain information about commonly observable objects in a collaboration, such as the information 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 contains or the Token messagesreferencescontains
Choreographies - AChoreographyallowsChoreographies define collaborations between interacting definingparties: peer-to-peer
Choreography CompositionallowsthecreationofnewChoreographiesbyreusingexistingChoreographyLife-line - The Choreography Life-line expresses the progression of a collaboration. Initially, the collaboration is definitionsstartedataspecificbusinessestablished between parties, then work is performed process,byfollowingthewithin it and finally ChoreographytheChoreographyit completes either normally or abnormallycompletes,
Choreography Recoveryconsistsof:Exception ChoreographyBlocks - BlockdescribeshowtoAn Exception Block specifies what additional interactions should occur when a Choreography behaves in an abnormal wayspecify
Choreography Finalizer Blocks - A Finalizer Block describes how to specify Blockadditional interactions that should occur to whatmodify the effect of an earlier successfully completed reverseChoreography, for example to confirm or undo the effectChoreography
Channels - A Channel realizes a point of collaboration between parties by specifying where and how information is exchanged
Work Units - A Work Unit prescribes the constraints that must be fulfilled for making progress and thus performing actual work within a ChoreographyWorkUnits
Activities 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 themessagesinformation within the Choreography inis exchangedare
Interaction Activity - An Interaction is the basic building block of a Choreography, which results in an exchange of information between parties and possible synchronization of their observable information changes and the actual values of the exchanged informationmessages
Semantics - Semantics allow the creation of descriptions that can record the semantic definitions of every component in the modelsingle
A WS-CDL document is simply a set of definitions. Each definition is a named construct that can be referenced. There is a package element at the root, and the individual Choreography type definitions inside.
A Choreography Package aggregates a set of WS-CDLWS-CDL type definitions, provides a namespace for the definitions and through the use of XInclude Choreography[XInclude], MAY syntactically [27],includesinclude WS-CDL type definitions that are defined in other Choreography Packages.Choreography
The syntax of the package construct is:is:;
<package
name="ncname"
author="xsd:string"?
version="xsd:string"version="xsd:string"?
targetNamespace="uri"
xmlns="http://www.w3.org/2004/10/ws-chor/cdl/">xmlns="http://www.w3.org/2004/12/ws-chor/cdl">
informationType*
token*
tokenLocator*
roleType*
relationshipType*
participantType*
channelType*
Choreography-Notation*
</package>
The Choreography Package contains:
Zero or more Information Types
Zero or more Tokens and Token Locators
Zero or more Role Types
Zero or more Relationship Types
Zero or more Participant Types
Zero or more Channel Types
Zero or more Package-level Choreographies
The top-level attributes , name,nameauthor,author, and version define authoring properties of the Choreography document.
The targetNamespace attribute provides the namespace associated with all WS-CDL type definitions contained in this Choreography Package. WS-CDL type definitions included Package.in this toPackage, using the inclusion mechanism, PackageMAY be associated with other namespaces.may
The elements , informationType,token,tokenLocator,roleType,informationTyperelationshipType,token, tokenLocator, roleType, relationshipType, participantType and channelType areMAY be used as elements by all the Choreographies defined within this Choreography Package.shared
WS-CDL documentsMUSTbeassignedanameattributetype ofNCNAMEthatservesasalightweightformofdocumentation.ThetargetNamespacedefinitions or fragments of WS-CDL type attributeURIdefinitions can be MUSTspecified.TheURIMUSTsyntactically reused in any WS-CDL type definition by using XInclude [XInclude]. The assembly of large WS-CDL type definitions from multiple smaller, well-formed WS-CDL type definitions or WS-CDL type definitions fragments is enabled using this mechanism.NOT
Inclusion of fragments of other WS-CDL type definitions SHOULD be done carefully in order to avoid duplicate definitions (Variables, blocks, etc.). A WS-CDL processor MUST ensure that the document is correct before processing it. The correctness may involve XML well-formedness as well as semantic ;checks, such as unicity of Variable definitions, of a single root Choreography, etc.
The example below shows some possible syntactic reuses of Choreography type definitions.
<choreography name="newChoreography" root="true">
...
<variable name="newVariable" informationType="someType"
role="randomRome"/>
<xi:include href="genericVariableDefinitions.xml" />
<xi:include href="otherChoreography.xml"
xpointer="xpointer(//choreography/variable[1]) />
...
</choreography>
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].[XMLSchemaP1].2.2.3
To support extending the WS-CDL language, this specification allows the 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.
Extensions MUST NOT change the semantics of any element or attribute from the WS-CDL namespace.
Within a WS-CDL document, descriptions willberequiredallow the recording of tosemanticssemantic definitions and other documentation. The definitions.OPTIONAL description sub-element is optionalusedasatextualdescriptionfordocumentationpurposes.Thiselementallowed inside any WS-CDL language element. WS-CDL parsers are not required to parse the contents of the isdescription.
The information provided by the description sub-element will allow for the recording of semantics in any or all of the following ways:element
Text. This will be in plain text or possibly HTML and should be briefText.
Document Reference. This will contain a URI to a document that more fully describes the component.ForexampleonthetoplevelChoreographyDefinitionthatmightreferenceacompletepaperStructuredcomponentAttributes.
Machine Oriented Semantic Descriptions. This will contain machine processable definitions in languages such as RDF or OWL
Descriptions that are text or document references can be defined in multiple different human readable languages.
The WSDL specification [WSDL20] describes the functionality of a service provided by a party based on a stateless, client-server model. The emerging Web Based applications require the ability to exchange [7]information in a peer-to-peer environment. In these types of environments a party represents a requester of services provided by another party and is at the same time a provider of services requested from other parties, thus creating mutual multi-party service dependencies.messages
A WS-CDL document describes how a party is capable of engaging in collaborations with the same party or with different parties.peer-to-peer
The Role Types, Participant Types, Relationship Types and Channel Types define the coupling of the collaborating parties.
A Role Type enumerates the observable behavior a party exhibits in order to collaborate with other parties. For example the "Buyer" Role Type is associated with purchasing of goods or services and the Buyer"Supplier" Role Type is associated with providing those goods or services for a fee.Supplier
The syntax of the roleType construct is:is:;
<roleType name="ncname"> <behavior name="ncname" interface="qname"? />+ </roleType>
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 party exhibits. A Role Type MUST contain one or more behavior elements. The attribute name within the behavior element is used for specifying a distinct name for each behavior element declared within a roleType element.
The behavior element defines an OPTIONAL optionalinterface 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 Relationship Type identifies Participantasetthe Role Types ofand Behaviors, where mutual commitments between two parties MUST be thatimplementedbythesameentityororganization.ItspurposeistogrouptogetherthepartsoftheobservablebehaviorthatMUSTbeimplementedbythesameprocess.ThesyntaxoftheparticipantTypeconstructis:;<participantTypename="ncname"><roletype="qname"/>+</participantType>TheattributenameisusedforspecifyingadistinctnameforeachparticipantTypeelementdeclaredwithinaChoreographyPackage.Anexampleisgivenbelowwherethe"SellerForBuyer"RoleTypebelongingtoa"Buyer-Seller"RelationshipTypeisimplementedbytheParticipantType"Broker"whichalsoimplementsthe"SellerForShipper"RoleTypebelongingtoa"Seller-Shipper"RelationshipType:<participantTypename="Broker"><roletype="tns:SellerForBuyer"/><roletype="tns:SellerForShipper"/></participantType>2.3.3RelationshipTypesARelationshipTypeidentifiestheRoleTypeandBehaviorswheremutualcommitmentsbetweentwopartiesMUSTbemadeformade for them to collaborate successfully. For example the Relationship Types between a Buyer and a Seller could include:them
A "Purchasing" Relationship Type, for the initial procurement of goods or services, and
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 Role Types, Choreographies involving more than two Role Types are possible. For example if the purchase of goods involved a third-party Shipper contracted by the Supplier to deliver the Supplier's goods, then, in addition to the "Purchasing" and PurchasingCustomer"Customer Management" Relationship Types described above, the following Relationship Types might exist:Management
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:is:;
<relationshipType name="ncname"> <role type="qname" behavior="list of ncname"? /> <role type="qname" behavior="list of ncname"? /> </relationshipType>
The attribute name is used for specifying a distinct name for each relationshipType element declared within a Choreography Package.
A relationshipType element MUST have exactly two Role Types defined. Each Role Type is specified by the Withintype attribute within the role element.
Within each role element, the OPTIONAL attribute optionalbehavior identifies the commitment of a party as an XML-Schema list of behavior types belonging to athis Role theTypespecifiedbythetypeattributeoftheroleType. If the element.behavior attribute is missing then all the behaviors belonging to this Role Type thespecifiedbythetypeattributeoftheroleare identified as the commitment of a party.element
A ChannelParticipant Type identifies a realizesset of pointcollaborationbetweenRole Types that MUST be implemented by partiesspecifyingwhereandhowthe same logical entity or organization. Its purpose is informationexchanged.Additionally,Channelinformationcanbepassedamongparties.Thisto group together the allowsparts of modelingbothstaticanddynamicmessagedestinationswhencollaboratingwithinaChoreography.Forexample,aBuyercouldspecifyChannelinformationthe observable behavior that MUST be tousedforsendingdeliveryinformation.TheBuyercouldthenimplemented by the sendChannelinformationsame logical entity or organization.to
The syntax of the participantType construct is:
<participantType name="ncname"> <role type="qname" />+ </participantType>
The attribute name is used for specifying a distinct name for each participantType element declared within a Choreography Package.
Within the participantType element, one or more role elements identify the Role Types that MUST be implemented by this Participant Type. Each Role Type is specified by the type attribute of the role element. A specific Role Type MUST NOT be specified in more than one participantType element.
An example is given below where the "SellerForBuyer" Role Type belonging to a "Buyer-Seller" Relationship Type is implemented by the Participant Type "Broker" which also implements the "SellerForShipper" Role Type belonging to a "Seller-Shipper" Relationship Type:
<roleType name="Buyer">
. . .
</roleType>
<roleType name="SellerForBuyer">
<behavior name="sellerForBuyer" interface="rns:sellerForBuyerPT"/>
</roleType>
<roleType name="SellerForShipper">
<behavior name="sellerForShipper" interface="rns:sellerForShipperPT"/>
</roleType>
<roleType name="Shipper">
. . .
</roleType>
<relationshipType name="Buyer-Seller">
<role type="tns:Buyer" />
<role type="tns:SellerForBuyer" />
</relationshipType>
<relationshipType name="Seller-Shipper">
<role type="tns:SellerForShipper" />
<role type="tns:Shipper" />
</relationshipType>
<participantType name="Broker">
<role type="tns:SellerForBuyer" />
<role type="tns:SellerForShipper" />
</participantType>
A Channel realizes a point of collaboration between parties by specifying where and how information is exchanged between collaborating parties. Additionally, Channel information can be passed among parties in information exchanges. The Channels exchanged MAY be used in subsequent Interaction activities. This allows the modeling of both static and dynamic message destinations when collaborating within a Choreography. For example, a Buyer could specify Channel information to be used for sending delivery information. The Buyer could then send the Channel information to the Seller who then forwards it to the Shipper. The Shipper could then send delivery information directly to the Buyer using the Channel information originally supplied by the Buyer.
A Channel Type MUST describe the Role Type and the reference type of a party, being the target of an information exchange, which is then used for determining where and how to Interaction,send or receive information send/receiveto or into the party.to/into
A Channel Type MAY specify the instance identity of an entity implementing the behavior(s) of a party, being the target of an information exchange.Interaction.
A Channel Type MAY describe one or more logical conversations between parties, where each conversation groups a set of related information exchanges. message
One or more Channel(s) MAY be passed around from one party to Roleanother in an information exchange. A Channel Type MAY another.restricttheChannelType(s)allowedbe toexchangedused to:between
Restrict the parties,number of times a Channel of this Channel throughType.Type can be usedAdditionally,
Restrict the type of information exchange that can be performed when using a Channel of this Channel Type
MAYRestrict the restrictnumberofChannel Type(s) that will be passed through a Channel of this Channel Typetimes
Enforce that a passed Channel is always distinctused.
The syntax of the channelType construct is:is:;
<channelType name="ncname"
usage="once"|"unlimited"?
action="request-respond"|"request"|"respond"? >
<passing channel="qname"
action="request-respond"|"request"|"respond"?
new="xsd:boolean"?new="true"|"false"? />*
<role type="qname" behavior="ncname"? />
<reference>
<token type="qname"/>name="qname"/>
</reference>
<identity>
<token type="qname"/>+name="qname"/>+
</identity>?
</channelType>
The attribute name is used for specifying a distinct name for each channelType element declared within a Choreography Package.
The OPTIONAL attribute optionalusage is used to restrict the number of times a Channel of this Channel Type can be used.
The OPTIONAL attribute optionalaction is used to restrict the type of information exchange that can be performed when using a Channel of this Channel Type. The type of information exchange performed could either be a request-respond exchange, a request exchange, or a respond exchange. The default for this attribute is set to "request".
The OPTIONAL element passing describes the Channel Type(s) of the Channel(s) that are passed, from one exchangedRoleparty to TypeanotherRoleanother, when using an information exchange on a Channel of this Channel Type,TypeinanInteraction.InthecasewheretheoperationusedtoexchangetheChannelisofrequest-responsetype,thenType. The OPTIONAL attribute theaction within the passing element defines if a Channel will be thepassed during exchangeda request theexchange, during orthea response exchange or both. The response.Channelsexchangeddefault for this attribute is set to "request". The OPTIONAL attribute new within the MAYpassing element when set to "true" enforces a passed Channel to be usedinsubsequentInteractionalways distinct. If the element activities.passing is missing then this Channel Type MAY be used for exchanging businessdocumentsandallChannelTypesinformation but MUST NOT be used for passing Channels of any withoutChannel Type.restrictions.
The element role is used to identify the Role Type of a party, being the target of an information exchange, which is then used for statically determining where and how to send or receive information to or into the party.Interaction,
The element reference is used for describing the reference type of a party, being the target of an information exchange, which is then used for dynamically determining where and how to send or receive information to or into the party. The Interaction,reference of a party is distinguished by a Token as specified by the servicename attribute of the token element within the reference element.
The OPTIONAL element identity MAY be used for identifying an instance of an entity implementing the behavior of a party and for identifying a logical conversation between parties. The optionalidentity and the different conversations are distinguished by a set of Tokens as specified by the name attribute of the token element within the processidentity element.
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 logical entity or organization, then the specified Role Types MUST belong to the same Participant Type. In addition, the additionidentity 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 Type "RetailerChannel" that realizes a point of collaboration with a Retailer. The Channel Type identifies the Role Type of the Retailer as the RetailerChannel."Retailer". The "tns:Retailer".addressinformation for locating the ofRetailer is specified in the Channelreference element, whereas the instance processcanof a process implementing the Retailer is identified for correlation purposes using the beidentity elementforcorrelationelement. The purposes.element passingpassing allows only a Channel of instancethe"ConsumerChannel" Type to be ConsumerChannelsentovertheRetailerChannelpassed in a request information exchange through a Channel of "RetailerChannel" Type.Type.;
<channelType name="RetailerChannel">
<passing channel="ConsumerChannel" action="request" />
<role type="tns:Retailer" behavior="retailerForConsumer"/>
<reference>
<token type="tns:retailerRef"/>name="tns:retailerRef"/>
</reference>
<identity>
<token type="tns:purchaseOrderID"/>name="tns:purchaseOrderID"/>
</identity>
</channelType>
Parties make progress within a collaboration when recordings of exchanged information are made, and changes to observable information collaboration,occur, that then cause ordering constraints to be fulfilled. A WS-CDL document allows defining information within a Choreography that can influence the observable behavior of the collaborating parties.changes
Variables capture information about objects in the Choreography, such as the information exchanged or the messagesobservable information of the Roles involved. observablesTokens are aliases that can be used to reference parts of a TokenVariableVariable. Both Variables and Tokens have Information Types that define the type of information the Variable contains or the Token .references.contain.
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.types
The syntax of the informationType construct is:is:;
<informationTypename="ncname";type="qname"?|name="ncname" type="qname"?|element="qname"? exceptionType="true"|"false"? />element="qname"?
The attribute name is used for specifying a distinct name for each informationType element declared within a Choreography Package.
The OPTIONAL attributes and typetype,element describe the documenttotype of information used within a Choreography as a WSDL 1.1 Message Type, an XML Schema type, a WSDL 2.0 Schema element or an XML Schema beelementelement. The respectively.documenttype of information is exclusively one of isthesetypesthe aforementioned.exclusively.
When the OPTIONAL attribute exceptionType is set to "true", this Information Type is an Exception Type and MAY map to a WSDL fault type. When the attribute exceptionType is set to "false", this information type MUST NOT map to a WSDL fault type. The default for this attribute is set to "false".
In case of WSDL 2.0, the attribute element within the informationType refers to a unique WSDL 2.0 faultname when the attribute exceptionType is set to "true".
The examples below show some possible usages of the informationType construct.
Example1: The informationType "purchaseOrder" refers to the WSDL 1.1 Message type "pns:purchaseOrderMessage"
<informationType name="purchaseOrder" type="pns:purchaseOrderMessage"/>
Example2: The informationType "customerAddress" refers to the WSDL 2.0 Schema element "cns:CustomerAddress"
<informationType name="customerAddress" element="cns:CustomerAddress"/>
Example 3: The informationType "intType" refers to the XML Schema type "xsd:int"
<informationType name="intType" type="xsd:int"/>
Example 4: The informationType "OutOfStockExceptionType" is of type Exception Type and refers to the WSDL 2.0 fault name "cwns:OutOfStockExceptionType"
<informationType name="OutOfStockExceptionType"
type="cwns:OutOfStockExceptionType" exceptionType="true"/>
Variables capture information about objects in a Choreography as defined by their usageusage::
Information Exchange Capturing Variables, which contain information such as an "Order" that Orderisis: used
Used to populate the content of a message to be sent, orPopulate
Populated as a result of a message received
State Capturing Variables, which contain information about the observable changes Variables,at a Role as a result of information being exchanged. For example when a Buyer sends an of"Order" to a Seller, the Buyer could have a Variable called "OrderState" set to a value of "OrderSent" and once the message was received by the Seller, the Seller could have a Variable called "OrderState" set to a value of "OrderReceived". Note that the Variable "OrderState" at the Buyer is a different Variable to the "OrderState" at the SellerOrder
Channel Capturing Variables. For example, a Channel Variable could contain information such as; the URL to which the message could be sent, the policies that are to be asapplied,suchasapplied (e.g. security), whether or not reliable messaging is to be used, etc. security,
The value of Variables:
Are available to Roles within a Choreography, when the Variables contain information that is common 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 ChoreographyIs
Can be made available as a result of an Interaction
Information Exchange Capturing Variables are populated and become available at the Roles at the ends of an Interactionin
State Capturing VariablesVariables, that contain information about the observable information changes of a Role as a result of information being exchanged, are recorded and become available,
Can be created or changed and made available locally at a Role by assigning data from other information. They can be Information Exchange, State or Channel Capturing Variables. For example "Maximum Order Amount" could be data created by a 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 "Maximum Order Amount" is calculated and its value would not be known by the other Roles
Can be used to determine the decisions and actions to be taken within a Choreography
Can be used to cause Exceptions at one or more parties in a Choreography
Defined at different Roles that are part of the same Participant is shared between these Roles when the Variables have the same name
The variableDefinitions construct is used for defining one or more Variables within a ChoreographyChoreography.block.
The syntax of the variableDefinitions construct is:is:;
<variableDefinitions>
<variable name="ncname"
informationType="qname"|channelType="qname"informationType="qname"?|channelType="qname"?
mutable="true|false"?
free="true|false"?
silentAction="true|false"? roleType="qname"?silent="true|false"?
roleTypes="list of qname"? />+
</variableDefinitions>
A Variable defined TheVariablescanbeusing the offollowingattribute types:informationType specifies either Information Exchange Capturing Variables or State Capturing Variables. Variables,A Variable defined using the attribute TheinformationType specifies Exception Capturing Variables when the referenced information type describesoftheobjectcapturedhas the attribute byexceptionType set to "true". A Variable defined using the attribute channelType specifies Channel Capturing Variables. The attributes attributeinformationType and channelType describesthetypeofthechannelobjectcapturedbytheare mutually exclusive.Variable
The OPTIONAL attribute optional , when set to mutablemutable,"false""false", specifies that the Variable information describeswhencannot change initialized,once initialized. The default value for this attribute is "true".anymore.
The OPTIONAL attribute optionalsilent, when set to "true" specifies that there SHOULD NOT be any activity used for creating or changing this Variable in the Choreography. A silent Variable is used to represent the result of actions within a party that are either not observable or are of no interest from the WS-CDL perspective. The default value for this attribute is "false".
The OPTIONAL attribute free, when set to "true" specifies that a Variable defined in an enclosing Choreography is also used in this Choreography, thus sharing the Variables information. The following rules apply in this case:describes
The type (as specified by the informationType or the channelType attributes) of a free Variable MUST match the type of the Variable defined in an enclosing Choreography
The attributes silent and mutable of a free Variable MUST match the attributes silent and mutable of the Variable defined in an enclosing Choreography
A perform activity MUST bind a free Variable defined in an performed Choreography with a Variable defined in enclosedana performing Choreographyenclosing
whensharingtheVariablesThe informationOPTIONAL attribute optional , when set to "false" freefree,specifies that a Variable is defined in this Choreography.describes
The default value for the free attribute is "false".
The optionalattributesilentAction,whensetto"true"describesthatthereSHOULDNOTbeanyactivityusedforcreatingorchangingthisVariableintheChoreography,iftheseoperationsshouldnotbeobservabletootherparties.Thedefaultvalueforthisattributeis"false".TheOPTIONAL attribute optionalroleTypes is used to specify roleTypean XML-Schema list of one or more Role theType(s) of a party at which the Variable information will reside. TypeThefollowingrulesapplyA Variable toDefinitions:Theattributedefined without a Role Type is nameusedforspecifyingadistinctnameforeachvariableelementdeclaredwithinavariableDefinitionselementwhenneeded.TheVariableswithRoleTypenotspecifiedMUSThavedistinctnames.TheVariableswithRoleTypespecifiedMUSThavedistinctnames,whentheirRoleTypeisthesameAVariabledefinedwithoutaRoleTypeisequivalentequivalent to a Variable that is defined at all the Role Types that are part of the Relationship Types of the Choreography where the Variable is defined. For example if Choreography to"C1" has Relationship Type C1"R" that has Ratuple(Role1,Roles "Role1", "Role2", then a Variable Role2),"var" defined in Choreography x"C1" without a C1 attribute means it is defined at roleTypesroleTypeboth "Role1" and Role1Role2"Role2".2.4.2.1
The attribute name is used for specifying a distinct name for each Variable declared within the variableDefinitions element. In those cases where the visibility of a Variable is wholly within a single Role then that Role needs to be named in the definition of the Variable as the Role Type using the attribute roleTypes. In those cases where the Variable is shared amongst a subset of Roles within a Choreography those Roles need to be listed within the definition of <