Jeff Mischkinsky [email protected] Nickolas Kavantzas [email protected] Goran...

42
Jeff Mischkinsky [email protected] Nickolas Kavantzas [email protected] Goran Olsson [email protected] Web Services Choreography Description Language W3C Choreography WG 21 Sept 2003

Transcript of Jeff Mischkinsky [email protected] Nickolas Kavantzas [email protected] Goran...

Page 1: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

Jeff Mischkinsky [email protected]

Nickolas Kavantzas [email protected]

Goran Olsson [email protected]

Web Services Choreography Description Language

W3C Choreography WG

21 Sept 2003

Page 2: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

2

Agenda

Goal Web Services Platform Web Services Choreography Description

Language

Page 3: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

3

Goal

Specify a declarative language that describes collaborations of Web Services participants by defining their complementary observable behavior

Page 4: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

4

Current Web Services platform

Core communication framework bridging heterogeneous computational models

– Loosely-coupled, stateless– Exchange of type checking information

TransportTransport

MessagingMessaging

DescriptionDescription

DiscoveryDiscovery

HTTPHTTP, BEEP,IIOP, JMS, SMTP, BEEP,IIOP, JMS, SMTP

XML,EncodingXML,Encoding

SOAPSOAP

WSDLWSDL

UDDIUDDI

Page 5: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

5

Emerging Web Services platform

TransportTransport

MessagingMessaging

DescriptionDescription

DiscoveryDiscovery

HTTPHTTP, BEEP,IIOP, JMS, SMTP, BEEP,IIOP, JMS, SMTP

XML,EncodingXML,Encoding

SOAPSOAP

WSDLWSDL

UDDIUDDI

Integration

Business Process Languages:Business Process Languages:BPEL, XPDL, BPMLBPEL, XPDL, BPML

Business Collaboration Language: Business Collaboration Language: Web ServicesWeb Services Choreography Description LanguageChoreography Description Language

QualityQualityof Serviceof Service

Reliable Reliable MessagingMessaging

SecuritySecurity TransactionTransaction

CoordinationCoordination

Page 6: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

6

Emerging Web Services platform

Reliable Messaging layer– Guaranteed delivery– Message ordering– Exactly once

Context, Coordination, Transaction layer– Bridge heterogeneous coordination protocols

Business Process Language layer– Implements Web Services based applications– Models non-observable (internal) behavior

BPEL, BPML, XPDL Define control flows Manage private data

Page 7: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

7

Model the complementary observable behavior of Web Services participating in a common business transaction

Based on a formal model– pi-calculus variation

WS-CDL Design Goals

Page 8: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

8

WS-CDL Concepts

Web Services participants interact and align their shared information

– Synchronized document exchanges– Progress is guarded by commonly defined

ordering rules

Interactions with common behavioral characteristics are combined to form a behavioral unit

– Enables re-usability in different business contexts

Page 9: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

9

WS-CDL Concepts

Information Typing Identifying & Coupling of WS participants Information driven collaboration

– State– Activities– Reaction– Choreography– Packaging

Page 10: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

10

Information Typing

Document type– Aliases WSDL message type, XSD type, XSD element– Supports future type systems

Token type– Specify name and type of piece of information

Uses WS-CDL Document type of the attribute

Token Locater type– Specify rules for selecting a piece of information

WS-CDL Document type WSDL message part XPATH query of document

Page 11: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

11

Static coupling: Roles & Relationships

• Role type– Specify the observable behavior, in terms of the

operations, a WS participant can perform• One or more WSDL interface type(s) named as

behavior type

• Relationship type– Specify the mutual commitments, in terms of the Roles, two

WS participants are required to provide• Two WSDL interface types

Page 12: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

12

Dynamic coupling: Channel

• Identify a contact-point, through which two WS participants interact– A contact-point describes

• the service type of a participant, using Token type(s) within a reference marker

• the business process type implementing a WS participant, using Token type(s) within an identity marker

