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"? targetNamespace="uri"version="xsd:string"xmlns="http://www.w3.org/2004/12/ws-chor/cdl"> informationType* token* tokenLocator* roleType* relationshipType* participantType* channelType* Choreography-Notation* </package>xmlns="http://www.w3.org/2004/10/ws-chor/cdl/">
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="true"|"false"? />* <role type="qname" behavior="ncname"? /> <reference> <tokennew="xsd:boolean"?name="qname"/> </reference> <identity> <tokentype="qname"/>name="qname"/>+ </identity>? </channelType>type="qname"/>+
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> <tokenname="tns:retailerRef"/> </reference> <identity> <tokentype="tns:retailerRef"/>name="tns:purchaseOrderID"/> </identity> </channelType>type="tns:purchaseOrderID"/>
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"? mutable="true|false"? free="true|false"?informationType="qname"|channelType="qname"silentAction="true|false"?silent="true|false"? roleTypes="list of qname"? />+ </variableDefinitions>roleType="qname"?
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 the Variable as the Role Types using the attribute roleTypes
.
Expressions can be used within WS-CDL to obtain existing information and to create new or change existing information.are
Generic expressions and literals can be used for populating a Variable. Predicate expressions can be used within WS-CDL to specify conditions. Query expressions are used within WS-CDL to specify query strings.are
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 Sectionthe following section. The function extensions are defined in the standard WS-CDL namespace 10."http://www.w3.org/2004/12/ws-chor/cdl". The prefix "cdl:" is associated with this namespace."http://www.w3.org/2004/10/ws-chor/cdl".
There are several functions that needsthe WS-CDL specification supplies as XPATH 1.0 extension functions. These functions can be used tobyaChoreography.Tokensdifferfromin VariablesthatVariablescontainvalueswhereasTokenscontaininformationthatany XPath expression as long as the definespiecetypes are compatible:of
xsd:time getCurrentTime(xsd:QName roleName)
Returns the datathatisrelevant.ForexampleaTokenfor"OrderAmount"withinanOrderXMLdocumentcouldbeancurrent time at the caller for aliasanexpressionthatpointedthe toOrderAmountelementwithintheOrderXMLdocument.ThiscouldthenbeusedaspartRole specified by roleName (for example a ofconditionthatRole can ask only about it,s own time).controls
xsd:date getCurrentDate(xsd:QName roleName)
Returns the orderingofacurrent date at the caller for the Role specified by roleName (for example Choreography,"OrderAmount>$1000".AllTokensMUSThaveaninformationType,forexample,an"OrderAmount"wouldbeoftype"amount","OrderId"couldbealphanumerica andcounteraninteger.TokenstypesRole can ask only about it,s own date).reference
xsd:dateTime getCurrentDateTime(xsd:QName roleName)
Returns the current date and time at the caller for the Role specified by roleName (for example a documentfragmentRole can ask only about it,s own date/time).within
xsd:boolean hasDurationPassed(xsd:duration elapsedTime, xsd:QName roleName)
Returns "true" if, (a) used in a ChoreographydefinitionandTokenLocatorsguard or repetition condition of a providequeryWork Unit with the block attribute set to mechanismselectthem.Byintroducingthese"true" or in a complete condition of a Choreography abstractions,definitionavoidsdependingonspecificmessagetypes,asand (b) the duration specified by describedWSDL,oraspecificquerystring,elapsedTime at the caller for the Role specified by asXPATH,butroleName has elapsed from the time either the insteadquerystringcanchangewithoutguard or the repetition condition were enabled for matching or the Choreography affectingdefinition.Thewas enabled. Otherwise it returns "false".syntax
xsd:boolean hasDeadlinePassed(xsd:dateTime deadlineTime, xsd:QName roleName)
Returns "true" if, (a) used in a guard or repetition condition of a Work Unit with the tokenconstructis:;<tokenname="ncname"informationType="qname"/>block attribute Thenameisusedforset to "true" or in a specifyingdistinctnameforeachtokenelementdeclaredcomplete condition of a Choreography withinPackage.TheattributeinformationTypeand (b) the identifiestypetime specified by deadlineTime at the ofdocumentfragment.ThesyntaxRole specified by roleName has elapsed given that either the oftokenLocatorconstructis:;<tokenLocatortokenName="qname"informationType="qname"query="XPath-expression"?/>TheattributetokenNameguard or the identifiesrepetition condition were enabled for matching or the Choreography was enabled. Otherwise it returns "false".name
xsd:string createNewID()
Returns a new globally unique value of XML-Schema 'string' type.
xsd:any getVariable(xsd:string varName, xsd:string part, xsd:string documentPath, xsd:QName roleName?)
Returns the Tokeninformation of the thatdocumentfragmentlocatorisassociatedVariable with name varName as a node set containing a single node. The with.attributeinformationTypesecond parameter, part, specifies the identifiestypeonmessage part of a WSDL1.1 document. For a WSDL 2.0 document it MUST be empty. When the whichthird parameter documentPath is queryperformedtoempty, then this function retrieves the locateToken.Theattributequeryentire document from the definesquerystringVariable information. When it is thatusedtoselectanon-empty, then this function retrieves from the Variable information, the fragment documentwithinaof the document at the provided absolute location path. The document.examplebelowshowsfourth parameter is OPTIONAL. When the thatTokenfourth parameter is "purchaseOrderID"oftypexsd:int.ThetwotokenLocatorsshowhowtoaccessthistokenin"purchaseOrder"and"purchaseOrderAck"messages.;<tokenname="purchaseOrderID"informationType="xsd:int"/><tokenLocatortokenName="tns:purchaseOrderID"informationType="purchaseOrder"query="/PO/OrderId"/><tokenLocatortokenName="tns:purchaseOrderID"informationType="purchaseOrderAck"query="/POAck/OrderId"/>2.4.4Choreographies.Theoperationalsemanticsoftheserulesarebasedused, the oninformation-drivencomputationalmodel,whereavailabilityofVariable information variablecausesaguardedunit-of-workanditsenclosedactionsMUST be toenabled.AChoreography.definesavailable at the re-usablecommonrules,thatRole specified by roleName. If this parameter is not used then the governorderingofexhangedmessagesRole is inferred from the andprovisioningpatternsofcollaborativebehavior,agreedbetweentwoormoreinteractingpeer-to-peerpartiesAChoreographydefinedcontext that this function is used.at
xsd:boolean isVariableAvailable(xsd:string varName, xsd:QName roleName)
Returns "true" if the Packageinformation of the Variable with name varName is levelavailable at the Role specified by roleName. Returns "false" otherwise.called
xsd:boolean variablesAligned(xsd:string varName, xsd:string withVarName, xsd:QName relationshipName)
Returns "true" if within a top-levelChoreography,anddoesnotshareitsRelationship specified by relationshipName the Variable with contextothertop-levelChoreographies.APackageMAYcontainexactlyonetop-levelChoreography,markedexplicitlyname varName residing at the asrootChoreography.AChoreographyfirst Role of the definesRelationship has aligned its information with the re-usablecommonrules,thatVariable named withVarName residing at the governsecond Role of orderingexhangedmessagesthe andprovisioningRelationship.patterns
xsd:any getChannelReference(xsd:string varName)
Returns the reference information of behavior,the asaction(s)Variable with name varName. The Variable MUST be of Channel Type.performing
xsd:any getChannelIdentity(xsd:string varName)
Returns the actualwork,suchasidentity information of exchangemessages,the whenspecifiedorderingconstraintsareVariable with name varName. The satisfied.re-usablebehaviorencapsulatedwithinaChoreographyVariable MUST be MAYperformedwithinanenclosingChoreography,thusfacilitatingrecursivecomposition.TheperformedChoreographyisthencalledanenclosedChoreography.Theof Channel Type.Choreography
xsd:boolean globalizedTrigger(xsd:string expression, xsd:string roleName, xsd:string expression2, xsd:string roleName2, . . .)
Combines expressions that isperformedMAYbedefinedeither:Locally-theyarecontained,inthesameChoreographydefinitionastheinclude Variables that ChoreographyperformedthemGlobally-are theyspecifiedinaseparatetop-levelChoreographydefinitionthatdefined isinthesameorinat different aChoreographyPackageandcanbeusedbyotherChoreographiesandhencethecontractisreusableAChoreographyMUSTcontainatRoles. Only one leastRelationshipType,enumeratingtheobservablebehaviorthisChoreographyrequiresitspartiestoexhibit.OneormoreRelationshipTypesexpression MUST be defined MAYwithinaChoreography,modelingmulti-partycollaborations.AChoreographyactsasalexicalnamescopingcontextforper Role name.Variables.
xsd:boolean cdl:hasExceptionOccurred(xsd:string exceptionType)
Returns "true" if an Exception of Exception Type identified by the parameter exceptionType has occurred. Otherwise it returns "false".
A VariabledefinedinaToken is Choreographyan alias for visiblea piece of data in usethisChoreographyandallitsenclosedChoreographiesup-tothepointthattheVariableisre-definedasannon-freeVariable,thusa formingChoreographyVisibilityHorizonforVariable this.AChoreographyMAYcontainor onemoreChoreographymessage that definitionsneeds to be MAYperformedonlylocallywithinused by a Choreography. thisAChoreographyTokens differ from Variables in that Variables contain MUSTanActivity-Notation.TheActivity-Notationvalues whereas Tokens contain information that define the specifiesenclosedpiece of the actionsdata that Choreographyperformtheactualwork.is relevant.A
All Tokens MUST have an informationType, for example, an "Order Id" could be 'alphanumeric' and a "counter" an 'integer'.
Tokens reference a document fragment within a Choreography canrecoverfromexceptionaldefinition and Token Locators provide conditionsfinalizationa query mechanism to select them. By introducing these abstractions, a Choreography definition avoids depending on specific message types, as described by actionsdefining:OneExceptionblock,whichMAYbeWSDL, or a specific query string, as specified by XPATH. Instead the document part definedand the ofChoreographytorecoverfromexceptionalconditionsquery string can thatoccurinthatenclosingChoreographyOneFinalizerblock,whichMAYbedefinedaspartoftheChoreographytochange without affecting the providefinalizationactionsforthatChoreography enclosingTheChoreography-Notationisusedtodefineadefinition.Choreography.
The syntax is:;of the token construct is:<choreography
<token name="ncname"complete="xsd:booleanXPath-expression"?isolation="dirty-write"|"dirty-read"|"serializable"?root="true"|"false"?><relationshiptype="qname"/>+variableDefinitions?Choreography-Notation*Activity-Notation<exceptionname="ncname">WorkUnit-Notation+</exception>?<finalizername="ncname">WorkUnit-Notation</finalizer>?informationType="qname" /></choreography>
The attribute name
is used for specifying a distinct name for each
element declared within a Choreography Package.tokenchoreography
The optionalattribute complete
identifies the allowstoexplicitlycompleteaChoreographyasdescribedbelowinformationTypeinChoreographyLife-linetype of the document fragment. section.
The syntax of the tokenLocator construct is:
<tokenLocator tokenName="qname" informationType="qname" part="ncname"? query="XPath-expression" />
The optionalattribute isolation
identifies the name of the Token that the document fragment locator is specifieswhenVariabletokenNameinformationdefinedinanenclosing,andchangedwithinanenclosedChoreographyisavailabletoitssiblingChoreographies:Whenassociated with.isolation
The attribute informationType
identifies the type of the document on which the query is performed to setlocate the "dirty-write",VariableinformationMAYbeimmediatelyoverwrittenbyactionsinotherChoreographiesWhenToken.isolation
The OPTIONAL attribute part
defines the document part on which the query is performed to setlocate the "dirty-read",VariableinformationToken. This attribute SHOULD NOT be MAYimmediatelyvisibleforreadbutdefined for notwritetootherChoreographiesWhena WSDL 2.0 document.isolation
The attribute query
defines the query string that is used to set"serializable",theVariableinformationMUSTbevisibleforselect a document fragment within a document or readforwritetootherChoreographiesonlyafterthisChoreographyhasendeda document part.successfully
The relationshipelementwithinthechoreographyelementexample below shows that the enumeratesRelationshipsthisChoreographyMAYparticipateToken "purchaseOrderID" is of XML-Schema type 'int'. The in.optionalvariableDefinitionselementtwo Token Locators show how to access this Token in the enumerates"purchaseOrder" and "purchaseOrderAck" messages.Variables
<token name="purchaseOrderID" informationType="xsd:int"/> <tokenLocator tokenName="tns:purchaseOrderID" informationType="purchaseOrder" query="/PO/OrderId"/> <tokenLocator tokenName="tns:purchaseOrderID" informationType="purchaseOrderAck" query="/POAck/OrderId"/>
A Choreography defines re-usable common rules, that govern the ordering of exhanged messages and the provisioning patterns of collaborative behavior, agreed between two or more interacting parties.
A Choreography defined inthisChoreography.Theoptionalrootelementat the Choreography Package level is called a top-level Choreography, and does not share its context with other top-level Choreographies. A Choreography Package MAY contain exactly one top-level Choreography, marked explicitly as the root Choreography. The root Choreography marksofis the only top-level Choreography athat is enabled by default. Package.
The optionalre-usable behavior encapsulated within Choreography-NotationthechoreographyelementdefinestheChoreographiesa Choreography MAY be performed thatwithin onlythisan enclosing Choreography, thus facilitating composition. The Choreography.optionalexceptionelementperformed Choreography is then called an enclosed Choreography and MAY be defined:defines
Locally - its definition is contained within the Exceptionblockenclosing Choreographyof
Globally - a separate top-level, non-root Choreography byspecifyingoneormoreExceptionWorkUnit(s).Theoptionalfinalizerelementdefinition is specified in the definesFinalizerblocksame or in a different Choreography ofbyspecifyingoneFinalizerWorkUnit.2.4.5WorkUnitsAWorkUnitprescribesthePackage that constraintscan be mustfulfilledformakingprogressandthusperformingactualworkwithinaChoreography.ExamplesofaWorkUnitinclude:ASendPOWorkUnitthatincludesInteractionsfortheBuyertosendanOrder,theSuppliertoacknowledgetheused by other Choreographies and order,thenlateraccept(orhence the reject)Order.ThisWorkUnitwouldprobablynothaveaguardconditionAnOrderDeliveryErrorWorkUnitcontract described becomes reusablethat
A non-root Choreography is performedenabled when performed.whenever
A Choreography MUST contain at least one Relationship Type, enumerating the PlaceOrderWorkUnitdidnotobservable behavior this Choreography requires its parties to exhibit. One or more Relationship Types MAY be defined within a reach"normal"conclusion.ThiswouldChoreography, modeling multi-party collaborations.have
A Choreography acts as a guardlexical name scoping context for Variables. A Variable defined in a Choreography is visible for use in this Choreography and all its enclosed Choreographies up-to the point that conditionthe identifiesVariable is re-defined as an non-free Variable, thus forming a Choreography Visibility Horizon for this Variable.error
A ChangeOrderWorkChoreography MAY contain one or more Choreography definitions that UnitMAY be performed canwheneveranorderacknowledgementmessagehasbeenreceivedandanorderrejectionhasnotbeenonly locally within this Choreography.received
A WorkUnitMAYprescribetheconstraintsthatChoreography MUST contain an Activity-Notation. The Activity-Notation specifies the preserveactions of the consistencycollaborationscommonlyperformedChoreography that perform the betweenparties.UsingaWorkUnitanactual work. These actions are enabled when the Choreography they belong to is enabled.application
A Choreography can recover from exceptional conditions by defining one Exception Block, which MAY be defined as part of the Choreography to recover from exceptional conditions that faultsaretheresultofabnormalactionsandalsoMAYfinalizecompletedcan occur.actions
An enclosed Choreography that has successfully completed MAY need to belogicallyrolledback.Whenenabled,aWorkUnitexpressesinterest(s)provide finalization actions that confirm, cancel or otherwise modify the oneffects of its completed actions. To handle these modifications, one or more availabilityVariableinformationthatalreadyexistorseparate Finalizer Block(s) MAY be willcreatedinthefuture.TheWorkUnit'sinterest(s)arematchedwhenalltherequiredVariableinformationareorbecomeavailableandthespecifiedmatchingconditionontheVariableinformationismet.AvailabilityofsomeVariableinformationdoesnotdefined for an enclosed Choreography.mean
A Choreography can also be coordinated. Choreography Coordination guarantees that aWorkUnitmatchesimmediately.Onlyall whenVariableinformationrequiredbyaWorkUnitbecomeavailable,involved Roles agree on how the inappropriateVisibilityHorizon,doesmatchingsucceed.VariableinformationavailablewithinChoreography aMAYbematchedwithaWorkUnitthatwillbeenabledended. That is, if the infuture.Choreography completed successfully or OnemoreWorkUnitsMAYbematchedconcurrentlyiftheirrespectiveinterestsarematched.WhenaWorkUnitmatchingsucceedsthenitsenclosedactionsareenabled.AWorkUnitMUSTsuffered an containActivity-NotationthatException, and if the performsactualwork.AWorkUnitChoreography completed successfully completesand Finalizer Block(s) were installed, all whenitsenclosedactionscompletesuccessfully.AWorkUnitthatcompletessuccessfullyMUSTbeconsideredagainformatching(basedonitsguardcondition),ifitsrepetitionconditionevaluatestoRoles have the same Finalizer Block enabled."true".
The Choreography-Notation is WorkUnit-Notationused to define a Choreography as definedfollows:;follows:<workunit
<choreography name="ncname"guard="xsd:booleanXPath-expression"?complete="xsd:boolean XPath-expression"?repeat="xsd:booleanisolation="true"|"false"? root="true"|"false"? coordination="true"|"false"? > <relationship type="qname" />+ variableDefinitions? Choreography-Notation* Activity-Notationblock="true|false"?<exceptionBlock name="ncname"> WorkUnit-Notation+ </exceptionBlock>? <finalizerBlock name="ncname"> WorkUnit-Notation </finalizerBlock>* </choreography></workunit>
The Activity-Notationspecifiestheenclosedactionsattribute ofname
is used for specifying a Workdistinct name for each Unit.choreography
element declared within a Choreography Package.
The guardconditionOPTIONAL ofcomplete
attribute allows to explicitly complete a WorkUnit,specifiedbytheoptionalguardattribute,describestheinterestChoreography as described below in the onavailabilityofoneormore,existingorfutureVariableChoreography Life-line section.information.
The optionalOPTIONAL repeatisolation
attribute allows,whentheconditionspecifies itevaluatestowhen a Variable defined in an enclosing Choreography, and changed within an enclosed Choreography is available to "true",makethecurrentWorkUnitconsideredagainformatching(basedontheguardits sibling Choreographies. The attribute).default for this attribute optionalblockspecifieswhetherthematchingconditionreliesis set to "false". The following rules apply:on
When isolation
is set to "false", the Variable information MAY be immediately overwritten by actions in its sibling Choreographiesthat
When isolation
is currentlyavailable,orwhethertheWorkUnitset to "true", changes to hasblockwaitingthe Variable information MUST be visible for read or for write to forbecomeavailableinthefutureifits sibling Choreographies only after this Choreography has completedit
The OPTIONAL coordination
attribute specifies whether Choreography Coordination is notcurrentlyrequired. The default for this attribute is set to "false". The following rules apply:available.
When aguardthe conditioncoordination
attribute is notspecifiedset to "true", Choreography Coordination is required and a Coordination protocol MUST ensure that all the thenWorkUnitalwaysRoles agree on how the Choreography endedmatches
When arepetitionconditionisnotspecifiedthe then
attribute is WorkcoordinationUnitnotconsideredagainformatchingset to "false", the afterWorkUnitgotmatchedonceWhenaguardconditionorrepetitionChoreography is conditionspecifiedthen:OneormoreVariablescanbespecifiednot bound to a inguardconditionorrepetitioncondition,usingCoordination protocol, and since none of the XPATHWS-CDLfunctions,asdescribedinSection10.TheWS-CDLfunctiongetVariable()isusedabove guarantees of agreement on the inguardorrepetitionconditiontooutcome apply any required coordination SHOULD be performed using explicitly modeled Interactionsobtain
The relationship
element within the choreography element enumerates the Relationships this Choreography MAY participate in.information
The OPTIONAL variableDefinitions
element enumerates the Variables defined in this Choreography.
The OPTIONAL root
element marks a top-level Choreography as the root Choreography of a VariableChoreography Package.When
The OPTIONAL Choreography-Notation within the
element defines the WS-CDLfunctionisVariableAvailable()isusedchoreographyinguardorrepetitioncondition,itLocally defined Choreographies that MAY be performed only within this Choreography.means
The OPTIONAL exceptionBlock
element defines the Exception Block of a Choreography by specifying one or more Exception Work UnitthatUnit(s) using a WorkUnit-Notation. Within this element, the specifiesguardattribute conditionname
is checkingused for specifying a ifVariableisalreadyavailablename for this Exception Block element.at
The OPTIONAL finalizerBlock
element defines a specificRoleorisFinalizer Block for a waitingVariabletobecomeavailableChoreography. A Choreography MAY have more than one Finalizer Blocks. Each Finalizer Block specifies one Finalizer Work Unit using a atspecificRole,basedWorkUnit-Notation. If a Choreography defines more than one Finalizer Blocks, then each MUST be differentiated by a distinct name as specified with the on
attribute nameblockbeing"false"or"true"respectivelywithin the When
element.WS-CDLfunctionvariablesAligned()isusedfinalizerBlockin
A Work Unit can prescribe the guardorrepetitioncondition,itconstraints that meanshave to be fulfilled for making progress and thus performing actual work within a Choreography. A Work Unit can also prescribe the constraints that thepreserve the specifiesguardorrepetitionconditionischeckingorwaitingforanappropriatealignmentInteractiontohappenbetweenthetwoRoles,basedconsistency of the onblockattributebeing"false"or"true"respectively.collaborations commonly performed between the WhenvariablesAligned()WS-CDLfunctionisusedparties. Using a inguardorrepetitioncondition,thentheRelationshipTypewithinthevariablesAligned()MUSTWork Unit an application can recover from errors that are the beresult of subsettheRelationshipabnormal actions and can also finalize successfully completed Choreographies that need further action, for example to confirm or logically roll back effects, or to close the TypeimmediateChoreography enclosingdefines.IfVariablesso that any defined areatdifferentRoles,thenthey"rollback" Work Unit will not be cancombinedtogetherenabled. Examples of a inguardconditionorrepetitionconditionusingonlytheglobalizedTrigger()WS-CDLfunctionIfVariablesaredefinedatthesameRole,thenWork Unit include:they
A "Change Order" Work Unit that can be combinedtogetherinaguardconditionorrepetitionconditionusingallavailableXPATHperformed whenever an order acknowledgement message has been received and an order rejection has not been receivedoperators
An "Order Delivery Error" Work Unit that is performed whenever the WS-CDLfunctions"Place Order" Work Unit did not reach a 'normal' conclusion. This would have a constraint that identifies the exceptglobalizedTrigger()WS-CDLfunctionerrorWhen
The guard condition of a Work Unit, if specified, expresses the attributeblockissetto"true"interest on one or more andVariable(s)arenotavailable,Variable information (that already exist or will become available in the future) being available under certain prescribed constraints. The Work thenUnit's expressed interest MUST Unitblockbe matched for waitingtheVariableits enclosed actions to informationbecomeavailable.ThisattributeMUSTbe notusedinenabled.Exception
A Work Units.WhentheVariableinformationspecifiedbytheguardconditionbecomeavailablethentheguardconditionisevaluated:IfUnit completes successfully when all its enclosed actions complete successfully.the
A Work Unit that completes successfully MUST be considered again for matching (based on its guard condition), if its repetition condition evaluates to "false",then"true".the
The WorkUnit-Notation is used to define a Work Unit matchingfailsandas follows:the
<workunit name="ncname" guard="xsd:boolean XPath-expression"? repeat="xsd:boolean XPath-expression"? block="true|false"? > Activity-Notationenclosedwithin</workunit>the
The attribute name
is used for specifying a name for each Work Unit isskippedelement declared within a Choreography Package.and
The Activity-Notation specifies the repetitionconditionevenifspecifiedisnotevaluatedenclosed actions within a Work Unit.If
The OPTIONAL attribute guard
specifies the guard condition evaluatesto"true",thenof a Work theUnitismatchedandUnit.then
The OPTIONAL attribute repeat
specifies the repetition condition,ifspecified,isevaluatedcondition of a Work Unit.when
The OPTIONAL attribute block
specifies whether the VariableinformationspecifiedWork Unit has to block waiting for referenced Variables within the byguard condition to become available repetition(if they are not already) and the Ifguard condition repetitionto evaluatesevaluate to "true". This attribute MUST always be set to "false" in Exception Work Units. The default for this attribute is set to "false"."true",
The following rules apply:
When a guard condition is not specified then the Work Unit isconsideredagainformatchingIfalways matchesthe
One or more Work Units MAY be matched concurrently if their respective expressed interests are matched
When a repetition condition evaluatestois not specified then the Work Unit is not considered again for matching "false",Whentheattributeblockissetto"false",after the thenguardconditionorWork Unit was matched oncerepetition
One or more Variables can be specified in a guard condition assumesthattheVariableinformationiscurrentlyavailableIfor repetition condition, using XPATH and the eitherVariableWS-CDL functions, as described in Section 2.4.3.1information
The WS-CDL function getVariable
is notavailableused in the guard or repetition condition orto evaluates"false",obtain the thenWorkUnitmatchingfailsinformation of a Variableand
When the Activity-NotationenclosedWS-CDL function withinisVariableAvailable
is used in the guard or repetition condition, it means that the Work Unit isskippedthat specifies the guard or repetition condition andevenifis specifiednotevaluatedIfmatchingsucceeds,thentherepetitionchecking if condition,specified,isevaluatedimmediatelyIfeithera Variable theis informationnotalready available at a specific Role or currentlytherepetitionconditionevaluatesto"false",thentheWorkUnitisnotconsideredagainformatchingOthewise,thentheWorkis Unitconsideredwaiting for againmatchingTheexamplesbelowdemonstratethepossibleusea ofWorkUnit:a.ExampleVariable to become available at a ofWorkUnitspecific Role, based on the withblock
equalsattribute being "false" or "true" to:respectivelyIn
When the WS-CDL function variablesAligned
is used in the guard or repetition condition, it means that the Work followingUnit that specifies the guard or repetition condition Unit,is checking or waiting for an appropriate alignment Interaction to happen between the two Roles, based on the waits
attribute being "false" or "true" respectively. The Variables checked or waited for alignment are the availabilityofPOAcknowledgementatcustomerRoleandifitisalreadyblockavailable,activityhappens,sending and receiving ones in an alignment Interaction or the otherwise,activitywaitsones used in the untilVariablePOAcknowledgementbecomerecordings at the availablecustomerRole.;<workunitname="POProcess"guard="cdl:isVariableAvailable(cdl:getVariable("POAcknowledgement"),"tns:customer")"block="true">...<!--someactivity--></workunit>b.two Roles at the ends of an alignment Interaction. When the ExamplevariablesAligned
WS-CDL function is used in a WorkUnitwithblockequalsto"false":guard or repetition condition, then the InfollowingWorkRelationship Type within the Unit,variablesAligned
MUST be the subset of the Relationship Type that the immediate enclosing Choreography defines
Variables defined at different Roles MAY be used in a guard condition checksifor repetition condition to form a globalized view, thus combining constraints prescribed for each Role but without requiring that all these constraints have to be fullfilled for progress to be made. The globalizedTrigger WS-CDL function MUST be used in a guard condition or repetition condition in this case. Variables defined at the StockQuantitysame Role retailerMAY be combined together in a guard condition or repetition condition using all available XPATH operators and isisgreaterthan10andifall the so,activityWS-CDL functionshappens.
If the eitherattribute Variableblock
is set to "true" and one or more required Variable(s) are not available or the valueislessthan10,theguard condition matchingis"false"evaluates to "false", then the andactivityisskipped.;<workunitname="Stockcheck"guard="cdl:getVariable("StockQuantity","/Product/Qty","tns:retailer")>10)"block="false">...<!--someactivity--></workunit>.c.ExampleofWork Unit awaitingforalignmenttohappen..MUST block. When the InfollowingWorkrequired Variable information specified by the guard condition Unit,waitsforanalignmentbecome available and the guard condition evaluates to Interactionhappen"true", then the betweencustomerRoleWork Unit is matched. If the andretailerRole:;<workunitname="WaitForAlignment"guard="cdl:variablesAligned("PurchaseOrderAtBuyer","PurchaseOrderAtSeller","customer-retailer-relationship")"block="true">...<!--someactivity--></workunit>2.4.6IncludingChoreographiesChoreographiesorfragmentsofChoreographiescanbesyntacticallyreusedinanyChoreographydefinitionbyusingXInclude[27].TheassemblyoflargeChoreographydefinitionsfrommultiplesmaller,wellformedChoreographiesorChoreographyrepetition condition is fragmentsenabledusingthismechanism.TheexamplebelowshowsapossiblesyntacticreuseofaChoreographydefinition:;<choreographyname="newChoreography"root="true">...<variablename="newVariable"informationType="someType"role="randomRome"/><xi:includehref="genericVariableDefinitions.xml"/><xi:includehref="otherChoreography.xml"xpointer="xpointer(//choreography/variable[1])/>...</choreography>2.4.7ChoreographyLife-lineAChoreographylife-lineexpressestheprogressionofacollaboration.Initially,thecollaborationMUSTbespecified, then started,workMAYbeperformedwithinitandit finallyMAYcomplete.Thesedifferentphasesareis evaluated when the Work Unit completes successfully. Then, if the required Variable information specified by designatedexplicitlymarkedactionsthe withinChoreography.Therootrepetition condition is available and the Choreographyonlytop-levelChoreographythatMAYbeinitiated.Therootrepetition condition evaluates to "true", the Work Unit is Choreographyenabledwhenconsidered again for matching. Otherwise, the Work Unit is itinitiated.Allnon-root,top-levelChoreographiesMAYbeenabledwhenperformed.Arootnot considered again for matchingChoreography
If the attribute block
is initiatedset to "false", then the whenfirstInteraction,markedguard condition or repetition condition assumes that the asChoreographyVariable information is initiator,performed.currently available. If either the Variable information is not available or TwomoreInteractionsMAYbemarkedasinitiators,indicatingalternativeinitiationactions.Inthisthe case,firstactionwillguard condition evaluates to "false", then the initiateWork Unit matching fails and the ChoreographyotheractionswillenlistwiththealreadyinitiatedChoreography.AnInteractiondesignatedasaChoreographyinitiatorMUSTActivity-Notation enclosed within the befirstactionperformedinaChoreography.IfaChoreographyhastwoorWork moreUnitswithInteractionsmarkedasinitiators,thenthesearemutuallyUnit is skipped and the exclusiveChoreographywillbeinitiatedwhenthefirstInteractionoccursrepetition condition is not evaluated even if specified. Otherwise, if the andWork remainingUnitswillbedisabled.Unit matching succeeds, then the AllInteractionsnotmarkedasinitiatorsindicatethattheywillenlistwithanalreadyinitiatedChoreography.AChoreographycompletesrepetition condition, if specified, is evaluated when successfullytherearenomorematchedWorkUnit(s)performingworkwithinitandtherearenothe Work enabledUnit(s)withinit.Alternatively,aUnit completes Choreographysuccessfully. Then, if successfullyitscompletecondition,the required Variable information specified by the definedoptionalcompleteattributerepetition condition is available and the withinchoreographyrepetition condition evaluates to element,"true"thereMUSTNOTbeany"true", the Work matchedUnit(s)performingworkwithinitbutthereMAYbeoneorUnit is considered again for matching. Otherwise, the Work moreUnitsstillenabledUnit is not butmatchedyet.2.4.8ChoreographyRecoveryOneormoreExceptionWorkUnit(s)MAYbedefinedasconsidered again for matchingpart
The examples below demonstrate some usages of a ChoreographytorecoverfromexceptionalconditionsthatcanoccurinthatChoreography.AFinalizerWorkUnitMAYbedefinedasWork Unit:part
a. Example of a Work Unit with block equals to Choreography"true": provide
In the finalizationactionsthatsemantically"undo"thatcompletedChoreography.2.4.8.1ExceptionBlockAChoreographycansometimesfailasaresultofanexceptionalcircumstanceorerror.Differenttypesofexceptionsarepossibleincludingthisnon-exhaustivelist:InteractionFailures,forfollowing Work Unit, the exampleguard condition waits on the availability of sendingamessagedidnotsucceedProtocolBasedExchangefailures,forexamplenoacknowledgementwasreceivedaspartofareliablemessagingprotocol[22]Securityfailures,forexampleaMessagewasrejectedbyarecipient"POAcknowledgement" at "Customer" Role and if it is already available, the becausedigitalsignaturewasnotvalidTimeouterrors,forexampleanInteractiondidnotcompleteactivity happens, otherwise, the withinrequiredtimeValidationErrors,forexampleanXMLorderdocumentwasnotwellformedordidnotconformtoitsschemadefinitionApplication"failures",foractivity waits until the examplegoodsorderedwereoutofstockTohandletheseandother"errors"separateExceptionWorkUnitsMAYbedefinedVariable "POAcknowledgement" become available at the inException"Customer" Role.Block
<workunit name="POProcess" guard="cdl:isVariableAvailable( cdl:getVariable("POAcknowledgement"), "", "", "tns:Customer")" block="true"> ... <!--some activity --> </workunit>
b. Example of a Choreography,foreach"exception"conditionthatneedstobehandled.AtleastoneWork Unit ExceptionMUSTbedefinedaspartofthewith block ExceptionofaChoreographyforthepurposeofequals to "false":handling
In the exceptionalconditionsoccurringonthatChoreography.Tohandlethese,anfollowing Work ExceptionUnitMAYexpressinterestonfaultinformationusingitsguardcondition.IfUnit, the guard condition checks if the Variable "StockQuantity" at the "Retailer" Role is nospecified,available and is greater than 10 and if so, the thendefaultExceptionWorkUnitexpressesinterestonanytypeoffault.activity happens. If either the WithinExceptionBlockofaChoreographythereMUSTNOTbeVariable is not available or its value is less than moreoneExceptionWorkUnitswithout'10', then the matching condition guarddefined.AnExceptionWorkUnitMUSTsetitsattributeblockalwaysis "false" and toMUSTNOTdefinearepetitioncondition.ExceptionWorkUnitsareenabledthe whenChoregraphytheybelongactivity is toenabled.Anskipped.Exception
<workunit name="StockCheck" guard="cdl:getVariable("StockQuantity", "", "/Product/Qty", "tns:Retailer") > 10)" block="false" > ... <!--some activity --> </workunit>
c. Example of a Work Unit MAYbeenabledonlyonce.waiting for alignment to happen: Exception
In the following Work UnitsenabledinaChoreographyMAYbehaveUnit, the asdefaultmechanismtorecoverfromguard condition waits for faultsallitsenclosedChoreographies.an alignment Interaction to happen between the WithinException"Customer" Role and the "Retailer" Role:Block
<roleType name="Customer"> . . . </roleType> <roleType name="Retailer"> . . . </roleType> <relationshipType name="Customer-Retailer-Relationship"> <role type="tns:Customer" /> <role type="tns:Retailer" /> </relationshipType> <workunit name="WaitForAlignment" guard="cdl:variablesAligned( "PurchaseOrderAtBuyer", "PurchaseOrderAtSeller", "tns:Customer-Retailer-Relationship")" block="true" > ... <!--some activity --> </workunit>
A Choreography life-line expresses the progression of a collaboration through enabled activities and enclosed Choreographies. Initially, the collaboration is established between parties, then work is performed within it and finally it ends.
A Choreography onlyoneExceptionWorkUnitMAYbematched.Therulesforis initiated, establishing a matchingfaultcollaboration when an Interaction, explicitly marked as arefollows:Ifaan Choreography Initiator, is faultmatchedperformed. This causes the byguardconditionofException anWorkUnit,Block to be installed and the thenactionsChoreography enters the ofmatchedWorkUnitareenabledforrecoveringEnabled State. Before this point there is no observable association between any of the fromfault.Whenparties. two
Two or more ExceptionWorkUnitsaredefinedInteractions MAY be marked as Choreography Initiators, indicating alternatives for establishing a collaboration. In this case, the thenorderofevaluatingtheirguardconditionsisbasedfirst performed Interaction will establish the onordercollaboration and the thatWorkUnitshavebeingdefinedother Interactions will enlist with the withinExceptionBlock.Ifnonealready established collaboration.of
A Choreography Initiator Interaction MAY be defined within a root Choreography or within an enclosed Choreography. In either case the guardcondition(s)match,thenifcollaboration is thereaestablished when the first Choreography Initiator Interaction is performed.default
A Choreography in an Enabled State, completes unsuccessfully, when an Exception WorkUnitwithoutaguardconditiondefinedis caused in the Choreography and its thenactionsareenabledforrecoveringException Block is enabled, if present. This causes the fromfaultChoreography to enter the Otherwise,Unsuccessfully Completed State. fault
The unsuccessfully completed Choreography, enters the Closed State once the Exception Block, if present, is notmatchedbycompleted. If the Exception anWorkUnitdefinedBlock is not present, the Choreography withininimplicitly enters the whichfaultClosed State and occurs,inthisthe casefaultwillbeException occurred is propagated to the recursivelyExceptionWorkUnitoftheenclosing Choreography.immediate
A Choreography untilamatchissuccessfulIfafaultin an Enabled State, completes successfully when there are no more enabled activities within occursaChoreography,its body. This causes its Exception Block to be deinstalled, Finalizer Blocks to be installed if specified, and the thenChoreography enters the Successfully Completed State. faulted
Alternatively, a Choreography completes unsuccessfullyandthissuccessfully if its causesFinalizercomplete condition, is matched by evaluating to WorkUnitdisabled.Theactions,includingenclosedChoreographies,enabled"true". A complete condition is considered for matching while the withinChoreography faultedarecompletedabnormallybeforeanExceptionWorkUnitcanbeis in Enabled State. The matched.actionswithintheExceptionWorkUnitMAYuseVariableinformationcomplete condition MUST be possible to be matched in all Roles that participate in the visibleVisibilityChoreography. When the complete condition of a Choreography is matched then all activities in the Choreography Horizonitbelongsare disabled, and the Choreography completes as totheystandatthecurrenttime.TheactionsofanExceptionWorkUnitMAYalsocausefault.Thesemanticsformatchingthefaultandactingonitarethesameasdescribedinthissection.2.4.8.2Finalizerif there were no more enabled activities within it. When a Choreography BlockencountersanexceptionalconditionitMAYneedtoreverttheactionsithadalreadycompleted,byprovidingfinalizationcompletes, all uncompleted enclosed Choreographies will automatically become completed. Messages that actionssemanticallyrollbackthewere sent as part of effectsthecompletedactions.Tohandlea theseseparateFinalizerWorkUnitisChoreography that has since completed MUST be ignored.defined
A Choreography, in a Successfully Completed State, enters the Closed State if no Finalizer BlockofBlocks were specified in that Choreography. a
A ChoreographyMAYChoreography, in a Successfully Completed State with Finalzer Block(s) specified enters the Closed State when one of its installed Finalizer defineWorkUnit.AFinalizerBlock(s) is enabled WorkUnitonlyaftertheChoreographyitbelongstocompletesand completed. The Finalizer successfully.WorkUnitmayBlock of a Choreography is enabled beonlyonce.TheactionswithintheFinalizerWorkUnitMAYuseVariableinformationby a finalize activity in the visibleVisibilityHorizonofimmediately enclosing Choreography. Alternatively, a Choreography theitbelongstoastheywereatthein Successfully Completed State with Finalzer Block(s) specified implicitly enters the Closed State when its enclosing Choreography timecompletedorastheystandenters the atcurrenttime.TheactionsClosed State without enabling the Finalizer ofWorkUnitMAYfault.Thesemanticsformatchingthefaultandactingonitarethesameasdescribedintheprevioussection.2.5ActivitiesActivitiesarethelowestlevelBlock(s) of componentstheChoreography,usedtodescribetheactualworkits enclosed Choreography. In other words, when a Choreography enters the performedspecifiedorderingClosed State, all its enclosed successfully completed Choreographies are constraintssatisfied.AnActivity-Notationistheneither:AnOrderingStructurewhichcombinesActivitieswithotherOrderingStructuresinanestedwaytoimplicitly entering the specifyorderingClosed State even if none of rulesactivitieswithintheir Finalizer Blocks has been enabled.the
A WorkUnit-NotationABasicChoreography can sometimes fail as a result of an exceptional circumstance or an "error" that Activityoccurred during its performance.performs
An Exception is caused in the actualwork.ABasicChoreography when an Exception Variable is Activitytheneither:AnInteraction,whichpopulated in an resultsexchangeofmessagesInteraction activity with the attribute betweencauseException
set to "true".
An Exception MUST be propagated to all parties andpossiblesynchronizationoftheirobservableinformationchangesin the andactualvaluesChoreography using explicitly modeled, Exception Causing Interactions when the ofexchangedinformationAPerform,whichmeansthatacomplete,separatelyChoreography is definedperformedAnAssign,whichassigns,withinonenot coordinated. This causes the Role,valueofoneChoreography to enter the VariablevalueofanotherVariableASilentAction,whichprovidesanexplicitdesignatorusedforspecifyingthepointwherepartyspecificoperation(s)withnon-observableoperationaldetailsException state and its Exception Block to be MUSTperformedANoenabled, if specified.Action
Different types of errors are possible including this non-exhaustive list:
Interaction Failures, whichprovidesanexplicitdesignatorfor usedexample the specifyingpointsending of a wherepartymessage did not doesperformanyaction2.5.1OrderingStructuresAnOrderingStructureissucceedone
Protocol Based Exchange failures, for example no acknowledgement was received as part of a reliable messaging protocol
Security failures, for example a Message was rejected by a recipient because the following:SequenceParallelChoice2.5.1.1SequenceThesequenceorderingstructurecontainsoneormoreActivity-Notations.Whenthesequenceactivityisdigital signature was not validenabled,
Timeout errors, for example an Interaction did not complete within the sequenceelementrequired timerestricts
Validation Errors, for example an XML "Order" document was not well formed or did not conform to its XML-Schema definition
Application "failures", for example the "goods ordered" were 'out of seriesenclosedActivity-Notationsstock'to
To handle these and other "errors" separate Exception Work Units MAY be enableddefined in the sequentially,sameorderthattheyaredefined.Thesyntaxofthisconstructis:;<sequence>Activity-Notation+</sequence>2.5.1.2ParallelTheparallelorderingstructurecontainsoneormoreActivity-Notationsthatareenabledconcurrentlywhentheparallelactivityisenabled.TheException Block of syntaxthisconstructis:;<parallel>Activity-Notation+</parallel>2.5.1.3ChoiceThechoiceorderingstructurea enablesWorkUnittoChoreography, for each Exception that defineonlyoneoftwoormoreActivity-Notationsneeds to be SHOULDperformed.Whenhandled.two
One or more activitiesarespecifiedException Work Unit(s) MAY be defined within the Exception Block of a inchoiceelement,Choreography. At least one onlyactivityisselectedandtheotheractivitiesaredisabled.IfthechoiceException Work hasUnitswithguardUnit MUST be defined as part of the conditions,Exception Block of a Choreography. An Exception Work Unit firstthatmatchesMAY express interest on Exception information using its guard condition on Exception Types or Exception Variables. If no guard condition is theselectedspecified, then the andException Work otherUnitsaredisabled.Ifthechoicehasotheractivities,Unit is itassumedthattheselectioncriteriacalled the foractivitiesarenon-observable.TheDefault Exception Work Unit and expresses interest on any type of syntaxthisconstructis:;<choice>Activity-Notation+</choice>Exception. Within the Inexamplebelow,choiceelementhastwoInteractions,Exception Block of a Choreography there MUST NOT be more than one Default Exception Work Unit. An Exception Work Unit MUST always set its block attribute to "false" and "processGoodCredit""processBadCredit".TheInteractionsMUST NOT define a repetition condition.have
Exception Work Units are enabled when the samedirectionality,participateException Block of the withinsameRelationshipandChoreography they belong to is enabled. Enabled Exception Work Units in a Choreography MAY behave as the havesamemechanism to recover from Exceptions occuring in this and fromRolestoRolesnames.its enclosed Choreographies.If
Within the Exception Block of a Choreography only one InteractionException Work Unit MAY be matched.happens,
The rules for matching an Exception are:
When an Exception Work Unit has a guard condition using the hasExceptionOccurred(exceptionType)
WS-CDL function, then it is matched when an Exception Variable with Exception Type that matches the otherparameter oneexceptionType
is disabled.;<choice><interactionchannelVariable="doGoodCredit-channel"operation="doCredit">...</interaction><interactionchannelVariable="badCredit-channel"operation="doBadCredit">...</interaction><choice>2.5.2Interactingpopulated using an Exception Causing Interaction activityAn
If an Exception is matched by the basicbuildingguard condition of blockaChoreography,whichresultsan Exception Work Unit, then the inactions of exchangeinformationbetweenpartiesandthe possiblymatched Work Unit are enabled. When two or more Exception Work Units are defined then the order of evaluating their synchronizationobservableinformationchangesguard conditions is based on the andvaluesorder that the ofexchangedinformation.AnInteractionWork Units have been defined within the formsbaseException Blockatom
If none of the recursiveChoreographycomposition,wheremultipleInteractionsarecombinedtoformaChoreography,whichguard condition(s) match, then canbeusedindifferentbusinesscontexts.Anif there is InteractioninitiatedwhenapartyplayingtherequestingRolesendsarequestmessage,a throughcommonChannel,Default Exception Work Unit without a topartyplayingtheacceptingRolethatreceivesthemessage.Theguard condition defined then its actions are enabledInteraction
If an Exception is continuednot matched by an Exception Work Unit defined within the whenacceptingparty,sendszerooroneresponsemessagebackChoreography in which the torequestingpartythatException occurs, the receivesresponsemessage.ThismeansanInteractionException will be canoneoftwotypes:AOne-WayInteractionthatrecursively propagated to the involvesException Work Unit of the immediate enclosing Choreography until a exchangingsinglemessageARequest-ResponseInteractionwhentwomatch is successfulmessages
If an Exception occurs within a Choreography, then the Choreography completes unsuccessfully. In this case its Finalizer Block(s) MUST NOT be installed. The actions, including enclosed Choreographies, within this Choreography are exchangedAnInteractionalsocontains"references"completed abnormally before an Exception Work Unit can be matchedto:
The Channelactions within the Exception Work Unit MAY use Variable Capturingthatinformation visible in the specifiesinterfaceandotherdatathatdescribewhereandVisibility Horizon of the howmessageChoreography it belongs to isbesentTheOperationthatspecifiesas they stand at the whatcurrent time.recipient
The actions of themessageshoulddowiththemessagewhenitisan Exception Work Unit MAY also cause an Exception. The receivedFromsemantics for matching the Exception and RoleToRoleacting on it are thatinvolvedTheInformationTypeorChannelthe same as described in this section.Type
After a Choreography instance has successfully completed, it MAY need to provide finalization actions that isbeingexchangedTheInformationExchangeCapturingVariablesconfirm, cancel or otherwise modify the atFromRoleeffects of its completed actions. To andRolethathandle these modifications, one or more separate Finalizer Block(s) MAY be defined for an enclosed Choreography. When its Choreography body completes successfully, any Finalizer Blocks specified in the aresourceandChoreography are installed.destination
If more than one Finalizer Blocks are defined for the MessageContentAsame Choreography, each of listpotentialobservableinformationchangesthem MUST be differentiated by their thatname
attributes. However, at most one Finalizer Block MAY be enabled for any given Choreography instance during the subsequent progress, including Exception handling and finalization, of the enclosing Choreography.occur
Finalizer Block(s) MAY implement whatever actions are appropriate for the particular Choreography. Common patterns might include:need
A single Finalizer Block to bealignedsemantically "rollback" the atFromChoreographyRole
Two Finalizer Blocks, for example one with name "confirm" and theToRole,one with name "cancel", to implement a asresultofcarryingtwo-phase outcome protocolout
One "undo" Finalizer Block along with a "close" Finalizer Block to signal that the Interaction2.5.2.1InteractionBasedInformationAlignmentInsomeChoreographiesthere"undo" Finalizer Block is no longer able to be mayarequirementthat,enabled, that is, the whenChoreography is Interactionnow closedperformed,
The actions within the Finalizer Work Unit MAY use Variable information visible in the RolesChoreographyhaveagreementVisibility Horizon of the onoutcome.MorespecificallywithinanInteraction,aRoleMAYChoreography it belongs to needhaveacommonunderstandingas they were at the ofobservableinformationcreationsorchangesofoneormoreStateCapturingVariablesthatarecomplementarytooneormoreStateCapturingVariablesofitspartnerRoleAdditionally,withinanInteractionaRoleMAYneedtohaveacommonunderstandingtime the ofvaluesChoreography completed for the ofInformationExchangeVariables CapturingatthepartnerRoleWithInteractionAlignmentboththebelonging to this Choreography and BuyertheSellerhaveacommonunderstandingthat:StateCapturingVariables,as such"OrderState",thatcontainobservablethey stand at the informationBuyerandSeller,havevaluesthatarecurrent time for the Variables belonging to complementaryeachother,e.g.Sentthe atBuyerandReceivedenclosing Choreography.at
The actions of a Finalizer Work Unit MAY fault. The semantics for matching the fault and Seller,InformationExchangeCapturingVariablesacting on it are the same havetypesas described in the withsamecontent,e.g.TheOrderVariablesprevious section.at
Choreography Coordination guarantees that all involved Roles will agree on how the BuyerandSellerChoreography ended. That is, all Roles will agree on whether the havesameInformationChoreography completed successfully or suffered an Exception, and Typesif the holdsameorderinformationInWS-CDLanChoreography completed successfully and Finalizer Blocks were installed, all Roles will agree on which Finalizer Block was enabled. Such agreement differs from Interaction alignmentMUSTbeexplicitlybased alignment in that the used,caseswheretwointeractingpartiesrequiretheChoreography as a whole is aligned, regardless of alignmenttheirobservableinformationchangesandtheirexchangedinformation.Afterthewhether each Interaction alignmentcompletes,bothpartiesprogressatthesamein time,alock-stepfashionthe andVariableinformationinbothCoordinated Choreography is aligned. partiesTheirVariablealignmentcomesfromthefactthattherequestingpartyIn contrast to hasAlignment Interactions, a Coordinated Choreography provides a larger unit of coordination - a set of Interactions that end with shared knowledge among all the knowacceptingpartyhasreceivedthemessageandtheotherwayaround,theacceptingpartyhastoparties that knowtherequestingpartyhassentthemessagebeforebothofthemprogress.their Relationship is Therenointermediatestate,whereonepartysendsamessageandthenitproceedsindependentlyortheotherpartyreceivesamessageandthenitproceedsindependently.2.5.2.2ProtocolBasedInformationExchangesTheone-way,requestorresponsein messagesanInteractionmayalsobeimplementeda usingProtocolBasedExchangedefined state. Such a whereseriesofunit need not be aligned at each step - it is only required that clear alignment points are messagesexchangedmade to accordingsomewell-knownprotocol,suchguarantee that all involved Roles will agree on how the asreliablemessagingChoreography ended. protocols
Choreographies defined inspecificationssuchasWS-Reliability[22].Inbothcases,thesameorsimilarmessagecontentmaybeas exchangedrequiring coordination must being bound to a insimpleInteraction,forCoordination protocol. When Choreography Coordination is not required, then the exampleexchangingofanOrderChoreography is not bound to a betweenCoordination protocol, and BuyeraSeller.Thereforesince none of the somesameinformationchangesmayresult.Howeverwhenprotocolssuchasthereliablemessagingprotocolsareused,additionalinformationchangeswilloccur.Forexample,ifaReliableMessagingprotocolwerebeingusedthentheBuyer,onceconfirmationofabove guarantees of agreement on the deliverymessagewasreceived,wouldalsoknowthattheSeller,s"OrderState"Variablewasinthestate"Received"eventhoughtherewasnoseparateInteractionthatdescribedthis.2.5.2.3InteractionLife-lineTheChannelthroughwhichanInteractionoccursisusedtodeterminewhethertoenlisttheInteractionwithanalreadyinitiatedChoreographyortoinitiateanewChoreography.WithinaChoreography,twoormorerelatedInteractionsoutcome apply any required coordination should be MAYgroupedtoformalogicalperformed using explicitly modeled Interactions.conversation.
The ChannelthroughwhichanInteractionoccursisusedtodeterminewhethertoenlisttheInteractionwithanalreadyinitiatedconversationortoinitiateanewimplications of Choreography Coordination differ for root Choreographies versus enclosed Choreographies:conversation.
An Interactioncompletesnormallywhentherequestandtheresponse(ifthereisone)completeenclosed Choreography MAY have one or more Finalizer Block(s). In this successfully.casethebusinessdocumentsandChannelsexchangedcase, coordination means that all Roles agree on whether the duringChoreography completed successfully or suffered an Exception, and requesttheresponse(ifthereisone)resultintheexchangedVariableinformationbeingalignedbetweenthetwoparties.AnInteractioncompletesif the abnormallyfollowingfaultsoccur:Thetime-to-completetimeoutidentifiesthetimeframeChoreography completed successfully and Finalizer Block(s) were installed, all Roles agree on which withinanInteractionMUSTcomplete.Ifthistimeoutoccurs,aftertheFinalizer Block was Interactionenabledinitiated
A root Choreography can also be coordinated, but it beforecompleted,thenafaultisgeneratedAfaultcannot have any Finalizer Block(s). In this case, coordination means that all Roles agree on whether the Choreography completed successfully or suffered an signalsexceptionconditionExceptionduring
In both cases, all Roles MUST agree on whether the managementofaChoreography completed successfully, or if an Exception occurs, all Roles MUST experience an Exception rather than successful completion. When an Exception occurs within a requestpartywhenprocessingtherequest2.5.2.4InteractionSyntaxThesyntaxChoreography, the ofinteractionconstructis:;<interactionname="ncname"channelVariable="qname"operation="ncname"time-to-complete="xsd:duration"?align="true"|"false"?initiate="true"|"false"?Coordination protocol will throw an Exception to Roles which have not otherwise detected the Exception that occurred>
The two examples below show two usages of Coordinated Choreographies.
Example 1: Coordinated credit authorization without Finalizer Block(s): <informationType name="creditDeniedType" exceptionType="true"/> <!-- Coordinated CreditAuthorization choreography without Finalizer Block(s)--> <choreography name="CreditAuthorization" root="false" coordination="true"> <relationship type="tns:CreditReqCreditResp"/> <variableDefinitions> <variable name="CreditExtended" informationType="xsd:int" silent="true" roleTypes="tns:CreditResponder"/> <variable name="creditRequest"/> <variable name="creditAuthorized"/> <variable name="creditDenied" informationType = "creditDeniedType"/> </variableDefinitions> <!-- the normal work - receive the request and decide whether to approve --> <interaction name="creditAuthorization" channelVariable="tns:CreditRequestor" operation="authorize"> <participaterelationship="qname"fromRole="qname"toRole="qname"relationshipType="SuperiorInferior" fromRole="tns:Superior" toRole="Inferior"/> <exchange/>name="ncname"informationType="qname"?|channelType="qname"?action="request"|"respond"name="creditRequest" informationType="creditRequest" action="request"> <send>variable="XPath-expression"?recordReference="listofncname"?variable="tns:creditRequest"/> <receive/>variable="XPath-expression"?recordReference="listofncname"?/></exchange>*<recordname="ncname"when="before"|"after"><sourcevariable="XPath-expression"/><targetvariable="XPath-expression"/>variable="tns:creditRequest"/> </exchange> <exchange name="creditAuthorized" informationType="creditAuthorizedType" action="respond"> <send variable="tns:creditAuthorized"/> <receive variable="tns:creditAuthorized"/> </exchange> <exchange name="creditDenied" informationType="creditDeniedType" action="respond"> <send variable="tns:creditDenied" causeException="true"/> <receive variable="tns:creditDenied" causeException="true"/> </exchange> </interaction></record>*ThechannelVariableattribute<!-- catch thespecifiesChannelVariablecontaininginformationofaparty,(application) exception - as an exception it will abort thebeingtargetchoreography --> <exceptionBlock name="handleBadCreditException"> <workunit name="handleBadCredit" > <interaction name="badCreditInteraction" channelVariable="tns:CreditResponder" operation="creditDenied"> <participate relationshipType="CreditReqCreditResp" fromRole="tns:Responder" toRole="CreditRequestor"/> </interaction> </workunit> </exceptionBlock> </choreography> Example 2: Coordinated credit authorization with Finalizer Block(s): <informationType name="creditDeniedType" exceptionType="true"/> <!-- Coordinated CreditAuthorization choreography with Finalizer Block(s) --> <choreography name="CreditAuthorization" root="false" coordination="true"> <relationship type="tns:CreditReqCreditResp"/> <variableDefinitions> <variable name="CreditExtended" informationType="xsd:int" silent="true" roleTypes="tns:CreditResponder"/> <variable name="creditRequest"/> <variable name="creditAuthorized"/> <variable name="creditDenied" informationType = "creditDeniedType"/> </variableDefinitions> <!-- theofInteraction,whichisusedfordeterminingwhereandhowtonormal work -receive the request andsendreceivedecide whether toinformationandapprove --> <interaction name="creditAuthorization" channelVariable="tns:CreditRequestor" operation="authorize"> <participate relationshipType="SuperiorInferior" fromRole="tns:Superior" toRole="Inferior"/> <exchange name="creditRequest" informationType="creditRequest" action="request"> <send variable="tns:creditRequest"/> <receive variable="tns:creditRequest"/> </exchange> <exchange name="creditAuthorized" informationType="creditAuthorizedType" action="respond"> <send variable="tns:creditAuthorized"/> <receive variable="tns:creditAuthorized"/> </exchange> <exchange name="creditDenied" informationType="creditDeniedType" action="respond"> <send variable="tns:creditDenied" causeException="true"/> <receive variable="tns:creditDenied" causeException="true"/> </exchange> </interaction> <!-- catch theintoparty.TheChannelVariableused(application) exception - as aninInteractionMUSTbeavailableexception it will abort theattwoRoleschoreography and thebeforeInteractionoccurs.Atruntime,informationaboutaChannelVariableisexpandedfurther.ThisrequiresFinalizer Block(s) are not accessible --> <exceptionBlock name="handleBadCreditException"> <workunit name="handleBadCredit" > <interaction name="badCreditInteraction" channelVariable="tns:CreditResponder" operation="creditDenied"> <participate relationshipType="CreditReqCreditResp" fromRole="tns:Responder" toRole="CreditRequestor"/> </interaction> </workunit> </exceptionBlock> <!-- Finalizer Block(s) --> <!-- what to do if thethatmessagescredit is drawn down --> <finalizerBlock name="drawDown"> <!-- if there is no application content to send, this could just be an assignment to theinChoreographyalsocontaincorrelationinformation,forexamplebyincluding:Aprotocolheader,suchasaSOAPheader,thatstatecapturevariable creditExtended --> <workunit name="drawdown" > <interaction name="drawdownInteraction" channelVariable="tns:CreditRequestor" operation="drawDown"> <participate relationshipType="CreditReqCreditResp" fromRole="tns:CreditRequestor" toRole="CreditResponder"/> <exchange name="dummy" action="request"> <send></send> <receive recordReference="drawdownRecord"/> </exchange> <record name="drawdownRecord" when="before"> <source expression="drawnDown"/> <target variable="CreditExtended"/> </record> </interaction> </workunit> </finalizerBlock> <!-- what to do if thespecifiescorrelationcredit is not used --> <finalizerBlock name="replenish"> <!-- if there is no application content to send, this could just bedatausedwiththeChannel,oran assignment to theUsingactualvalueofdatawithinamessage,forstate capturing variable creditExtended --> <workunit name="replenishWU"> <interaction name="replenishInteraction" channelVariable="tns:CreditRequestor" operation="replenish"> <participate relationshipType="CreditReqCreditResp" fromRole="tns:CreditRequestor" toRole="CreditResponder"/> <exchange name="dummy" action="request"> <send></send> <receive recordReference="replenishRecord"/> </exchange> <record name="replenishRecord" when="before"> <source expression="released"/> <target variable="CreditExtended"/> </record> </interaction> </workunit> </finalizerBlock> </choreography>example
Activities are the Orderlowest level components of the NumberOrderthatisChoreography, used to commonallthemessagessentdescribe the overChannelInpractice,whenaactual work performed.Choreography
The Activity-Notation is performed,severaldifferentwaysofdoingcorrelationmaybeused to define activities as either:employed
An Ordering Structure - which varydependingontheChannelType.Theoperationattributespecifiesaone-waycombines Activities with other Ordering Structures in a orrequest-responseoperation.Thespecifiedoperationnested way to specify the belongsinterface,asidentifiedbytheroleandbehaviorelementsoftheChannelordering rules of TypetheChannelVariableusedintheInteractionactivity.Theoptionaltime-to-completeattributeidentifiestheactivities within timeframewhichanInteractionMUSTcomplete.Theoptionalalignattributewhensetto"true"the Choreographymeans
A WorkUnit-Notation
A Basic Activity that performs the actual work. A Basic Activity is then either:
An Interaction Activity, which results in thecommonan exchange of understandingbothinformation thebetween parties and exchangedthepossible synchronization of their observable information resultingcreationschanges orand the atactual values of the endsInteractionasspecifiedinthefromRoleandthetoRole.Thedefaultforthisattributeis"false".AnInteractionactivitycanbemarkedexchanged informationas
A Perform Activity, which means that a complete, separately defined Choreography initiatorwhentheoptionalinitiateis attributeperformedset
An Assign Activity, which assigns, within one Role, the value of one Variable to "true".Theanother Variabledefault
A Silent Action Activity, which provides an explicit designator used for thisattributeis"false".Withintheparticipatespecifying the element,relationshipattributepoint where party specific action(s) with non-observable operational details MUST be performedspecifies
A No Action Activity, which provides an explicit designator used for specifying the RelationshipTypethisInteractionpoint where a party does not perform any actionparticipates
A Finalize Activity, which enables a particular Finalizer Block in a particular instance of an immediately enclosed Choreography and thus brings that Choreography to a defined conclusion
An Ordering Structure is one of the fromRoleandtoRoleattributesspecifytherequestingandtheacceptingRoleTypesfollowing:respectively.
Sequence
Parallel
Choice
The RoleTypeidentifiedbythetoRoleattributeMUSTbethesamesequence ordering structure contains one or more Activity-Notations. When the asRoleTypeidentifiedsequence activity is enabled, the bysequence element rolerestricts the ofChannelseries of TypetheChannelVariableenclosed activities (as defined by one or more Activity-Notations) to be enabled sequentially, in the usedinteractionsame order that they are defined.activity.
The optionalexchangeelementallowsinformationtobeexchangedduringaone-waysyntax of this construct is:request
<sequence> Activity-Notation+ </sequence>
The parallel ordering structure contains one or arequest/responseInteraction.Withintheexchangemore Activity-Notation that are enabled concurrently when the element,optionalinformationTypeandchannelTypeattributes,identifytheInformationparallel activity is enabled. The parallel activity completes successfully when all activities (as defined by one or TypetheChannelmore Activity-Notations) performing work within it complete successfully.Type
The syntax of thethis construct is:information
<parallel> Activity-Notation+ </parallel>
The choice ordering structure enables specifying that isexchangedbetweenthetwoRolesinanInteraction.Ifonly one of nonetheseattributesarespecified,thenitisassumedthateithernoactualdataistwo or exchangedthetypeofdatabeingexchangedisofnointeresttotheChoreographydefinitionWithinthemore activities (as defined by two or more Activity-Notations) SHOULD be performed. exchange
When two or more activities are specified in a choice element, only one activity is selected and the attributeactionspecifiesthedirectionother activities are disabled. If the ofinformationexchangedchoice has Work Units with guard conditions, the inInteraction:first Work Unit that matches the Whenactionguard condition is attributesetto"request",selected and the thenmessageexchangehappensfromRoletotoRoleother Work Units are disabled. If the Whenactionchoice has other activities, it is attributesetto"respond",assumed that the thenmessageexchangehappensfromtoRoletofromRoleselection criteria for the Withinexchangeactivities are non-observable.element,
The syntax of this construct is:
<choice> Activity-Notation+ </choice>
In the example below, choice element sendshowsthatinformationissentfromahas two Interactions, "processGoodCredit" and RolethereceiveelementshowsthatinformationisreceivedataRolerespectivelyinthe"processBadCredit". The Interaction:optionalVariablesspecifiedInteractions have the usingWS-CDLfunctionsame directionality, participate within the getVariable()same Relationship and sendreceiveelementsMUSTbeoftypeasdescribedintheinformationTypeorchannelTypeattributeshave the Whenactionelementissettosame fromRoles and toRoles names. If one Interaction happens, then the "request",VariablespecifiedwithinthesendelementusingthevariableattributeMUSTbedefinedother one is disabled.at
<choice> <interaction name=""processGoodCredit" channelVariable="goodCredit-channel" operation="doCredit"> ... </interaction> <interaction name=""processBadCredit" channelVariable="badCredit-channel" operation="doBadCredit"> ... </interaction> <choice>
An Interaction is the basic building block of a Choreography, which results in information exchanged between collaborating parties and possibly the fromRoleVariablespecifiedsynchronization of their observable information changes and the withinreceiveelementvalues of the usingvariableattributeMUSTbedefinedexchanged information.at
An Interaction forms the toRolebase atom of the WhenactionelementisChoreography composition, where multiple Interactions are combined to setform a Choreography, which can then "respond",theVariablespecifiedwithinthesendelementusingthevariableattributeMUSTbedefinedatthetoRoleandtheVariablespecifiedwithinthereceiveelementusingthevariableattributeMUSTbedefinedatfromRoleTheVariablespecifiedwithinthereceiveelementMUSTbe notdefinedwiththeattributesilentActionsetto"true"Withinthesendorthereceiveused in different business contexts.element(s)
An Interaction is initiated when one of anexchangethe element,recordReferenceattributeRoles participating in the Interaction sends a containslistofmessage, through a common Channel, to referencesrecordanother Role that is participating in the element(s)sameInteraction, that receives the message. If the Interactionaligninitial message is attributesetto"false"forthea request, then Interaction,itmeansthatthe:Requestexchangecompletessuccessfullythe foraccepting Role requestingonceithassuccessfullysenttheinformationcan optionally respond with a normal response message or a fault message, which will be received by the initiating Role.of
An Interaction also contains "references" to:
The Channel Capturing Variable specifiedthat specifies the withinsendinterface and other data that describe where and how the elementRequestexchangecompletessuccessfullyfortheacceptingRoleonceithasmessage is to be sent to and received successfullytheinformationoftheVariablespecifiedwithinthereceiveelementResponseexchangecompletessuccessfullyinto the accepting Rolefor
onceithassuccessfullyThe Operation that specifies what the sentrecipient of the informationVariablespecifiedwithinthesendelementandtheResponseexchangecompletessuccessfullymessage should do with the forrequestingRolemessage when it oncehasis receivedsuccessfully
theinformationoftheVariablespecifiedwithinthereceiveelementIfthealignThe From Role and To Role that are involvedattribute
The Information Type or Channel Type that is setto"true"being exchangedfor
The Information Exchange Capturing Variables at the Interaction,thenitFrom Role and To Role that are the meansInteractioncompletessuccessfullyifthesource and destination for the RequestResponseexchangescompletemessage contentsuccessfully
A list of potential observable information changes that can occur and allreferencedrecordscompletesuccessfullyRequestexchangecompletessuccessfullyoncemay need to be aligned at the bothFrom Role requestinghassuccessfullyand the sentTo Role, as a result of carrying out the informationVariablespecifiedInteractionwithin
In some Choreographies there may be a requirement that, when the sendelementInteraction is performed, the andacceptingRolehassuccessfullyRoles in the receivedinformationChoreography have agreement on the ofVariableoutcome. More specifically within specifiedthereceiveelementResponseexchangecompletessuccessfullyonceboththean Interaction, a Role acceptinghassuccessfullysenttheMAY need to have a common understanding of the informationVariablespecifiedwithinthesendelementandtherequestingRolehassuccessfullyreceivedobservable information creations or changes of thetheVariablespecifiedwithinthereceiveelementTheoptionalelementrecordisusedtoone or createmore State Capturing Variables that are complementary to one or more State Capturing Variables changeof its partner Role. Additionally, within an Interaction a Role MAY need to have a common understanding of the atsendandreceivevalues of the endsInteraction.Information Exchange Capturing Variables at the Withinrecordpartner Role.element,
For example, after an Interaction happens, both the Buyer and sourcetargetelementsspecifyusingtheWS-CDLfunctionthe getVariable()VariablesSeller want to have a common understanding that:whose
State Capturing Variables, such as "Order State", that contain observable information isrecorded:at the WhenactionelementisBuyer and Seller, have values that are complementary to set"request",each other, e.g. "Sent" at the thenrecording(s)Buyer and "Received" at the Seller, andof
Information Exchange Capturing Variables specifiedhave the withinsourcesame types with the andtargetelementssame content, e.g. The "Order" Variables at the occurfromRolefortheBuyer and sendSeller have the attoRolesame Information Types and hold the forreceivesame order informationWhen
In WS-CDL, an Alignment Interaction MUST be explicitly used, in the actionelementissetto"response",cases where two interacting parties require the thenalignment of recording(s)theVariablesspecifiedwithinthetheir observable information changes and the sourcetargetelementsoccuratthetoRolevalues of their exchanged information. After the forsendalignment Interaction completes, both parties progress at the andfromRoleforthereceiveWithintherecordelement,thewhenattributespecifiesifarecordinghappens"before"or"after"asendorareceiveofamessageatasame time, in a RoleRequestorResponseexchange.Thefollowingrulesapplyforrecord:OneormorerecordelementsMAYbespecifiedandperformedatoneorboththeRoleswithinanInteractionThesourceandthetargetVariableMUSTbeofcompatibletypeThelock-step fashion and the sourcetargetVariableMUSTbedefinedatthesameRoleTheVariable targetMUSTnotbedefinedwiththeattributesilentActionsetto"true"ArecordelementMUSTNOTbeinformation in both parties is aligned. Their Variable alignment comes from the specifiedabsenceofanexchangeelementwithinanInteractionfact that the Ifalignattributeisrequesting party has to set"false"fortheInteraction,thenitknow that the meansRolespecifiedaccepting party has received the withinrecordelementmakesmessage and the availablecreationorchangeother way around, the ofVariablespecifiedaccepting party has to know that the withinrecordelementimmediatelyrequesting party has sent the aftersuccessfulmessage before both of completioneachrecordIfthealignthem progress. There is attributesetto"true"fortheno intermediate state, where one party sends a message and then it Interaction,meansthatBothRolesknowtheavailabilityoftheproceeds independently or creationchangeoftheVariablesspecifiedwithintherecordelementonlythe atsuccessfulcompletionoftheInteractionIftherearetwoormorerecordelementsspecifiedwithinanother party receives a message and then Interaction,allrecordoperationsMUSTcompletesuccessfullyfortheInteractit proceeds independently.to
An Interaction completes normally when its message exchange(s) complete successfully.
Otherwise,noneoftheVariablesspecifiedAn Interaction completes abnormally when:in
An application signals an error condition during the targetattributewillbeaffectedTheexamplebelowmanagement of a showscompleteChoreographythatinvolvesonerequest or within a party when processing the requestInteraction.
The time-to-complete timeout, identifying the timeframe within which an Interaction happensfromRoleType"Consumer"toRoleType"Retailer"MUST complete, occurs after the onChannelInteraction was initiated but before it completed"retailer-channel"
Other types of errors, such as arequest/responsemessageProtocol Based Exchange failures, Security failures, Document Validation errors, etc. exchange.
The messagepurchaseOrderissentfromConsumertoRetailerasarequestsyntax of the interaction construct is:message
<interaction name="ncname" channelVariable="qname" operation="ncname" align="true"|"false"? initiate="true"|"false"? > <participate relationshipType="qname" fromRole="qname" toRole="qname" /> <exchange name="ncname" informationType="qname"?|channelType="qname"? action="request"|"respond" > <send variable="XPath-expression"? recordReference="list of ncname"? causeException="true"|"false"? /> <receive variable="XPath-expression"? recordReference="list of ncname"? causeException="true"|"false"? /> </exchange>* <timeout time-to-complete="XPath-expression" fromRoleRecordReference="list of ncname"? toRoleRecordReference="list of ncname"? />? <record name="ncname" when="before"|"after"|"timeout" causeException="true"|"false"? > <source variable="XPath-expression"? | expression="Xpath-expression"? /> <target variable="XPath-expression" /> </record>* </interaction>
The messageattribute purchaseOrderAckname
is sentfromRetailertoConsumerused for specifying a asresponsemessageTheVariableconsumer-channelispopulatedatRetailerusingthename for each Interaction element declared within a Choreography.record
The
attribute specifies the InteractionhappenschannelVariableonretailer-channelwhichChannel Variable containing information of a hasTokenTypepurchaseOrderIDusedasanparty, being the target of the identitychannel.ThisidentityInteraction, which is used for determining where and how to elementidentifythebusinessprocesssend and receive information to and into the ofparty. The retailerrequestmessagepurchaseOrdercontainstheidentityoftheretailerbusinessprocessasChannel Variable used in an Interaction MUST be available at the specifiedtokenLocatorforpurchaseOrdermessageTheresponsemessagepurchaseOrderAcktwo Roles before the containsidentityInteraction occurs. At runtime, information about a Channel Variable is expanded further. This requires that the ofconsumerbusinessprocessasmessages exchanged in the specifiedChoreography also contain reference and correlation information, for tokenLocatorpurchaseOrderAckmessageTheconsumer-channelisexample by:sent
Including a protocol header, such as a SOAP header orpart
Using the actual value of purchaseOrderInteractiondata within a message, for example the from"Order Number" of the Order that is common to all the consumerretaileronretailer-channelmessages sent over the duringrequest.ChannelHere
The operation
attribute specifies the recordelementname of the populatesconsumer-channeloperation that is associated with this Interaction. The specified operation belongs to the atretailerrole.interface, as identified by the Ifrole
and behavior
elements of the Channel Type of the Channel Variable used in this Interaction.
The OPTIONAL align
attribute when set to "true" wasforthisInteraction,thenitmeans that this Alignment Interaction results in the alsoconsumerknowscommon understanding of both the thatretailernowinformation exchanged and the hasresulting observable information creations or changes at the ends of the contactconsumer.InanotherInteraction as specified in the example,consumercouldsetitsVariable"OrderSent"tofromRole and the "true"retailertoRole. The default for this attribute is "false".would
An Interaction activity can be marked as a Choreography Initiator when the OPTIONAL initiate
attribute is set itsVariableto "OrderReceived""true""true". The default for this attribute is "false".using
Within the participate
element, the
recordelement.;<packagename="ConsumerRetailerChoreography"version="1.0"<informationTypename="purchaseOrderType"type="pons:PurchaseOrderMsg"/><informationTypename="purchaseOrderAckType"type="pons:PurchaseOrderAckMsg"/><tokenname="purchaseOrderID"informationType="tns:intType"/><tokenname="retailerRef"informationType="tns:uriType"/><tokenLocatortokenName="tns:purchaseOrderID"informationType="tns:purchaseOrderType"query="/PO/orderId"/><tokenLocatortokenName="tns:purchaseOrderID"informationType="tns:purchaseOrderAckType"query="/PO/orderId"/><roleTypename="Consumer"><behaviorname="consumerForRetailer"interface="cns:ConsumerRetailerPT"/><behaviorname="consumerForWarehouse"interface="cns:ConsumerWarehousePT"/></roleType><roleTypename="Retailer"><behaviorname="retailerForConsumer"interface="rns:RetailerConsumerPT"/></roleType><relationshipTypename="ConsumerRetailerRelationship"><roletype="tns:Consumer"behavior="consumerForRetailer"/><roletype="tns:Retailer"behavior="retailerForConsumer"/>relationshipType</><channelTypename="ConsumerChannel"><roletype="tns:Consumer"/><reference><tokentype="tns:consumerRef"/></reference><identity><tokentype="tns:purchaseOrderID"/></identity></channelType><channelTypename="RetailerChannel"><passingchannel="ConsumerChannel"action="request"/><roletype="tns:Retailer"behavior="retailerForConsumer"/><reference><tokentype="tns:retailerRef"/></reference><identity><tokentype="tns:purchaseOrderID"/></identity></channelType><choreographyname="ConsumerRetailerChoreography"root="true"><relationshiptype="tns:ConsumerRetailerRelationship"/><variableDefinitions><variablename="purchaseOrder"informationType="tns:purchaseOrderType"silentAction="true"/><variablename="purchaseOrderAck"informationType="tns:purchaseOrderAckType"/><variablename="retailer-channel"channelType="tns:RetailerChannel"/><variablename="consumer-channel"channelType="tns:ConsumerChannel"/><interactionchannelVariable="tns:retailer-channel"operation="handlePurchaseOrder"align="true"initiate="true"><participaterelationship="tns:ConsumerRetailerRelationship"fromRole="tns:Consumer"toRole="tns:Retailer"/><exchangeinformationType="tns:purchaseOrderType"action="request"><sendvariable="cdl:getVariable("tns:purchaseOrder")"/><receivevariable="cdl:getVariable("tns:purchaseOrder")"recordReference="populateChannel"/></exchange><exchangeinformationType="purchaseOrderAckType"action="respond"><sendvariable="cdl:getVariable("tns:purchaseOrderAck")"/><receivevariable="cdl:getVariable("tns:purchaseOrderAck")"/></exchange><recordname="populateChannel"when="after"><sourcevariable="cdl:getVariable("tns:purchaseOrder,"PO/CustomerRef")"/><targetvariable="cdl:getVariable("tns:consumer-channel")"/></record></interaction></choreography></package>2.5.3ComposingChoreographiesTheperformactivityattribute specifies the realizes"compositionofChoreographies",whereascombiningexistingChoreographiesRelationship Type this Interaction participates in resultsthecreationofnewChoreographies.ForexampleiftwoseparateChoreographiesweredefinedasfollows:ARequestforQuote(RFQ)ChoreographythatinvolvesaBuyerRolesendingarequestforaquotationforand goodsservicestoaSupplierRoletothe which
and SupplierRolerespondswitheithera"Quotation"ora"DeclinetoQuote"fromRolemessage,
attributes specify the AnOrderPlacementChoreographytoRolewhereBuyerRoleplacesandorderforgoodsorrequesting and the servicesaccepting Role SuppliereitheracceptstheorderorrejectsitYoucouldthencreateanew"QuoteandOrder"Types respectively. The Role Type identified by Choreographythe reusing
attribute MUST be the twotoRolewhereRFQChoreographywasperformedfirst,andthen,dependingsame as the onRole Type identified by the outcomerole
element of the RFQChannel Type of the Choreography,orderwasplacedusingtheOrderPlacementChoreography.InthiscasethenewChoreographyis"composed"outChannel Variable used in the oftwopreviouslydefinedChoreographies.Usingthisapproach,Choreographiescanberecursivelyinteraction activity.combined
The OPTIONAL exchange
element allows information to supportChoreographiesofanyrequiredcomplexityallowingmoreflexibilityasChoreographiesdefinedelsewherebe canexchanged during an Interaction. The reused.performactivityenablesaChoreographytospecifythatanotherattribute Choreographyname
is performedused for specifying a name for this at
element.pointinitsdefinition,asanenclosedChoreography.Thesyntaxoftheperformconstructis:;<performchoreographyName="qname"><bindname="ncname"><thisvariable="XPath-expression"role="qname"/><freevariable="XPath-expression"role="qname"/></bind>*exchange</perform>
Within the
element, the performexchangeelementchoreographyNameattributereferencesaOPTIONAL attributes LocallyinformationType
and channelType
identify the Information Type or GloballydefinedChoreographytobeperformed.TheperformedChoreographyevenwhendefinedinadifferentChoreographythe Channel Type of the information that is PackageconceptuallytreatedasanenclosedChoreography.AnenclosingChoreographyMAYperformexchanged between the two Roles in an onlyimmediatelycontainedInteraction. The attributes ChoreographyinformationType
and channelType
are mutually exclusive. If none of these attributes are specified, then it is assumed that either no actual information is Locallydefined.Theoptionalbindelementexchanged or the withinperformelementtype of information enablesintheperformingbeing exchanged is of no interest to Choreographybesharedthe withChoreography performedandviceversa.TheroleattributealiasestheRolesdefinition.from
Within the
element, the performingChoreographyexchangetoperformedChoreography.Theattribute variable
specifies withinthisactionelementthataVariablethe inperformingChoreographyisbounddirection of the withVariableidentifiedbyvariableattributewithinthefreeinformation exchanged in the elementperformedChoreography.ThefollowingrulesapplywhenaInteraction:Choreography
When the action
attribute is performed:Theset to ChoreographybeperformedMUSTNOTbearootChoreographyThe"request", then the information exchange happens fromRole to ChoreographybeperformedMUSTbedefinedeitherusingaChoreography-NotationimmediatelycontainedtoRolein
When the
attribute is set to sameChoreographyoritMUSTbeatop-levelChoreographywithactionroot"false""respond", then the insameordifferentChoreographyPackage.Performedinformation exchange happens from toRole to fromRoleChoreographies
Within the exchange
element, the send
element shows that aredeclaredinformation is sent from a indifferentChoreographyPackageMUSTbeincludedfirstRole TheTypeswithinasingleand the bindreceive
element MUSTbecarriedoutshows that information is received at a Role respectively in the bysameparty,henceInteraction:they
The send
and the receive
elements MUST belongonly use the tosameParticipantWS-CDL function TypegetVariable
within the variable
attribute
The OPTIONAL Variables specified within the free
and bindsendelementreceive
elements MUST be of type as described in the have
or attributeinformationTypefreechannelType
attributes
When the action
element is set to "true"intheirdefinitionThereMUSTnotbeacyclicdependency"request", then the onChoreographiesperformed.ForexampleChoreographyC1isperformingChoreographyC2whichisperformingChoreographyC1againTheexamplebelowshowsaChoreographycomposition,whereaChoreography"PurchaseChoreography"isVariable specified within the performing
element using the sendGloballyvariable
attribute MUST be defined Choreographyat the fromRole and "RetailerWarehouseChoreography"the Variable aliases"purchaseOrderAtRetailer"specified within the to
element using the Variablereceive"purchaseOrder"variable
attribute MUST be defined at the performedChoreography"RetailerWarehouseChoreography".Oncealiased,theVariable"purchaseOrderAtRetailer"extendstoRoleto
When the
element is enclosedChoreographyandthustheseVariablescanbeusedinterchangeablyforsharingtheirinformation.;<choreographyname="PurchaseChoreography">...<variableDefinitions><variablename="purchaseOrderAtRetailer"informationType="purchaseOrder"role="tns:Retailer"/></variableDefinitions>...<performchoreographyName="RetailerWarehouseChoreography"><bindname="aliasRetailer"><thisvariable="cdl:getVariable("tns:purchaseOrderAtRetailer")"role="tns:Retailer"/><freevariable="cdl:getVariable("tns:purchaseOrder")"role="tns:Retailer"/></bind></perform>...</choreography><choreographyname="RetailerWarehouseChoreography"><variableDefinitions><variablename="purchaseOrder"informationType="purchaseOrder"role="tns:Retailer"free="true"/></variableDefinitions>...</choreography>2.5.4AssigningVariablesTheAssignactionactivityset to usedcreateorchange"respond", then andmakeavailablewithinonethe Role,valueofVariable specified within the onesend
element using the
attribute MUST be valueofanotherVariable.Theassignmentsmayinclude:AssigninganInformationCapturingVariabletoanotherorapartofthatVariabletoaStateCapturingVariableoranotherInformationCapturingVariablesothatamessagereceivedvariablecanusedtotrigger/constrain,usingaWorkUnitguardcondition,orotherInteractionsAssigningaStateCapturingVariabletoanotherStateCapturingVariableortoanInformationCapturingVariabledefined at locallyaRoleThesyntaxthe ofassignconstructis:;<assignrole="qname"><copyname="ncname"><sourcevariable="XPath-expression"/><targetvariable="XPath-expression"/></copy>+</assign>TheassignconstructcreatesorchangesatatoRole and the Variable Roledefinedspecified within the byreceive element using the target
attribute MUST be defined variableVariablebythesourceat elementthesameRole.ThefollowingrulesapplytofromRoleassignment:
The sourceandtheVariable targetMUSTbeofcompatibletypeThesourcespecified within the and
element MUST not be defined targetreceiveVariablewith the atsameRoleIfthereareattribute twosilent
set to "true"
Within the send
or morecopyelementsspecifiedthe withinreceive
element(s) of an
element, the assign,thenallcopyoperationsMUSTcompletesuccessfullyexchangefor
attribute contains an XML-Schema list of assigntocompletesuccessfully.Otherwise,recordReferencenonetheVariablesreferences to specifiedrecord
element(s) in the targetattributewillbesame Interaction. The affectedfollowingexampleassignsthecustomeraddresspartfromVariable"PurchaseOrderMsg"toVariable"CustomerAddress".;<assignrole="tns:retailer"><copyname="copyChannel"><sourcevariable="cdl:getVariable("PurchaseOrderMsg","/PO/CustomerAddress")"/><targetvariable="cdl:getVariable("CustomerAddress")"/></copy></assign>2.5.5MarkingSilentActionsSilentactionsareexplicitdesignatorsusedformarkingthepointswherepartyspecificoperationswithnon-observableoperationalsame detailsrecord
element MAY be performed.Forreferenced from different example,send
or the
element(s) within the mechanismforreceivecheckinginventoryofawarehouseshouldnotbeobservabletootherpartiessame Interaction thus enabling re-usebut
Within the
or the factsendthatinventoryleveldoesreceive element(s) of an influenceexchange
element, the
attribute when set to "true", specifies that an Exception MUST be globalobservablebehaviorwithabuyerpartycauseExceptionneedsspecifiedcaused at the inChoreographydefinition.Therespective Roles. In this case, the syntaxinformationType
of the
element MUST be of Exception Type. The silentactionconstructis:;<silentActionrole="qname?exchange/>default for this attribute optionalis role"false"used
The request exchange MUST NOT have causeException
attribute set to specifythepartyatwhichthesilentaction"true" will
When two or more respond exchanges are specified, one respond exchange MAY be performed.IfasilentactionisdefinedwithoutaRole,of normal informationType and all others MUST be of Exception Type. There is itimpliedan implicit choice between two or more respond exchangesthat
If the
attribute is alignactionperformedatset to "false" for the allInteraction, then it means that Rolesarepartthe:of
Request exchange completes successfully for the requesting Role once it has successfully sent the information of the RelationshipsChoreographythisactivityisenclosedwithin.2.5.6Variable specified within the MarkingAbsenceofActionsNoactionsareexplicitdesignatorssend element and the Request exchange completes successfully for usedthe markingpointswhereapartydoesnotperformanyaction.Theaccepting Role once it has successfully received the information of the syntaxnoactionconstructis:;<noActionrole="qname?/>TheoptionalattributeroleisusedtoVariable specified within the specifypartyatwhichnoactionwillbeperformed.IfanoActionisdefinedwithoutaRole,itisimpliedthatnoactionwillbeperformedatanyreceive elementof
Response exchange completes successfully for the Rolesthatarepartaccepting Role once it has successfully sent the ofinformation of the RelationshipsChoreographythisactivityisenclosedwithin.3ExampleTobecompleted4RelationshipVariable specified within the withSecurityframeworkBecausemessagescanhaveconsequencessend element and the inrealResponse exchange completes successfully for the world,collaborationpartieswillimposesecurityrequirementsrequesting Role once it has successfully received the onmessageexchanges.information of Manytheserequirementscanbesatisfiedthe byuseofWS-Security[24].5RelationshipVariable specified within the withReliableMessagingframeworkTheWS-Reliabilityspecification[22]providesareliablemechanismtoexchangebusinessdocumentsamongcollaboratingparties.TheWS-Reliabilityspecificationreceive elementprescribes
If the
attribute is set to "true" for alignformatsallmessagesexchangedwithoutplacinganyrestrictionsthe oncontentInteraction, then it means that the ofencapsulatedbusinessdocuments.TheWS-ReliabilityspecificationsupportsInteraction completes successfully if its Request and one-wayrequest/responsemessageexchangepatterns,overvarioustransportprotocols(examplesareHTTP/S,FTP,SMTP,etc.).TheWS-ReliabilityspecificationsupportssequencingofResponse exchanges complete successfully and messagesguaranteed,exactlyonceall referenced records complete successfully: delivery.
A violationofanyoftheseconsistencyguaranteesresultsinanerrorcondition,reflectedintheChoreographyasanInteractionfault.6RelationshipwiththeTransaction/CoordinationframeworkInWS-CDL,twopartiesmakeprogressbyinteracting.Request exchange completes successfully once both the Incaseswheretwointeractingpartiesrequesting Role has successfully sent the requirealignmentoftheirVariablescapturinginformation observablechangesortheirexchangedinformationbetweenthem,analignmentInteractionismodeledinaChoreography.AfterthealignmentInteractioncompletes,bothpartiesprogressof the atsametime,inalock-stepfashion.Variable Theinformationalignmentcomesfromthefactspecified within the thatrequestingpartyhastoknowsend element and the accepting thatRole has successfully received the partymessageinformation of the andotherwayVariable specified within the around,receive
element
A Response exchange completes successfully once both the accepting Role has partytoknowsuccessfully sent the information of the Variable specified within the send element and the requesting thatRole has partysuccessfully received the sentmessagebeforeinformation of boththemprogress.Thereisnointermediatestate,whereonepartysendsamessageandthe Variable specified within the thenreceive
element
Within the OPTIONAL timeout
element, the time-to-complete
attribute identifies the timeframe within which an Interaction MUST complete after it proceedswas initiated or the independentlyotherpartyreceivesamessageandthenitproceedsindependently.ImplementingthistypeofhandshakinginadistributedsystemrequiressupportfromaTransaction/Coordinationprotocol,wheredeadline before an Interaction MUST complete. The agreementtime-to-complete
SHOULD be of XML-Schema duration type when conveying the outcomeamongpartiestimeframe and SHOULD be canreachedevenintheof casefailuresandXML-Schema dateTime type when conveying the deadline. The OPTIONAL lossfromRoleRecordReference
attribute contains an XML-Schema list of messages.7AcknowledgmentsTobecompleted8References[1]S.Bradner,"Keywordsforreferences to userecord
element(s) in the same Interaction that will take effect at the fromRole when a timeout occurs. The OPTIONAL RFCstoRoleRecordReference
attribute contains an XML-Schema list of references to
element(s) in IndicateRequirementLevels",RFC2119,HarvardUniversity,March1997[2]T.Berners-Lee,R.Fielding,L.Masinter,"UniformResourceIdentifiers(URI):GenericSyntax",RFC2396,MIT/LCS,U.C.Irvine,XeroxCorporation,August1998.[3]http://www.w3.org/TR/html401/interact/forms.html#submit-format[4]http://www.w3.org/TR/html401/appendix/notes.html#ampersands-in-uris[5]http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4[6]SOAPVersion1.2"http://www.w3.org/TR/2003/REC-soap12-part1-20030624/"[7]WebServicesDefinitionLanguage(WSDL)2.0"http://www.w3.org/TR/2004/WD-wsdl20-20040803/"[8]IndustryInitiative"UniversalDescription,DiscoveryandIntegration"[9]W3CRecommendation"TheXMLSpecification"[10]XML-Namespaces"recordNamespacesXML,TimBrayetal.,eds.,W3C,January1999"http://www.w3.org/TR/REC-xml-names[11]W3CWorkingDraft"XMLSchemaPart1:Structures".the same Interaction that will take effect at the toRole when a timeout occurs.This
The OPTIONAL element record
is workinprogress.[12]W3CWorkingDraft"XMLSchemaPart2:Datatypes".used to create or change and then make available within one Role, the value of one or more Variables using another Variable or an expression. The attribute Thisname
is workinprogress.[13]W3CRecommendation"XMLPathLanguage(XPath)Version1.0"[14]"UniformResourceIdentifiers(URI):GenericSyntax,"RFC2396,T.Berners-Lee,R.Fielding,L.Masinter,MIT/LCS,U.C.Irvine,XeroxCorporation,August1998.[15]WSCI:WebServicesChoreographyInterface1.0,A.Arkinet.al[16]XLANG:Webused for ServicesBusinessProcessDesign,S.Thatte,2001MicrosoftCorporation[17]WSFL:WebServiceFlowLanguage1.0,F.Leymann,2001IBMCorporation[18]OASISWorkingDraft"BPEL:BusinessProcessExecutionLanguage2.0".Thisisworkinprogress.[19]BPMI.org"BPML:BusinessProcessModelingLanguage1.0"[20]WorkflowManagementCoalition"XPDL:XMLProcessingDescriptionLanguage1.0",M.Marin,R.NorinR.Shapiro[21]OASISWorkingDraft"WS-CAF:WebServicesContext,specifying a distinct name for a Coordinationrecord
element within an Interaction. Within the record
element, the source
and
elements specify these recordings of information happening at the send and receive ends of the Interaction:TransactionFramework1.0".Thisisworkinprogress.[22]OASISWorkingDraft"WebServicesReliability1.0".targetThis
When the action
element is workinprogress.[23]TheJavaLanguageSpecification[24]OASIS"WebServicesSecurity"[25]J2EE:Java2Platform,EnterpriseEdition,SunMicrosystems[26]ECMA.2001.StandardECMA-334:C#LanguageSpecification[27]"XMLInclusions(XInclude)Version1.0"http://www.w3.org/TR/xinclude/9WS-CDLXSDSchemas<?xmlversion="1.0"encoding="UTF-8"?><schematargetNamespace="http://www.w3.org/2004/10/ws-chor/cdl/"xmlns="http://www.w3.org/2001/XMLSchema"xmlns:cdl="http://www.w3.org/2004/10/ws-chor/cdl/"elementFormDefault="qualified"><complexTypename="tExtensibleElements"><annotation><documentation>Thisset to "request", then the recording(s) specified within the typesource
and the target
elements occur at the fromRole for the send and at the toRole for the receive
When the action
element is extendedbyotherCDLcomponentset to types"response", then the recording(s) specified within the source and the allowtarget
elements occur at the toRole for the send and attributesfromotherat the fromRole for the receivenamespaces
Within the record
element, the when
attribute specifies if a recording happens before or after a send or "before" or "after" a receive of a message at a Role in a Request or a Response exchange or when a timeout has expired. When the when
attribute is set to beadded.Thistypealso"timeout", the contains
element optionalrecorddescriptionthatisspecifies the recording to appliedallCDLconstructs.</documentation></annotation><sequence><elementname="description"minOccurs="0"><complexTypemixed="true"><sequenceminOccurs="0"maxOccurs="unbounded"><anyprocessContents="lax"/></sequence></complexType></element><anynamespace="##other"processContents="lax"minOccurs="0"maxOccurs="unbounded"/></sequence><anyAttributenamespace="##other"processContents="lax"/></complexType><elementname="package"type="cdl:tPackage"/><complexTypename="tPackage"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="informationType"type="cdl:tInformationType"minOccurs="0"maxOccurs="unbounded"/><elementname="token"type="cdl:tToken"minOccurs="0"maxOccurs="unbounded"/><elementname="tokenLocator"type="cdl:tTokenLocator"minOccurs="0"maxOccurs="unbounded"/><elementname="roleType"type="cdl:tRole"minOccurs="0"maxOccurs="unbounded"/><elementname="relationshipType"type="cdl:tRelationship"minOccurs="0"maxOccurs="unbounded"/><elementname="participantType"type="cdl:tParticipant"minOccurs="0"maxOccurs="unbounded"/><elementname="channelType"type="cdl:tChannelType"minOccurs="0"maxOccurs="unbounded"/><elementname="choreography"type="cdl:tChoreography"minOccurs="0"maxOccurs="unbounded"/></sequence><attributename="name"type="NCName"use="required"/><attributename="author"type="string"use="optional"/><attributename="version"type="string"use="required"/><attributename="targetNamespace"type="anyURI"use="required"/></extension></complexContent></complexType><complexTypename="tInformationType"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="name"type="NCName"use="required"/><attributename="type"type="QName"use="optional"/><attributename="element"type="QName"use="optional"/></extension></complexContent></complexType><complexTypename="tToken"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="name"type="NCName"use="required"/><attributename="informationType"type="QName"use="required"/></extension></complexContent></complexType><complexTypename="tTokenLocator"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="tokenName"type="QName"use="required"/><attributename="informationType"type="QName"use="required"/><attributename="query"type="cdl:tXPath-expr"use="optional"/></extension></complexContent></complexType><complexTypename="tRoleType"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="behavior"type="cdl:tBehavior"maxOccurs="unbounded"/></sequence><attributename="name"type="NCName"use="required"/></extension></complexContent></complexType><complexTypename="tBehavior"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="name"type="NCName"use="required"/><attributename="interface"type="QName"use="optional"/></extension></complexContent></complexType><complexTypename="tRelationshipType"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="role"type="cdl:tRoleRef"minOccurs="2"maxOccurs="2"/></sequence><attributename="name"type="NCName"use="required"/></extension></complexContent></complexType><complexTypename="tRoleRef"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="type"type="QName"use="required"/><attributename="behavior"use="optional"><simpleType><listitemType="NCName"/></simpleType></attribute></extension></complexContent></complexType><complexTypename="tParticipantType"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="role"type="cdl:tRoleRef2"maxOccurs="unbounded"/></sequence><attributename="name"type="NCName"use="required"/></extension></complexContent></complexType><complexTypename="tRoleRef2"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="type"type="QName"use="required"/></extension></complexContent></complexType><complexTypename="tChannelType"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="passing"type="cdl:tPassing"minOccurs="0"maxOccurs="unbounded"/><elementname="role"type="cdl:tRoleRef3"/><elementname="reference"type="cdl:tReference"/><elementname="identity"type="cdl:tIdentity"minOccurs="0"maxOccurs="1"/></sequence><attributename="name"type="NCName"use="required"/><attributename="usage"type="cdl:tUsage"use="optional"default="unlimited"/><attributename="action"type="cdl:tAction"use="optional"default="request-respond"/></extension></complexContent></complexType><complexTypename="tRoleRef3"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="type"type="QName"use="required"/><attributename="behavior"type="NCName"use="optional"/></extension></complexContent></complexType><complexTypename="tPassing"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="channel"type="QName"use="required"/><attributename="action"type="cdl:tAction"use="optional"default="request-respond"/><attributename="new"type="boolean"use="optional"default="true"/></extension></complexContent></complexType><complexTypename="tReference"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="token"type="cdl:tTokenReference"minOccurs="1"maxOccurs="1"/></sequence></extension></complexContent></complexType><complexTypename="tTokenReference"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="name"type="QName"use="required"/></extension></complexContent></complexType><complexTypename="tIdentity"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="token"type="cdl:tTokenReference"minOccurs="1"maxOccurs="unbounded"/></sequence></extension></complexContent></complexType><complexTypename="tChoreography"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="relationship"type="cdl:tRelationshipRef"maxOccurs="unbounded"/><elementname="variableDefinitions"type="cdl:tVariableDefinitions"minOccurs="0"/><elementname="choreography"type="cdl:tChoreography"minOccurs="0"maxOccurs="unbounded"/><groupref="cdl:activity"/><elementname="exception"type="cdl:tException"minOccurs="0"/><elementname="finalizer"type="cdl:tFinalizer"minOccurs="0"/></sequence><attributename="name"type="NCName"use="required"/><attributename="complete"type="cdl:tBoolean-expr"use="optional"/><attributename="isolation"type="cdl:tIsolation"use="optional"default="dirty-write"/><attributename="root"type="boolean"use="optional"default="false"/></extension></complexContent></complexType><complexTypename="tRelationshipRef"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="type"type="QName"use="required"/></extension></complexContent></complexType><complexTypename="tVariableDefinitions"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="variable"type="cdl:tVariable"maxOccurs="unbounded"/></sequence></extension></complexContent></complexType><complexTypename="tVariable"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="name"type="NCName"use="required"/><attributename="informationType"type="QName"use="optional"/><attributename="channelType"type="QName"use="optional"/><attributename="mutable"type="boolean"use="optional"default="true"/><attributename="free"type="boolean"use="optional"default="false"/><attributename="silentAction"type="boolean"use="optional"default="false"/><attributename="role"type="QName"use="optional"/></extension></complexContent></complexType><groupname="activity"><choice><elementname="sequence"type="cdl:tSequence"/><elementname="parallel"type="cdl:tParallel"/><elementname="choice"type="cdl:tChoice"/><elementname="workunit"type="cdl:tWorkunit"/><elementname="interaction"type="cdl:tInteraction"/><elementname="perform"type="cdl:tPerform"/><elementname="assign"type="cdl:tAssign"/><elementname="silentAction"type="cdl:tSilentAction"/><elementname="noAction"type="cdl:tNoAction"/></choice></group><complexTypename="tSequence"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><groupref="cdl:activity"maxOccurs="unbounded"/></sequence></extension></complexContent></complexType><complexTypename="tParallel"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><groupref="cdl:activity"maxOccurs="unbounded"/></sequence></extension></complexContent></complexType><complexTypename="tChoice"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><groupref="cdl:activity"maxOccurs="unbounded"/></sequence></extension></complexContent></complexType><complexTypename="tWorkunit"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><groupref="cdl:activity"/></sequence><attributename="name"type="NCName"use="required"/><attributename="guard"type="cdl:tBoolean-expr"use="optional"/><attributename="repeat"type="cdl:tBoolean-expr"use="optional"/><attributename="block"type="boolean"use="optional"default="false"/></extension></complexContent></complexType><complexTypename="tPerform"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="bind"type="cdl:tBind"minOccurs="0"maxOccurs="unbounded"/></sequence><attributename="choreographyName"type="QName"use="required"/></extension></complexContent></complexType><complexTypename="tBind"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="this"type="cdl:tBindVariable"/><elementname="free"type="cdl:tBindVariable"/></sequence></extension></complexContent></complexType><complexTypename="tBindVariable"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="variable"type="cdl:tXPath-expr"use="required"/><attributename="role"type="QName"use="required"/></extension></complexContent></complexType><complexTypename="tInteraction"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="participate"type="cdl:tParticipate"/><elementname="exchange"type="cdl:tExchange"minOccurs="0"maxOccurs="unbounded"/><elementname="record"type="cdl:tRecord"minOccurs="0"maxOccurs="unbounded"/></sequence><attributename="name"type="NCName"use="required"/><attributename="channelVariable"type="QName"use="required"/><attributename="operation"type="NCName"use="required"/><attributename="time-to-complete"type="duration"use="optional"/><attributename="align"type="boolean"use="optional"default="false"/><attributename="initiate"type="boolean"use="optional"default="false"/></extension></complexContent></complexType><complexTypename="tParticipate"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="relationship"type="QName"use="required"/><attributename="fromRole"type="QName"use="required"/><attributename="toRole"type="QName"use="required"/></extension></complexContent></complexType><complexTypename="tExchange"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="send"type="cdl:tVariableRecordRef"/><elementname="receive"type="cdl:tVariableRecordRef"/></sequence><attributename="name"type="string"use="optional"/><attributename="informationType"type="QName"use="optional"/><attributename="channelType"type="QName"use="optional"/><attributename="action"type="cdl:tAction2"use="required"/></extension></complexContent></complexType><complexTypename="tVariableRecordRef"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="variable"type="cdl:tXPath-expr"use="optional"/><attributename="recordReference"use="optional"><simpleType><listitemType="NCName"/></simpleType></attribute></extension></complexContent></complexType><complexTypename="tVariableRef"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="variable"type="cdl:tXPath-expr"use="required"/></extension></complexContent></complexType><complexTypename="tRecord"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="source"type="cdl:tVariableRef"/><elementname="target"type="cdl:tVariableRef"/></sequence><attributename="name"type="string"use="optional"/><attributename="when"type="string"use="required"/></extension></complexContent></complexType><complexTypename="tAssign"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="copy"type="cdl:tCopy"maxOccurs="unbounded"/></sequence><attributename="role"type="QName"use="required"/></extension></complexContent></complexType><complexTypename="tCopy"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="source"type="cdl:tVariableRef"/><elementname="target"type="cdl:tVariableRef"/></sequence><attributename="name"type="NCName"use="required"/></extension></complexContent></complexType><complexTypename="tSilentAction"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="role"type="QName"use="optional"/></extension></complexContent></complexType><complexTypename="tNoAction"><complexContent><extensionbase="cdl:tExtensibleElements"><attributename="role"type="QName"use="optional"/></extension></complexContent></complexType><complexTypename="tException"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="workunit"type="cdl:tWorkunit"maxOccurs="unbounded"/></sequence><attributename="name"type="NCName"use="required"/></extension></complexContent></complexType><complexTypename="tFinalizer"><complexContent><extensionbase="cdl:tExtensibleElements"><sequence><elementname="workunit"type="cdl:tWorkunit"/></sequence><attributename="name"type="NCName"use="required"/></extension></complexContent></complexType><simpleTypename="tAction"><restrictionbase="string"><enumerationvalue="request-respond"/><enumerationvalue="request"/><enumerationvalue="respond"/></restriction></simpleType><simpleTypename="tAction2"><restrictionbase="string"><enumerationvalue="request"/><enumerationvalue="respond"/></restriction></simpleType><simpleTypename="tUsage"><restrictionbase="string"><enumerationvalue="once"/><enumerationvalue="unlimited"/></restriction></simpleType><simpleTypename="tBoolean-expr"><restrictionbase="string"/></simpleType><simpleTypename="tXPath-expr"><restrictionbase="string"/></simpleType><simpleTypename="tIsolation"><restrictionbase="string"><enumerationvalue="dirty-write"/><enumerationvalue="dirty-read"/><enumerationvalue="serializable"/></restriction></simpleType></schema>be performed when a timeout occurs. If two or more 10record
elements have the same value in their when
attribute and are referenced within the recordReference
attribute of a send
or a receive
element, then they are performed in the order in which they are specified.
The following rules apply for the information recordings when using the record
element:
The source MUST define either a variable
attribute or an expression
attribute
When the source defines an expression
attribute, it MUST contain expressions, as defined in Section 2.4.3. The resulting type of the defined expression MUST be compatible with the target Variable type
When the source defines a Variable, then the source and the target Variable MUST be of compatible type
When the source defines a Variable, then the source and the target Variable MUST be defined at the same Role
When the attribute variable
is defined it MUST use only the WS-CDL function getVariable
The target Variable MUST NOT be defined with the attribute silent
set to "true"
One or more record
elements MAY be specified and performed at one or both the Roles within an Interaction
A record
element MUST NOT be specified in the absence of an exchange element or a timeout
element that reference it
The attribute causeException
MAY be set to "true" in a record element if the target Variable is an Exception Variable
When the attribute causeException
is set to "true" in a record element, the corresponding Role gets into the Exception state
When two or more record
elements are specified for the same Role in an Interaction with target Variables of Exception Type, one of the Exception recordings MAY occur. An Exception recording has an non-observable predicate condition, associated implicitly with it, that decides if an Exception occurs
If the align
attribute is set to "false" for the Interaction, then it means that the Role specified within the record element makes available the creation or change of the information specified within the record element immediately after the successful completion of each record
If the align
attribute is set to "true" for the Interaction, then it means that
Both Roles know the availability of the creation or change of the information specified within the record
element only at the successful completion of the Interaction
If there are two or more record elements specified within an Interaction, then all record operations MUST complete successfully for the Interact to complete successfully. Otherwise, none of the Variables specified in the target
attribute will be affected
The example below shows a complete Choreography that involves one Interaction performed from Role Type "Consumer" to Role Type "Retailer" on the Channel "retailer-channel" as a request/response exchange:
The message "purchaseOrder" is sent from the "Consumer" to the "Retailer" as a request message
The message "purchaseOrderAck" is sent from the "Retailer" to the "Consumer" as a response message
The Variable "consumer-channel" is made available at the "Retailer" using the record element
The Interaction happens on the "retailer-channel", which has a Token "purchaseOrderID" used within the identity
element of the Channel. This identity
element is used to identify the business process of the "Retailer"
The request message "purchaseOrder" contains the identity of the "Retailer" business process as specified in the tokenLocator for "purchaseOrder" message
The response message "purchaseOrderAck" contains the identity of the "Consumer" business process as specified in the tokenLocator for "purchaseOrderAck" message
The "consumer-channel" is sent as a part of "purchaseOrder" Interaction from the "Consumer" to the "Retailer" on "retailer-channel" during the request. Here the record element makes available the "Consumer-channel" at the "Retailer" Role. If the align
attribute was set to "true" for this Interaction, then it also means that the "Consumer" knows that the "Retailer" now has the contact information of the "Consumer". In another example, the "Consumer" could set its Variable "OrderSent" to "true" and the "Retailer" would set its Variable "OrderReceived" to "true" using the record
element
The exchange "badPurchaseOrderAckException" specifies that an Exception of "badPOAckType" Exception Type could occur at both parties
<?xml version="1.0" encoding="UTF-8"?> <package xmlns="http://www.w3.org/2004/12/ws-chor/cdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.oracle.com/ashwini/sample" xmlns:tns=http://www.oracle.com/ashwini/sample" name="ConsumerRetailerChoreography" version="1.0"> <informationType name="purchaseOrderType" type="tns:PurchaseOrderMsg"/> <informationType name="purchaseOrderAckType" type="tns:PurchaseOrderAckMsg"/> <informationType name="badPOAckType" type="xsd:string" exceptionType="true"/> <token name="purchaseOrderID" informationType="tns:intType"/> <token name="retailerRef" informationType="tns:uriType"/> <tokenLocator tokenName="tns:purchaseOrderID" informationType="tns:purchaseOrderType" query="/PO/orderId"/> <tokenLocator tokenName="tns:purchaseOrderID" informationType="tns:purchaseOrderAckType" query="/PO/orderId"/> <roleType name="Consumer"> <behavior name="consumerForRetailer" interface="tns:ConsumerRetailerPT"/> <behavior name="consumerForWarehouse" interface="tns:ConsumerWarehousePT"/> </roleType> <roleType name="Retailer"> <behavior name="retailerForConsumer" interface="tns:RetailerConsumerPT"/> </roleType> <relationshipType name="ConsumerRetailerRelationship"> <role type="tns:Consumer" behavior="consumerForRetailer"/> <role type="tns:Retailer" behavior="retailerForConsumer"/> </relationshipType> <channelType name="ConsumerChannel"> <role type="tns:Consumer"/> <reference> <token name="tns:consumerRef"/> </reference> <identity> <token name="tns:purchaseOrderID"/> </identity> </channelType> <channelType name="RetailerChannel"> <passing channel="ConsumerChannel" action="request" /> <role type="tns:Retailer" behavior="retailerForConsumer"/> <reference> <token name="tns:retailerRef"/> </reference> <identity> <token name="tns:purchaseOrderID"/> </identity> </channelType> <choreography name="ConsumerRetailerChoreography" root="true"> <relationship type="tns:ConsumerRetailerRelationship"/> <variableDefinitions> <variable name="purchaseOrder" informationType="tns:purchaseOrderType" silent="true" /> <variable name="purchaseOrderAck" informationType="tns:purchaseOrderAckType" /> <variable name="retailer-channel" channelType="tns:RetailerChannel"/> <variable name="consumer-channel" channelType="tns:ConsumerChannel"/> <variable name="badPurchaseOrderAck" informationType="tns:badPOAckType" roleTypes="tns:Consumer"/> <variable name="badPurchaseOrderAck" informationType="tns:badPOAckType" roleTypes="tns:Retailer" silent="true" /> </variableDefinitions> <interaction name="createPO" channelVariable="tns:retailer-channel" operation="handlePurchaseOrder" align="true" initiate="true"> <participate relationshipType="tns:ConsumerRetailerRelationship" fromRole="tns:Consumer" toRole="tns:Retailer"/> <exchange name="request" informationType="tns:purchaseOrderType" action="request"> <send variable="cdl:getVariable("tns:purchaseOrder", "", "")" /> <receive variable="cdl:getVariable("tns:purchaseOrder", "", "")" recordReference="record-the-channel-info" /> </exchange> <exchange name="response" informationType="purchaseOrderAckType" action="respond"> <send variable="cdl:getVariable("tns:purchaseOrderAck", "", "")" /> <receive variable="cdl:getVariable("tns:purchaseOrderAck", "", "")" /> </exchange> <exchange name="badPurchaseOrderAckException" informationType="badPOAckType" action="respond"> <send variable="cdl:getVariable(,tns:badPurchaseOrderAck,, ,,, ,,)" causeException="true" /> <receive variable="cdl:getVariable("tns:badPurchaseOrderAck", "", "")" causeException="true" /> </exchange> <record name="record-the-channel-info" when="after"> <source variable="cdl:getVariable("tns:purchaseOrder, "", "PO/CustomerRef")"/> <target variable="cdl:getVariable("tns:consumer-channel", "", "")"/> </record> </interaction> </choreography> </package>
The perform activity realizes the "composition of Choreographies", whereas combining existing Choreographies results in the creation of new Choreographies. For example if two separate Choreographies were defined as follows:
A "Request for Quote" ("RFQ") Choreography that involves a "Buyer" Role sending a request for a quotation for goods and services to a "Supplier" Role to which the "Supplier" Role responds with either a "Quotation" or a "Decline to Quote" message, and
An "Order Placement" Choreography, where the "Buyer" Role places and order for goods or services and the "Supplier" Role either accepts the order or rejects it
One could then create a new "Quote and Order" Choreography by reusing the two, where the "RFQ" Choreography was performed first, and then, depending on the outcome of the "RFQ" Choreography, the order is placed using the "Order Placement" Choreography. In this case the new Choreography is "composed" out of the two previously defined Choreographies. Using this approach, Choreographies can be combined to support Choreographies of any required complexity, allowing more flexibility as Choreographies defined elsewhere can be reused.
The perform activity enables a Choreography to specify that another Choreography is performed at this point in its definition, as an enclosed Choreography. The performed Choreography, even when defined in a different Choreography Package, is conceptually treated as an enclosed Choreography.
The syntax of the perform construct is:
<perform choreographyName="qname" choreographyInstanceId="XPath-expression"? > <bind name="ncname"> <this variable="XPath-expression" role="qname"/> <free variable="XPath-expression" role="qname"/> </bind>* Choreography-Notation? </perform>
Within the perform
element, the choreographyName
attribute references the name of the Choreography to be performed.
The OPTIONAL choreographyInstanceId
attribute defines an identifier for this performance of the Choreography identified by the choreographyName
attribute. If the performed Choreography can only be performed once within the enclosing Choreography, the choreographyInstanceId
attribute is OPTIONAL. Otherwise it MUST be specified and the value MUST be different for each performance. This is a dynamic requirement. For example, if a single perform
element appears in a Work Unit that can repeat, each use of perform must assign a different ChoreographyInstanceId
identifier.
The OPTIONAL Choreography-Notation within the perform
element defines a Locally defined Choreography that is performed only by this perform activity. If specified, the choreographyName
attribute within the perform
element MUST match the attribute name
within the choreography
element of the Choreography-Notation.
The OPTIONAL bind
element within the perform element enables information in the performing Choreography to be shared with the performed Choreography and vice versa. Within the bind
element, the attribute name
is used for specifying a name for each bind
element declared within this perform activity. Within the bind
element, the role
attribute aliases the Roles from the performing Choreography to the performed Choreography.
The variable
attribute within this
element specifies that a Variable in the performing Choreography is bound with the Variable identified by the variable attribute within the free
element in the performed Choreography.
The following rules apply:
The Choreography to be performed MUST be either a Locally defined Choreography that is immediately contained within the performing Choreography or a Globally defined Choreography. Performed Choreographies that are declared in a different Choreography Package MUST be included first before they can be performed
The Role Types within a single bind
element MUST be carried out by the same party, hence they MUST belong to the same Participant Type
The variable
attribute within this
element and free
element MUST define only the WS-CDL function getVariable
The free Variables specified within the free
element MUST have the attribute free
set to "true" in their definition within the performed Choreography
There MUST not be a cyclic dependency on the Choreographies performed. For example, Choreography "C1" is performing Choreography "C2" which is performing Choreography "C1" again is disallowed
The example below shows a Choreography composition, where a Choreography "PurchaseChoreography" is performing the Globally defined Choreography "RetailerWarehouseChoreography" and aliases the Variable "purchaseOrderAtRetailer" to the Variable "purchaseOrder" defined at the performed Choreography "RetailerWarehouseChoreography". Once aliased, the Variable "purchaseOrderAtRetailer" extends to the enclosed Choreography and thus these Variables can be used interchangeably for sharing their information.
<choreography name="PurchaseChoreography"> ... <variableDefinitions> <variable name="purchaseOrderAtRetailer" informationType="purchaseOrder" role="tns:Retailer"/> </variableDefinitions> ... <perform choreographyName="RetailerWarehouseChoreography"> <bind name="aliasRetailer"> <this variable="cdl:getVariable("tns:purchaseOrderAtRetailer", "", "")" role="tns:Retailer"/> <free variable="cdl:getVariable("tns:purchaseOrder", "", "")" role="tns:Retailer"/> </bind> </perform> ... </choreography> <choreography name="RetailerWarehouseChoreography"> <variableDefinitions> <variable name="purchaseOrder" informationType="purchaseOrder" role="tns:Retailer" free="true"/> </variableDefinitions> ... </choreography>
The Assign activity is used to create or change, and then make available within one Role, the value of one or more Variables using the value of another Variable or expression.
The assign activity MAY also be used to cause an Exception at a Role.
The syntax of the assign construct is:
<assign roleType="qname"> <copy name="ncname" causeException="true"|"false"? > <source variable="XPath-expression"?|expression="Xpath-expression"? /> <target variable="XPath-expression" /> </copy>+ </assign>
The copy element within the assign
element creates or changes, at the Role specified by the roleType
attribute, the Variable defined by the target
element using the Variable or expression defined by the source
element at the same Role. Within the copy
element, the attribute name
is used for specifying a name for each copy
element declared within this assign activity.
The following rules apply to assignment:
The source MUST define either a variable
attribute or an expression
attribute
When the source defines an expression
attribute, it MUST contain expressions, as defined in Section 2.4.3. The resulting type of the defined expression MUST be compatible with the target Variable type
When the source defines a Variable, then the source and the target Variable MUST be of compatible type
When the source defines a Variable, then the source and the target Variable MUST be defined at the same Role
When the attribute variable
is defined it MUST use only the WS-CDL SuppliedFunctionsfunction TheregetVariable
The target Variable MUST NOT be defined with the attribute silent
set to "true"
When two or more copy
elements belong to the same assign
element, then they are performed in the order in which they are defined
If there are two or more copy
elements specified within an assign, then all copy operations MUST complete successfully for the assign to complete successfully. Otherwise, none of the Variables specified in the target
attribute will be affected
The OPTIONAL attribute causeException
MAY be set to "true" in a copy
element if the target Variable is an Exception Variable. The default for this attribute is "false"
At most one copy
element MAY have the attribute causeException
set to "true"
When the attribute causeException
is set to "true" in a copy
element, the Role specified by the attribute roleType
gets into the Exception state after the assign activity has completed
The examples below show some possible usages of assign.
Example 1: <assign roleType="tns:Retailer"> <copy name="copyAddressInfo"> <source variable="cdl:getVariable("PurchaseOrderMsg", "", "/PO/CustomerAddress")" /> <target variable="cdl:getVariable("CustomerAddress", "", "")" /> </copy> </assign> Example 2: <assign roleType="tns:Retailer"> <copy name="copyPriceInfo"> <source expression="(10+237)/34" /> <target variable="cdl:getVariable("ProductPrice", "", "", "tns:Retailer")" /> </copy> </assign> Example 3: <assign roleType="tns:Customer"> <copy name="copyLiteral"> <source expression="Hello World" /> <target variable="cdl:getVariable("VarName", "", "", "tns:Customer")" /> </copy> </assign>
The Silent Action activity is an explicit designator used for marking the point where party specific actions with non-observable operational details MUST be performed. For example, the mechanism for checking the inventory of a warehouse should not be observable to other parties, but the fact that the inventory level does influence the global observable behavior with a buyer party needs to be specified in the Choreography definition.
The syntax of the silent action construct is:
<silentAction roleType="qname? />
The OPTIONAL attribute roleType
is used to specify the party at which the silent action will be performed. If a silent action is defined without a Role Type, it is implied that the action is performed at all the Role Types that are severalpart of the Relationships of the Choreography this activity is enclosed within.functions
The No Action activity is an explicit designator used for marking the point where a party does not perform any action.
The syntax of the no action construct is:
<noAction roleType="qname? />
The OPTIONAL attribute roleType
is used to specify the party at which no action will be performed. If a noAction is defined without a Role Type, it is implied that no action will be performed at any of the Role Types that are part of the Relationships of the Choreography this activity is enclosed within.
The finalize activity is used to enable a specific Finalizer Block in successfully completed instances of immediately enclosed Choreographies, and thus bring those Choreographies to defined conclusions.
A Choreography that does not perform any Choreographies that have Finalizer Block(s) defined MUST NOT have any finalize activities specified within it. A finalize activity MAY be present within a Choreography that has performed a Choreography with one or more defined Finalizer Block(s) - that is a finalize activity can be specified within the Choreography body, within an Exception Block and within Finalizer Blocks.
For a single performed Choreography instance, at most one of its Finalizer Block(s) SHOULD be enabled by a finalize activity during the subsequent progress, including Exception handling and finalization, of the enclosing Choreography.
The syntax of the finalize construct is:
<finalize name="ncname"? > <finalizerReference choreographyName="ncname" choreographyInstanceId="XPath-expression"? finalizerName="ncname"? /> </finalizerReference>+ </finalize>
The OPTIONAL attribute name
is used for specifying a distinct name for each finalize
element declared within a Choreography Package.
Each finalizerReference
element enables a Finalizer Block in a performed instance of an immediately enclosed Choreography. Within a finalize
element, each finalizerReference
MUST refer to a different performed Choreography instance.
Within the finalizerReference
element, the choreographyName
attribute identifies the Choreography referenced by the choreographyName
attribute of the perform construct.
Within the finalizerReference
element, the OPTIONAL choreographyInstanceId
attribute identifies the performed Choreography instance to be finalized, using the value defined by the choreographyInstanceId
attribute of the perform construct. The choreographyInstanceId
attribute MAY be omitted if the contract logic of the performing Choreography is such that only one instance of the Choreography identified by the choreographyName
attribute could have been performed when the finalize
activity is enabled. If more than one instance of the Choreography identified by the choregraphyName
attribute could have been performed, the choreographyInstanceId
attribute MUST be present.
Within the finalizerReference
element, the attribute finalizerName
indicates which Finalizer Block is to be enabled in the performed instance. If the targeted, immediately enclosed, Choreography has only one defined Finalizer Block, then the finalizerName
attribute is OPTIONAL.
In the example below, Choreography "CreditDecider" gets credit authorizations for two bidders, "A" and "B", at most one of which can be selected. The "CreditDecider" performs a "CoordinatedCreditAuthorization" Choreography for each bidder, and then finalizes each performed Choreography depending on whether "A", "B" or neither was selected.
<choreography name="CreditDecider"> <!-- only a snippet is shown here --> <parallel> <perform name="creditForA" choreographyName="CoordinatedCreditAuthorization" choreographyInstance="creditForA"> <!-- bind such that this does the business for A --> </perform> <perform name="creditForB" choreographyName="CoordinatedCreditAuthorization" choreographyInstance="creditForB"> <!-- bind such that this does the business for A --> </perform> </parallel> <!-- other stuff here --> <workunit name="chooseA" guard="cdl:getVariable(,Chosen,,,,,Broker,)=,A," > <finalize> <finalizerReference choreographyName="CoordinatedCreditAuthorization" choreographyInstanceId="creditForA" finalizerName="drawDown"/> <finalizerReference choreographyName="CoordinatedCreditAuthorization" choreographyInstanceId="creditForB" finalizerName="replenish"/> </finalize> </workunit> <workunit name="chooseB" guard="cdl:getVariable(,Chosen,,,,,Broker,)=,B," > <finalize> <finalizerReference choreographyName="CoordinatedCreditAuthorization" choreographyInstanceId="creditForB" finalizerName="drawDown"/> <finalizerReference choreographyName="CoordinatedCreditAuthorization" choreographyInstanceId="creditForA" finalizerName="replenish"/> </finalize> </workunit> <workunit name="chooseNeither" guard="cdl:getVariable(,Chosen,,,,,Broker,)=,0," > <finalize> <finalizerReference choreographyName="CoordinatedCreditAuthorization" choreographyInstanceId="creditForA" finalizerName="replenish"/> <finalizerReference choreographyName="CoordinatedCreditAuthorization" choreographyInstanceId="creditForB" finalizerName="replenish"/> </finalize> </workunit> </choreography>
The WS-Security specification [WSS] provides enhancements to SOAP messaging to provide quality of protection through message integrity, message confidentiality, and single message authentication, including a general-purpose mechanism for associating security tokens with messages, and a description of how to encode binary security tokens.
As messages can have consequences in the real world, collaboration parties will impose security requirements on their information exchanges. WS-Security can be used satisfy many of these requirements.
The WS-Reliability specification [WSRM] provides a reliable mechanism to exchange information among collaborating parties. The WS-Reliability specification prescribes the formats for all information exchanged without placing any restrictions on the content of the encapsulated business documents. The WS-Reliability specification supports message exchange patterns, over various transport protocols (examples are HTTP/S, FTP, SMTP, etc.). The WS-Reliability specification supports sequencing of messages and guaranteed, exactly once delivery.
A violation of any of these consistency guarantees results in an "error", which MAY be reflected in the Choreography with an Exception.
In WS-CDL, Alignment Interactions and Coordinated Choreographies require support from a Coordination protocol, where agreement on the outcome among parties can be reached even in the case of failures and loss of messages. In this case, the Alignment Interactions and the Coordinated Choreographies MUST be bound to a Coordination protocol.WS-CDL
The WS-Addressing specification [WSAD] provides transport-neutral mechanisms to address Web services and messages, specifically, XML [XML], [XMLNS] elements to identify Web service endpoints and to secure end-to-end endpoint identification in messages. WS-Addressing enables messaging systems to support message transmission through networks that include processing nodes such as suppliesendpoint managers, firewalls, and gateways in a transport-neutral manner.XPATH
WS-Addressing can be used to convey the reference and correlation information for normalizing expanded Channel Variable information into an uniform format that can be processed independently of transport or application.
The WS-Addressing specification is in progress and the WS-Choreography Working Group will review and comment on developments in this effort on an ongoing basis.
This document has been produced by the members of the Web Services Choreography Working Group. The chairs of this Working Group are Martin Chapman (Oracle Corporation) and Steve Ross-Talbot (Enigmatec Corporation).
The editors would like to thank the Working Group members for their contributions. Members of the Working Group are (at the time of writing): Abbie Barbir (Nortel Networks), Charlton Barreto (webMethods, Inc.), Carine Bournez (W3C), Gary Brown (Enigmatec Corporation), Anthony Fletcher (Choreology Ltd), Peter Furniss (Choreology Ltd), Jim Hendler (University of Maryland (Mind Lab)), Kohei Honda (Queen Mary and Westerfield College), Nickolas Kavantzas (Oracle Corporation), Yutaka Kudou (Hitachi, Ltd.), Yves Lafon (W3C), Monica Martin (Sun Microsystems, Inc.), Robin Milner (Cambridge University), Jeff Mischkinsky (Oracle Corporation), Bijan Parsia (University of Maryland (Mind Lab)), Greg Ritzinger (Novell), Yoko Seki (Hitachi, Ltd.), Prasad Yendluri (webMethods, Inc.), Nobuko Yoshida (Imperial College London).
Previous members of the Working Group were: Assaf Arkin (Intalio Inc.), Daniel Austin (Sun Microsystems, Inc.), Alistair Barros (DSTC Pty Ltd (CITEC)), Richard Bonneau (IONA), Allen Brown (Microsoft Corporation), Mike Brumbelow (Apple), David Burdett (Commerce One), Ravi Byakod (Intalio Inc.), Michael Champion (Software AG), David Chapell (Sonic Software), Ugo Corda (SeeBeyond Technology Corporation), Fred Cummins (EDS), Jon Dart (TIBCO Software), Jean-Jacques Dubray (Attachmate), William Eidson (TIBCO Software), Colleen Evans (Sonic Software), Keith Evans (Hewlett-Packard), Yaron Goland (BEA Systems), Leonard Greski (W. W. Grainger, Inc.), Ricky Ho (Cisco Systems Inc.), Andre Huertas (Uniform Code Council), Duncan Johnston-Watt (Enigmatec Corporation), Eunju Kim (National Computerization Agency), Mayilraj Krishnan (Cisco Systems Inc.), Melanie Kudela (Uniform Code Council), Bruno Kurtic (webMethods, Inc.), Paul Lipton (Computer Associates), Kevin Liu (SAP AG), Francis McCabe (Fujitsu Ltd.), Carol McDonald (Sun Microsystems, Inc.), Greg Meredith (Microsoft Corporation), Eric Newcomer (IONA), Sanjay Patil (IONA), Ed Peters (webMethods, Inc.), Steve Pruitt (Novell), Dinesh Shahane (TIBCO Software), Evren Sirin (University of Maryland (Mind Lab)), Ivana Trickovic (SAP AG), William Vambenepe (Hewlett-Packard), Jim Webber (Arjuna Technologies Ltd.), Stuart Wheater (Arjuna Technologies Ltd.), Steven White (SeeBeyond Technology Corporation), Hadrian Zbarcea (IONA).
Due to a RelationshipspecifiedbyrelationshipNametheVariablewithnamevarNameresidingatthefirstlack of clarity in existing XML specifications, the RoleRelationshiphasaligneditsinformationwiththeVariablenamedwithVarNameWS-Choreography Working Group is unable at residingthesecondRoleoftheRelationship.xsd:anygetChannelReference(xsd:stringvarName)Returnsthereferencethis time to recommend an approach for accessing and modifying members of informationtheVariablewithnamelists and arrays.varName.
The VariableMUSTbeofChannelType.xsd:anygetChannelIdentity(xsd:stringvarName)ReturnstheidentityWS-Choreography Working Group is working on a proposal for extending Choreographies (that is specifying a choreography by defining how it is based on another choreography). This work is not finalized as of yet, but we do not believe it will have a major impact on the informationVariablewithnamevarName.TheVariablearchitecture.MUST
<?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:cdl="http://www.w3.org/2004/12/ws-chor/cdl" targetNamespace="http://www.w3.org/2004/12/ws-chor/cdl" elementFormDefault="qualified"> <complexType name="tExtensibleElements"> <annotation> <documentation> This type is extended by other CDL component types to allow elements and attributes from other namespaces to beofChannelType.xsd:booleanglobalizedTrigger(xsd:stringexpression,xsd:stringroleName,xsd:stringexpression2,xsd:stringroleName2,)Combinesexpressionsthatincludeadded. This type also contains the optional description element thatVariablesaredefinedatdifferentis applied to all CDL constructs. </documentation> </annotation> <sequence> <element name="description" minOccurs="0"> <complexType mixed="true"> <sequence minOccurs="0" maxOccurs="unbounded"> <any processContents="lax"/> </sequence> <attribute name="type" type="cdl:tDescriptionType" use="optional" default="documentation"/> </complexType> </element> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </sequence> <anyAttribute namespace="##other" processContents="lax"/> </complexType> <element name="package" type="cdl:tPackage"/> <complexType name="tPackage"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="informationType" type="cdl:tInformationType" minOccurs="0" maxOccurs="unbounded"/> <element name="token" type="cdl:tToken" minOccurs="0" maxOccurs="unbounded"/> <element name="tokenLocator" type="cdl:tTokenLocator" minOccurs="0" maxOccurs="unbounded"/> <element name="roleType" type="cdl:tRoleType" minOccurs="0" maxOccurs="unbounded"/> <element name="relationshipType" type="cdl:tRelationshipType" minOccurs="0" maxOccurs="unbounded"/> <element name="participantType" type="cdl:tParticipantType" minOccurs="0" maxOccurs="unbounded"/> <element name="channelType" type="cdl:tChannelType" minOccurs="0" maxOccurs="unbounded"/> <element name="choreography" type="cdl:tChoreography" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="author" type="string" use="optional"/> <attribute name="version" type="string" use="optional"/> <attribute name="targetNamespace" type="anyURI" use="required"/> </extension> </complexContent> </complexType> <complexType name="tInformationType"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="name" type="NCName" use="required"/> <attribute name="type" type="QName" use="optional"/> <attribute name="element" type="QName" use="optional"/> <attribute name="exceptionType" type="boolean" use="optional" default="false" /> </extension> </complexContent> </complexType> <complexType name="tToken"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="name" type="NCName" use="required"/> <attribute name="informationType" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tTokenLocator"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="tokenName" type="QName" use="required"/> <attribute name="informationType" type="QName" use="required"/> <attribute name="part" type="NCName" use="optional" /> <attribute name="query" type="cdl:tXPath-expr" use="required"/> </extension> </complexContent> </complexType> <complexType name="tRoleType"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="behavior" type="cdl:tBehavior" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tBehavior"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="name" type="NCName" use="required"/> <attribute name="interface" type="QName" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tRelationshipType"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="role" type="cdl:tRoleRef" minOccurs="2" maxOccurs="2"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tRoleRef"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="type" type="QName" use="required"/> <attribute name="behavior" use="optional"> <simpleType> <list itemType="NCName"/> </simpleType> </attribute> </extension> </complexContent> </complexType> <complexType name="tParticipantType"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="role" type="cdl:tRoleRef2" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tRoleRef2"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="type" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tChannelType"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="passing" type="cdl:tPassing" minOccurs="0" maxOccurs="unbounded"/> <element name="role" type="cdl:tRoleRef3"/> <element name="reference" type="cdl:tReference"/> <element name="identity" type="cdl:tIdentity" minOccurs="0" maxOccurs="1"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="usage" type="cdl:tUsage" use="optional" default="unlimited"/> <attribute name="action" type="cdl:tAction" use="optional" default="request"/> </extension> </complexContent> </complexType> <complexType name="tRoleRef3"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="type" type="QName" use="required"/> <attribute name="behavior" type="NCName" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tPassing"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="channel" type="QName" use="required"/> <attribute name="action" type="cdl:tAction" use="optional" default="request"/> <attribute name="new" type="boolean" use="optional" default="false"/> </extension> </complexContent> </complexType> <complexType name="tReference"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="token" type="cdl:tTokenReference" minOccurs="1" maxOccurs="1"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tTokenReference"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="name" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tIdentity"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="token" type="cdl:tTokenReference" minOccurs="1" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tChoreography"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="relationship" type="cdl:tRelationshipRef" maxOccurs="unbounded"/> <element name="variableDefinitions" type="cdl:tVariableDefinitions" minOccurs="0"/> <element name="choreography" type="cdl:tChoreography" minOccurs="0" maxOccurs="unbounded"/> <group ref="cdl:activity"/> <element name="exceptionBlock" type="cdl:tException" minOccurs="0"/> <element name="finalizerBlock" type="cdl:tFinalizer" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="complete" type="cdl:tBoolean-expr" use="optional"/> <attribute name="isolation" type="boolean" use="optional" default="false"/> <attribute name="root" type="boolean" use="optional" default="false"/> <attribute name="coordination" type="boolean" use="optional" default="false"/> </extension> </complexContent> </complexType> <complexType name="tRelationshipRef"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="type" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tVariableDefinitions"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="variable" type="cdl:tVariable" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tVariable"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="name" type="NCName" use="required"/> <attribute name="informationType" type="QName" use="optional"/> <attribute name="channelType" type="QName" use="optional"/> <attribute name="mutable" type="boolean" use="optional" default="true"/> <attribute name="free" type="boolean" use="optional" default="false"/> <attribute name="silent" type="boolean" use="optional" default="false"/> <attribute name="roleTypes" use="optional"> <simpleType> <list itemType="QName"/> </simpleType> </attribute> </extension> </complexContent> </complexType> <group name="activity"> <choice> <element name="sequence" type="cdl:tSequence"/> <element name="parallel" type="cdl:tParallel"/> <element name="choice" type="cdl:tChoice"/> <element name="workunit" type="cdl:tWorkunit"/> <element name="interaction" type="cdl:tInteraction"/> <element name="perform" type="cdl:tPerform"/> <element name="assign" type="cdl:tAssign"/> <element name="silentAction" type="cdl:tSilentAction"/> <element name="noAction" type="cdl:tNoAction"/> <element name="finalize" type="cdl:tFinalize"/> </choice> </group> <complexType name="tSequence"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <group ref="cdl:activity" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tParallel"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <group ref="cdl:activity" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tChoice"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <group ref="cdl:activity" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <complexType name="tWorkunit"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <group ref="cdl:activity"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="guard" type="cdl:tBoolean-expr" use="optional"/> <attribute name="repeat" type="cdl:tBoolean-expr" use="optional"/> <attribute name="block" type="boolean" use="optional" default="false"/> </extension> </complexContent> </complexType> <complexType name="tPerform"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="bind" type="cdl:tBind" minOccurs="0" maxOccurs="unbounded"/> <element name="choreography" type="cdl:tChoreography" minOccurs="0" maxOccurs="1"/> </sequence> <attribute name="choreographyName" type="QName" use="required"/> <attribute name="choreographyInstanceId" type="cdl:tXPath-expr" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tBind"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="this" type="cdl:tBindVariable"/> <element name="free" type="cdl:tBindVariable"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tBindVariable"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="variable" type="cdl:tXPath-expr" use="required"/> <attribute name="role" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tInteraction"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="participate" type="cdl:tParticipate"/> <element name="exchange" type="cdl:tExchange" minOccurs="0" maxOccurs="unbounded"/> <element name="timeout" type="cdl:tTimeout" minOccurs="0" maxOccurs="1"/> <element name="record" type="cdl:tRecord" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="channelVariable" type="QName" use="required"/> <attribute name="operation" type="NCName" use="required"/> <attribute name="align" type="boolean" use="optional" default="false"/> <attribute name="initiate" type="boolean" use="optional" default="false"/> </extension> </complexContent> </complexType> <complexType name="tTimeout"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="time-to-complete" type="cdl:tXPath-expr" use="required"/> <attribute name="fromRoleRecordReference" use="optional"> <simpleType> <list itemType="NCName"/> </simpleType> </attribute> <attribute name="toRoleRecordReference" use="optional"> <simpleType> <list itemType="NCName"/> </simpleType> </attribute> </extension> </complexContent> </complexType> <complexType name="tParticipate"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="relationshipType" type="QName" use="required"/> <attribute name="fromRole" type="QName" use="required"/> <attribute name="toRole" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tExchange"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="send" type="cdl:tVariableRecordRef"/> <element name="receive" type="cdl:tVariableRecordRef"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="informationType" type="QName" use="optional"/> <attribute name="channelType" type="QName" use="optional"/> <attribute name="action" type="cdl:tAction2" use="required"/> </extension> </complexContent> </complexType> <complexType name="tVariableRecordRef"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="variable" type="cdl:tXPath-expr" use="optional"/> <attribute name="recordReference" use="optional"> <simpleType> <list itemType="NCName"/> </simpleType> </attribute> <attribute name="causeException" type="boolean" use="optional" default="false"/> </extension> </complexContent> </complexType> <complexType name="tRecord"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="source" type="cdl:tSourceVariableRef"/> <element name="target" type="cdl:tVariableRef"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="causeException" type="boolean" use="optional" default="false"/> <attribute name="when" type="cdl:tWhenType" use="required"/> </extension> </complexContent> </complexType> <complexType name="tSourceVariableRef"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="variable" type="cdl:tXPath-expr" use="optional"/> <attribute name="expression" type="cdl:tXPath-expr" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tVariableRef"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="variable" type="cdl:tXPath-expr" use="required"/> </extension> </complexContent> </complexType> <complexType name="tAssign"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="copy" type="cdl:tCopy" maxOccurs="unbounded"/> </sequence> <attribute name="roleType" type="QName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tCopy"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="source" type="cdl:tSourceVariableRef"/> <element name="target" type="cdl:tVariableRef"/> </sequence> <attribute name="name" type="NCName" use="required"/> <attribute name="causeException" type="boolean" use="optional" default="false"/> </extension> </complexContent> </complexType> <complexType name="tSilentAction"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="roleType" type="QName" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tNoAction"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="roleType" type="QName" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tFinalize"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="finalizerReference" type="cdl:tFinalizerReference" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tFinalizerReference"> <complexContent> <extension base="cdl:tExtensibleElements"> <attribute name="choreographyName" type="NCName" use="required"/> <attribute name="choreographyInstanceId" type="cdl:tXPath-expr" use="optional"/> <attribute name="finalizerName" type="NCName" use="optional"/> </extension> </complexContent> </complexType> <complexType name="tException"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="workunit" type="cdl:tWorkunit" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <complexType name="tFinalizer"> <complexContent> <extension base="cdl:tExtensibleElements"> <sequence> <element name="workunit" type="cdl:tWorkunit"/> </sequence> <attribute name="name" type="NCName" use="required"/> </extension> </complexContent> </complexType> <simpleType name="tAction"> <restriction base="string"> <enumeration value="request-respond"/> <enumeration value="request"/> <enumeration value="respond"/> </restriction> </simpleType> <simpleType name="tAction2"> <restriction base="string"> <enumeration value="request"/> <enumeration value="respond"/> </restriction> </simpleType> <simpleType name="tUsage"> <restriction base="string"> <enumeration value="once"/> <enumeration value="unlimited"/> </restriction> </simpleType> <simpleType name="tWhenType"> <restriction base="string"> <enumeration value="before"/> <enumeration value="after"/> <enumeration value="timeout"/> </restriction> </simpleType> <simpleType name="tBoolean-expr"> <restriction base="string"/> </simpleType> <simpleType name="tXPath-expr"> <restriction base="string"/> </simpleType> <simpleType name="tDescriptionType"> <restriction base="string"> <enumeration value="documentation"/> <enumeration value="reference"/> <enumeration value="semantics"/> </restriction> </simpleType> </schema>Roles.