Business Process Execution Language for Web Services (.ppt

上传人:feelhesitate105 文档编号:379182 上传时间:2018-10-09 格式:PPT 页数:91 大小:340.50KB
下载 相关 举报
Business Process Execution Language for Web Services (.ppt_第1页
第1页 / 共91页
Business Process Execution Language for Web Services (.ppt_第2页
第2页 / 共91页
Business Process Execution Language for Web Services (.ppt_第3页
第3页 / 共91页
Business Process Execution Language for Web Services (.ppt_第4页
第4页 / 共91页
Business Process Execution Language for Web Services (.ppt_第5页
第5页 / 共91页
亲,该文档总共91页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、1,Business Process Execution Language for Web Services (BPEL4WS),2,BPEL vs. WSDL,WSDL supports a stateless model which describes operations supported by web servers One or two messages needed for client/server communication No mechanism for describing state between operations A business process (BP)

2、 typically characterized by long-running, statefull sequence of operations with one or more web services (business partners).,3,Simple Example: Ordering Stationery,cobegininvoke Staples.StationeryQuote(staples-quote); invoke Office-Max.StationeryQuote Service(max-quote); coend; if staples-quote max-

3、quote invoke Staples.StationeryPurchase elseinvoke Office-Max.StationeryPurchase,state,4,New Issues,Must be able to communicate with other Web Services Must be able to access and modify data received in messages Use XPath to extract information from messages Must have control constructs sequence, sw

4、itch (if), flow (concurrency), while, link (synchronize concurrent processes), invoke, etc Must be able to handle faults,5,Example (BPEL), Continued on next slide ,6,Example (BPEL),7,Business Process (BP),A BP consists of both internal computations and invocations of operations exported by web servi

5、ce partners The operations it exports constitute its interface to its partners The sequence of invocations it executes is referred to as a protocol and is data dependent responds to exceptional conditions,8,Abstract Vs. Executable BPs,Executable BP complete description of BP (including all computati

6、ons) Abstract BP contains only externally visible (communication related) behavior of BP Not executable Internal decision making algorithm and data manipulation not described Languages for describing abstract and executable BPs share a common core, but differ primarily in data handling capabilities

7、BPEL4WS is used to specify both abstract and executable BPs,9,Executable BPs,BPEL is sufficient for describing a complete (executable) BP that Relies on web services and XML data Is portable (platform independent) Executable BP is a complete specification of the Web Service Actual implementation, ho

8、wever, might not use BPEL, Abstract BP specifies external interface and can be exported for use by business partners,10,Abstract BP,Unfolding of protocol related portion of BP depends on properties - a subset of the data contained in messages Ex. Message invoking getQuoteRequest might have parts ins

9、trumentType (with value stock or bond) and symbol (which identifies a particular instrument of that type) instrumentType will be a property if it affects the course of the protocol symbol will not if it does not affect the course of the protocol Only properties are visible to abstract BP,11,Abstract

10、 Vs Executable BP,Internal computation of executable BP not included in abstract BP If assignment is to a variable that is not a property, it is eliminated from abstract process Ex. Address data might not affect the protocol If assignment is to a variable that is a property, it (generally) affects t

11、he protocol Ex. Value of bidPrice might affect protocol: if (bidPrice1000) invoke webService1 else invoke webService2 bidPrice will be a property, but its value is computed by an internal algorithm The computation that produces the new value is generally not relevant to the protocol,12,Abstract BP N

12、on-determinism,Description of abstract BP allows assignment of non-deterministic values to properties to model this Abstract and executable BPs differ in data handling ability Executable can explicitly manipulate all data Abstract can access only properties in limited ways and can assign non-determi

13、nistic values to them Executable cannot assign non-deterministic values to anything,13,Abstract BP Non-determinism,computation that assigns a value to part x,non-deterministic assignment to property x (alias of x),switch(x),switch(x ),Executable BP,Abstract BP,14,Communication Client Side,Invoking a

14、n operation of an interface (specified in WSDL) exported by server Client assigns message to operations input variable Client executes invoke on operation Asynchronous (in-only WSDL pattern): Client resumes execution immediately Synchronous (in-out WSDL pattern): Client waits for response and then r

15、esumes execution Client can access response message in operations output variable,15,Communication Client Side,Receiving an operation (e.g., an asynchronous response to a prior invocation) on a (callback) operation exported by client Client executes receive on operation Client waits for message Clie

16、nt can access message in variable associated with operation and resume execution,16,Communication Client Side,client serverinvokeinvokeinvokereceive, , , , ,server exports interface,client exports (callback) operation,(synchronous invoke),(asynchronous invoke),client waits,client continues,problem:

17、how do you associate request with response?, ,17,Communication Server Side,Accepting an operation invocation on an (exported) interface (specified in WSDL) Server executes receive on operation and waits Responding to a synchronous operation invocation Server executes reply on operation (rpc) Invokin

18、g a clients exported (callback) operation Server executes invoke on operation,18,Communication Server Side,client serverinvoke, , , , , ,server exports interface,client exports (callback) interface,(synchronous invoke),(asynchronous invoke),receive,reply,receive,receive,invoke,invoke,receive,invoke,

19、19,Example: Purchase Order (PO) Service,initiate price calculation,complete price calculation,arrange logistics,invoice processing, reply,decide on shipper,complete production scheduling,receive purchase order,initiate production scheduling,concurrency,sequencing,synchronization,20,PO Service,custom

20、er,receive,reply,Body of PO Service,POMsg,InvMsg,operation sendPurchOr on interface purchOrIf,synchronousinvocation,PO Service,21,PO Service Interface (WSDL),- arguments supplied- response,interface exported by PO Service,prefix for target namespace in this document,22,Variables (BPEL),Variables mai

21、ntain the state of a BP Used to store messages that have been sent or received or for local storage (no message involved) Has an associated type: Can be a message typeCan be an XML simple type Can be an XML schema element (which might have a complex type) Has an associated scope,lns is prefix in BPE

22、L document for the WSDL document,23,Partner Link Type (WSDL), describes the way two BPs interact:- names an interface that must be declared in each- associates with each end of the interaction,Only one role since only POService needs to provide an interface,Unit of collaboration,Not a process (allow

23、s actual partner to be specified dynamically),Identifies a BPEL schema,24,Partner Link Type (WSDL),BP playing role of invoice requester,BP playing role of invoice service,invoiceCallbackIf,computePriceIf,description of a possible relationship between two BPs,25,Partner Link (BPEL),hence PO service m

24、ust provide purchOrIf, Connection to another BP described by a partner link construct in BPEL names a process and associates it with a role in that link.,prefix lns refers to WSDL document,name of partnerLink,partner specification in PO service,26,Partner (BPEL),A BP might interact with another BP c

25、alled a partner - through several partnerLinks Need a mechanism that asserts that the same BP is at the other end of a set of partnerLinks Ex: BPs might support getFareIf and purchaseTicketIf; an acceptable partner is one that supports both,27,Process Name,Each BP is assigned a name in the tag, decl

26、arations and process body declarations and body of PO service ,28,Linkage: Customer to PO Service,WSDL inter- face exported by PO Service,partner specification in customer process,partner specification in PO Service,plnk prefix in WSDL doc refersto WSDL extension pos target ns of WSDL doc lns prefix

27、 in PO Service refers to WSDL doc cns prefix in customer refersto WSDL doc,29,Partners, In general:- A partnerLinktype is not specific to a particular BP;it is a global, bilateral (WSDL) description of the interaction between two BPs.- A partnerLink declaration (BPEL) describes how the local BP inte

28、racts with other BPs through a partnerLinktype.,30,PO Service (BPEL),. concurrent body. ,Both necessary since PO Service might communicatewith several BPs through the same interface,31,Interaction with Shipping Provider,decide on shipper (invoke),arrange logisitics (receive),shippingProvider,shipReq

29、Msg,shipInfoMsg,operation requestShipping on interface shippingIf,operation sendSchedule on port shippingCallbackIf,role = shippingService,role = shippingRequester,scheduleMsg,32,Handling Shipping (WSDL),interface exported by PO Service,interface imported from shipping service,33,Handling Shipping,W

30、SDL,BPEL,34,Handling Shipping (BPEL),contains input message,35,Links (BPEL) Synchronizing Concurrent Activities w/I a BP,Production scheduling cannot be completed until logistics have been arranged,decide on shipper,arrange logistics,complete production scheduling,initiate production scheduling,sour

31、ce,target,link,Concurrent sequence activities in flow, data produced by arrange logistics is needed by complete production scheduling data communicated through globally shared variable,36,Links,. . ,shipping,scheduling,arrange logistics,complete production scheduling,decide on shipper,37,Properties

32、(WSDL),Some message data is protocol-relevant. Used in conditional behavior of BP Used to relate messages sent to a particular instance of a BP A property declares a global name that can be assigned to data items that may be parts of several different message types and carry the same meaning taxpaye

33、rID might be a part of one message type in one namespace (e.g., Internal Revenue), ssn might be a part of another in a different namespace (e.g., Social Sec. Admin) Both might represent the same information of type txtyp:SSN,38,Property Alias (WSDL),Used to associate a property name with a field in

34、message part A particular property can be associated with different fields in different messages,query string specified in XPath - to locate the field in the part,39,Correlation Sets (BPEL),A web service might be configured with multiple instances of a BP to concurrently handle (stateful) conversati

35、ons with multiple clients. All receive requests over the same port With SOAP over HTTP, messages arrive on port 80 A mechanism is needed to: Route an arriving message that is part of a particular conversation to the correct BP instance Messages of a particular conversation can be recognized by the f

36、act that they will generally all carry some identifying value(s) (e.g., customerID and orderNum),40,Correlation Sets,A correlation set is a set of properties whose value is shared by all messages in a particular conversation. Hence, an address is really: (host address, port, correlation set) A corre

37、lation set identifies the BP instance,aliased to items of information contained in the messages of a conversation,41,Using Correlation Sets,A particular receive operation can be used in a BP to accept the start of a new conversationAll subsequently arriving messages with same value of PurchaseOrder

38、will be directed to this BP,create a new correlation set value for BP instance,asynchronous purchase requst,42,Using Correlation Sets,Response returns the correlation set value Asynchronous (callback) response to previous invocationA reply to a synchronous invocation would be similar,use the set to

39、address the message,43,Multiple Correlation Sets,buyer server invoke(corrSet=“PO” init=“yes”) receive(corrSet=“PO” init=“yes”)receive(corrSet=“PO” init=“no” invoke(corrSet=“PO” init=“no”corrSet=“inv” init=“yes”) corrSet=“inv” init=“yes”)subsequent messages sent and received usecorrelation set inv,me

40、sssage contains both correlation sets,messages of a single conversation,44,Multiple Correlation Sets,With synchronous invocation two messages are involved; the pattern attribute associates a correlation set with a message.,invoke (partnerLink=“Buyer” interface=“SP:BuyerIf”operation=“synchPurchaseRes

41、p”inputVariable=“PO” outputVariable=“invoice”(initiated in outbound msg)(initiated in inbound msg,which contains both sets),45,Data Manipulation,Data (state) stored in variables (used for messages and local storage) Expressions use expression language (XPath default) to access data in variables Exec

42、utable processes can use:All processes can use:Returns the part (or, if the locationPath is specified the field within the part) in the named variable. If a single node is not specified, a fault is returned.,bpws:getVariableData (variableName, partName, locationPath?),bpws:getVariableProperty(variab

43、leName, propertyName),query string,property alias contains query string,46,Assignment,Allows copying of data One form (for executable processes):query is an absolute expression (if XPath is the query language) that identifies a single node w/i the document fragment specified by part from child can a

44、lso contain a literal value or a simple arithmetic expression (for data transformation),47,Assignment in Abstract Process,A non-deterministic value from a propertys domain can be assigned to the property by an abstract process using opaque assignment Allows simulation of execution traces,48,Invoking

45、 Web Service Operations,invoke might have child elements related to faults and compensation (discussed subsequently), and links and correlation (discussed previously) invoke specifies a partnerLink since an interface can be associated with several partnerLinkTypes connected to different BPs,49,Invok

46、ing Web Service Operations,invoke can be Synchronous input and output variables specified waits for a response Asynchronous no output variable specified no waiting,50,Synchronous Vs. Asynchronous Invocation,Web service communication characterized by: Services are not always available. Loads tend to

47、be unpredictable. Attempts to handle too many requests in real time can lead to thrashing and failure. Many requests cant be handled instantly even with low loads. Asynchronous invocation will play an increasingly important role.,51,Providing Web Service Operations,receive waits for an invocation to

48、 arrivespecifies a partnerLink since an interface can be associated with several partnerLinkTypes connected to different BPs,52,Providing Web Service Operations,Initiating a new instance of a BP:createInstance=“yes” = a new instance of the BP is created and this is its initial activity. The receive should be the first activity in the BP (since prior activities will not be executed within the new instance) If the message is the start of a conversation then a correlation child element should be specified:,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 教学课件 > 大学教育

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1