• Identify a conversation between two or more WS participants– A conversation groups a set of related document exchanges,

using Token type(s) within an identity marker

Page 13: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

13

State

• Capture information shared between WS participants• Affect the progress of their common business transaction

• State definitions– Define Documents

• Typed with a documentType

– Define Channels • Typed with a channel type

• Specify the Role of the WS participant the state resides in

Page 14: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

14

Activities: Interact

• Enable WS participants to communicate and align their shared state

• Synchronized document exchange between two roles within a relationship

– Atomic, request & accept of an operation through a channel

• WSDL One way or request-response• Information flow

• request direction: fromRole towards toRole• response direction: toRole towards fromRole

Page 15: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

15

Activities: Interact (2)

• Align state that resides in one role with state that resides in the other role

– The aligned states are made available at the two roles

Page 16: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

16

Activities

• Declare– Create and make available new state at a Role

• Repeat• Sleep• Inact• Compensate

Page 17: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

17

Reaction

• Guard a set of activities– Express interest on the availability of zero, one or more

state information– When the state is/become available and a guard condition

evaluates to true, the enclosed activities are enabled• In parallel or sequentially

• Repeat: marks the re-enablement of a reaction

• reaction group: marks the mutual-exclusive enablement of a set of activities

Page 18: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

18

Choreography

• Interactions with common behavioral characteristics are combined to form a behavioral unit – Enumerate all the binary relationships interactions act in– Localize the visibility of state

• Using state definitions– Prescribe alternative patterns of behavior

• Using reactions– Enable Recovery

• Backward: handle exceptional conditions• Forward: compensate already completed activities

• Recursively combine Choreographies to form new Choreographies

Page 19: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

19

Packaging

• Aggregate & Import – Document types, toke types, toke locator types, role types,

relationship types, channel types– One or more choreographies

Import XSD, WSDL types

Page 20: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

20

WS-CDL Example

The example is a multi-participant choreography

Illustrates a simple purchase sequence

It involves four participants, Roles – Buyer, Seller, Credit Checking Service, and Inventory

Service

Main choreography involves 3 relationships– Buyer-Seller– Seller-Credit Checking Service– Seller-Inventory Service

Page 21: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

21

WS-CDL Example cont.

The Buyer initiates an interact and the Choreography – With the Seller to align the Purchase Order

The Seller, when the Purchase Order is available, initiates 3 interactions

– With the Buyer to acknowledge receipt of the Purchase Order

– With the Credit Checking Service to check Buyers credit– With the Inventory Service for product availability

Page 22: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

22

WS-CDL Example cont.

The Seller reaction is guarded by the response interactions from Credit Checking Service and Inventory Service

If both interactions result are positive, the order is processed and the Purchase Order Response is sent

If either interaction indicate a negative result a Purchase Order Reject message is sent to the Buyer

Page 23: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

23

WS-CDL Example cont.

PurchaseOrder

Credit InventorySellerBuyer

PurchaseOrder InvCheckReq InvCheckReq

InvCheckResp

CheckCreditReq CheckCreditReq

CheckCreditRespCheckCreditResp

InvCheckResp

PurchaseOrderAck

PurchaseOrderResp

PurchaseOrderAck

PurchaseOrderResp

Legend

Channels

createOrder

createOrderAck creditCheck

createCheckResp

inventoryCheck

inventoryCheckResp

purchaseOrderResp

1

2

3

4

5

3

Guards

Page 24: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

24

WS-CDL Example cont.

Buyer interacts with Seller to create a Purchase Order

Seller acknowledges the Purchase Order in an interact

Seller interacts with Credit Service and Inventory service

Credit and Inv. Services interacts with Seller with results

Seller interacts with Buyer creating PO Response

1

2

3

4

5

Page 25: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

25

WS-CDL Example cont.Some Basic Constructs

Page 26: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

26

WS-CDL Example cont.Documents

<documentType name="purchaseOrderDocType" messageType="pons:purchaseOrderMsg"/>

<documentType name="purchaseOrderAckDocType“ messageType="pons:purchaseOrderAckMsg"/>

<documentType name="purchaseOrderRejectDocType" messageType="pons:purchaseOrderRejectMsg"/>

<documentType name="purchaseOrderResponseDocType“ messageType="pons:purchaseOrderResponseMsg"/>

<documentType name="creditCheckRequestDocType" messageType="pons:creditCheckRequestMsg"/>

Page 27: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

27

WS-CDL Example cont.Tokens

<tokenType name=“warehouseRef" type="xsd:anyUri"/>

<tokenType name="purchaseOrderID" type="xsd:int"/>

<tokenLocator tokenName="sns:purchaseOrderID"

documentType ="purchaseOrderDocType"

part="PO"

query="/PO/Order"/>

Page 28: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

28

WS-CDL Example cont.roleType

<roleType name="Seller">

<behaviorType name="sellerForBuyer"

interfaceType="sns:SellerPOPT"/>

<behaviorType name="sellerForCredit"

interfaceType="sns:SellerCreditPT"/>

<behaviorType name="sellerForInventory"

interfaceType="sns:SellerInventoryPT"/>

</roleType>

Page 29: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

29

WS-CDL Example cont.Relationships

<relationshipType name="BuyerSellerBinding">

<role type="Buyer"/>

<role type="Seller"/>

</relationshipType>

Page 30: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

30

WS-CDL Example cont.Channels

<channelType name="purchaseOrderCHT"> <channelDefinitions> <channel type=”purchaseOrderResponseCHT”

direction=“respond”>

</channelDefinitions>

<role type="Seller"/> <reference> <token name="warehouseRef"/> </reference>

<identity> <token name="purchaseOrderID"/> </identity></channelType>

Page 31: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

31

WS-CDL Example cont.State Definitions

<stateDefinitions name="purchaseOrderChoreographyState">

<stateType name="purchaseOrderAckDoc"

documentType="purchaseOrderAckDocType"/>

<stateType name="purchaseOrderDocAtBuyer"

documentType="purchaseOrderDocType"

roleType="Buyer"/>

</stateDefinitions>

Page 32: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

32

WS-CDL Example cont.Interacts

<interact name="inventoryCheck" onChannel="inventory-channel" operation="inventoryCredit" initiateChoreography="true">

<participate relationship="SellerInventoryBinding" fromRole="Seller" toRole="Inventory"/>

<align state="inventoryRequestDoc" with-state="inventoryRequestDoc"/>

</interact>

Page 33: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

33

WS-CDL Example cont.Reactions

<react name="creditApprovalInventoryApproval" group="ApproveOrReject“ relationshipType=”BuyerSellerBinding”

guard= "cdl:getState(CreditCheckResponseDocAtSeller, \“/Customer/Credit\”)[text() = 'success'] && cdl:getState(InventoryResponseDocAtSeller, \“/Order/Inventory\”)[text()='available']"> <interact name="createOrderResponse“ ……… </interact></react>

Page 34: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

34

WS-CDL Example cont.Choreography

<choreography name="inventoryCheckChoreography">

<relationship type="SellerInventoryBinding"/>

<stateDefinitions name=”inventoryCheckChoreographyState”> <stateType name="inventoryCheckRequestDoc“ documentType="inventoryCheckRequestDocType"/> <stateType name= "inventoryCheckResponseDocAtInventory“ documentType="inventoryCheckResponseDocType" roleType="Inventory"/> <stateType name="seller-channel-for-inventory“ channelType="inventoryCheckResponseCHT"/> </stateDefinitions> 

Page 35: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

35

WS-CDL Example cont.Choreography <react name="purcaseDocAvailibility“ relationshipType=”SellerInventoryBinding” sequential=“true” guard="purchaseOrderDocAtSeller"> <interact name="inventoryCheck“ onChannel="inventory-channel“ operation="inventoryCredit" initiateChoreography="true"> <participate relationship="SellerInventoryBinding“ fromRole="Seller“ toRole="Inventory"/> <align state="inventoryRequestDoc" with-state="inventoryRequestDoc"/> <align state="seller-channel-for-inventory" with-state="seller-channel-for-inventory"/> </interact>  </react>

Page 36: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

36

WS-CDL Example cont.Choreography

<recover name="ncname">

<exception name="ncname">

ChoreographyNotation

</exception>?

<compensation name="ncname">

ChoreographyNotation

</compensation>?

</recover>?

</choreography>

Page 37: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

37

WS-CDL Example cont.

<choreography name="purchaseOrderChoreograpy" root="true">

  <choreography name="buyerSellerChoreography”> <interact name="createOrderInteract“/> <interact name="createOrderAckInteract“/> <choreography name="sellerResponseChoreography"> <interact name="createOrderResponse“/>

</choreography> <choreography name="sellerRejectChoreography">

<interact name="createOrderReject“/> </choreography> </choreography>  <choreography name=“creditCheckChoreography”>

<interact name="creditCheck“/> <interact name="creditCheckResponse“/>

</choreography>  <choreography name="inventoryCheckChoreography"> <interact name="inventoryCheck“/>   <interact name="inventoryResponse“/> </choreography>

</choreography> 

Page 38: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

38

WS-CDL Example cont.

<choreography name="purchaseOrderChoreograpy" root="true">

  <choreography name="buyerSellerChoreography”> <interact name="createOrderInteract“/>  

<interact name="createOrderAckInteract“/>

<choreography name="sellerResponseChoreography">

<interact name="createOrderResponse“/>

</choreography>

<choreography name="sellerRejectChoreography">

<interact name="createOrderReject“/>

</choreography>

</choreography>

  <choreography name=“creditCheckChoreography”>

<interact name="creditCheck“/>

<interact name="creditCheckResponse“/>

</choreography>  <choreography name="inventoryCheckChoreography"> <interact name="inventoryCheck“/>  

<interact name="inventoryResponse“/>

</choreography>

</choreography> 

Page 39: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

39

WS-CDL Example cont.

<choreography name="creditCheckChoreography">

<relationship type="SellerCreditBinding"/>

<stateDefinitions name=”creditCheckChoreographyState”>

<stateType name="creditCheckRequestDoc“ documentType="creditCheckRequestDocType"/>

<stateType name="creditCheckResponseDocAtCredit“ documentType="creditCheckResponseDocType“ roleType="Credit"/>

<stateType name="seller-channel-for-credit“ channelType="tns:creditCheckResponseCHT"/>

</stateDefinitions>

Page 40: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

40

WS-CDL Example cont.

<react name="purcaseDocAvailibility“ relationshipType=”SellerCreditBinding” sequential=“true” guard="purchaseOrderDocAtSeller">  <interact name="creditCheck“ onChannel="credit-channel“ operation="checkCredit“ initiateChoreography="true"> <participate relationship="SellerCreditBinding“ fromRole="Seller“ toRole="Credit"/> <align state="creditCheckRequestDoc" with-state="creditCheckRequestDoc"/> <align state="seller-channel-for-credit" with-state="seller-channel-for-credit"/> </interact> 

Page 41: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

41

WS-CDL Example cont.

<interact name="creditCheckResponse“

onChannel="seller-channel-for-credit“

operation="creditResponse">

<participate relationship="SellerCreditBinding“

fromRole="Credit“ toRole="Seller"/>

<align state="creditCheckResponseDocAtCredit"

with-state=" creditCheckResponseDocAtSeller"/>

</interact>

</react>

</choreography>

Page 42: Jeff Mischkinsky jeff.mischkinsky@oracle.com Nickolas Kavantzas nickolas.kavantzas@oracle.com Goran Olsson goran.olsson@oracle.com Web Services Choreography.

42

WS-CDL

Questions???

Comments!!!