SlideShare uma empresa Scribd logo
1 de 63
Web Services (NSWI145)
Lecture 09: WS BPEL
Martin Nečaský, Ph.D.
Faculty of Mathematics and Physics
Charles University in Prague, Czech Republic
Summer 2013
Core WS Technologies
 SOAP
 defines XML messaging protocol for basic web
service interoperability
 WSDL
 introduces common grammar for describing web
services
Summer 2013
Business Process Automation
 ordering of activities with beginning and end
performed to achieve business outcome
 has inputs and outputs
Summer 2013
Business Process Automation
 WSDL provides only stateless model for
particular
 request-response message exchange, or
 uncorrelated one-way message exchange
 typical model of business interaction
 sequence of particular peer-to-peer message
exchanges
• request-response and/or one-way
 stateful, long running interactions involving two or
more parties
Summer 2013
Business Process Automation
 core WS technologies allow automation of
only particular message exchange
 we need additional WS technologies to
support automation of whole business
processes
 core terms
 WS orchestration
 WS choreography
Summer 2013
WS Orchestration
 specifies an executable process
 result is a web service
 view of one party that controls the process
 WS-BPEL: Web Services Business Process
Execution Language
Summer 2013
WS Choreography
 specifies a sequence of messages between collaborating
partners and resources
 how they should communicate with each other
 not an executable process
 no particular view of particular partner
 WS-CDL: Web Services Choreography Description
Language
Summer 2013
BPEL
 XML based language for orchestrating Web
Services
 BPEL has two parts
 extensions to WSDL
 business process execution constructs
 BPEL script (internal process specification) +
WSDL document (external process specification)
 define new Web Service implemented as
orchestration of other Web Services
 requires WSDL 1.1 (WSDL 2.0 not supported)
Summer 2013
Sample Process
Receive Purchase Order
Send Invoice
Check Credit Card
Process Payment
Calculate Purchase
Order Price
Arrange Logistics
Summer 2013
BPEL
 BPEL process = Abstract Web Service
 has WSDL description
• port types composed of operations with inputs and
outputs
• operates only on the level of WSDL portTypes
– no binding to concrete services specified by WS-BPEL process
description
 orchestrates other web services
Summer 2013
Process Exposition with WSDL
 exposes BPEL process as a web service
described with WSDL
 WSDL 1.1 file with few restrictions and
extensions
 restrictions
• no service and binding is defined
• only types, messages, port types with operations
Summer 2013
Process Exposition with WSDL
PurchaseOrder
Process
PurchaseOrder
PortType
sendPurchaseOrder
Operation
Customer
Purchase Order
Invoice
Summer 2013
Process Exposition with WSDL
<wsdl:description targetNamespace="http://purchase" ...>
...
<wsdl:portType name="PurchaseOrderPortType">
<wsdl:operation name="sendPurchaseOrderOperation">
<wsdl:input name="pos:PurchaseOrder" />
<wsdl:output name="pos:Invoice" />
</wsdl:operation>
</wsdl:portType>
</wsdl:description>
Summer 2013
Process Exposition with WSDL
 WSDL 1.1 file with few restrictions and
extensions
 extensions
• partner link type
– characterization of conversational relationships between
process and its partner
• partner link type between process and web service
utilized by process
– two participants (process and web service) each with own role
• partner link type between process and its client
– one participant (process) with own role
Summer 2013
CreditCard
Service
CreditCard
PortType
checkCreditCard
Operation
Process Exposition with WSDL
PurchaseOrder
Process
CreditCardCallback
PortType
processPayment
Operation
confirmCreditCard
Operation
CreditCardConfirmation
confirmPayment
Operation
PaymentConfirmation
partner link
type
CreditCard
Payment
Summer 2013
Process Exposition with WSDL
<wsdl:description targetNamespace="http://purchase" ...>
...
<wsdl:portType name="CreditCardCallbackPortType">
<wsdl:operation name="confirmCreditCardOperation">
<wsdl:input name="cc:CreditCardConfirmation" />
</wsdl:operation>
<wsdl:operation name="confirmPaymentOperation">
<wsdl:input name="cc:PaymentConfirmation" />
</wsdl:operation>
</wsdl:portType>
</wsdl:description>
Summer 2013
Process Exposition with WSDL
<wsdl:description
targetNamespace="http://creditcard" ...>
...
<wsdl:portType name="CreditCardPortType">
<wsdl:operation name="checkCreditCardOperation">
<wsdl:input name="cc:CreditCard" />
<wsdl:output name="cc:CreditCardConfirmation" />
</wsdl:operation>
<wsdl:operation name="processPaymentOperation">
<wsdl:input name="cc:Payment" />
<wsdl:output name="cc:PaymentConfirmation" />
</wsdl:operation>
</wsdl:portType>
</wsdl:description>
Summer 2013
Process Exposition with WSDL
 element partnerLinkType
 WSDL extension
 specifies WSDL port types the process offers to and requires
from a partner service
 attribute name
• unique name of the partner link type within the scope of the
WSDL description
 two (typically) or one element role
• each specifies role one of the communicating services acts
• attribute name
– unique name of the role within the partner link type
• attribute portType
– specifies WSDL port type the service acting in this role must offer
Summer 2013
Process Exposition with WSDL
<wsdl:description xmlns:plnk =
"http://docs.oasis-open.org/wsbpel/2.0/plnktype">
...
<plnk:partnerLinkType name="CreditCardLinkType">
<plnk:role name="CreditCardServiceRole"
portType="cc:CreditCardPortType" />
<plnk:role name="CreditCardClientRole"
portType="pos:CreditCardCallbackPortType" />
</plnk:partnerLinkType>
</wsdl:description>
Summer 2013
Process Exposition with WSDL
<wsdl:description xmlns:plnk =
"http://docs.oasis-open.org/wsbpel/2.0/plnktype">
...
<plnk:partnerLinkType name="PurchaseOrderRequestLinkType">
<plnk:role name="PurchaseOrderServiceRole"
portType="pos:PurchaseOrderPortType" />
</plnk:partnerLinkType>
</wsdl:description>
Summer 2013
Process Definition
 root element process with four major sections:
 partnerLinks section
• relationships from process to external partner services
 variables section
• declaration of process data
 faultHandlers section
• handlers for processing faults
 main activity
• activity to be executed by the process
Summer 2013
Process Exposition with WSDL
<process xmlns =
"http://docs.oasis-open.org/wsbpel/2.0/
process/executable">
<partnerLinks>...</partnerLinks>
<variables>...</variables>
<faultHandlers>...</faultHandlers>
<!–- {MAIN ACTIVITY} -->
</process>
Summer 2013
Process Definition – Partner Link
 specified by element partnerLink
 models a link between the process and a
partner service
 instance of a partner link type
 attribute name
 unique name of the partner link within the
process
 attribute partnerLinkType
 reference to the partner link type
Summer 2013
Process Definition – Partner Link
 attribute myRole
 references the role in the partner link type acted
by the process
 attribute partnerRole
 references the role in the partner link type acted
by the partner service
Summer 2013
Process Definition – Partner Link
<process>
<partnerLinks>
<partnerLink name="CreditCardLink"
partnerLinkType="pos:CreditCardLinkType"
myRole="CreditCardClientRole"
partnerRole="CreditCardServiceRole" />
...
</partnerLinks>
...
</process>
Summer 2013
Process Definition – Partner Link
<process>
<partnerLinks>
...
<partnerLink name="PurchaseOrderRequestLink"
partnerLinkType="pos:PurchaseOrderRequestLinkType"
myRole="PurchaseOrderServerRole" />
...
</partnerLinks>
...
</process>
Summer 2013
Process Definition – Variable
 element variable
 variables hold data that constitute the state of the
process
 attribute name
• unique variable name
 content type of the variable specified as WSDL
message type, XSD element or XSD simple/complex
type
• attribute messageType
– reference to WSDL message type
• attribute element
– reference to XSD element declaration
• attribute type
– reference to XSD simple/complex type definition
Summer 2013
Process Definition – Variable
<process>
<variables>
<variable name="PurchaseOrderMessage"
messageType="pos:PurchaseOrder" />
<variable name="CreditCardMessage"
messageType="cc:CreditCard" />
<variable name="CreditCardConfirmationMessage"
messageType="cc:CreditCardConfirmation" />
<variable name="InvoiceMessage"
messageType="pos:Invoice" />
... </variables>
... </process>
Summer 2013
Process Definition - Activities
 specify the process itself (main activity) or fault handling
 several types of activities:
 messaging activities
• invoke, receive, reply, assign, …
 structured activities
• sequence, flow, if, while, …
 fault activities
• throw, exit, …
 compensation activities
• compensate, …
Summer 2013
Process Definition – invoke
 allows business process to call a partner service
 invokes one-way or request-response operation on a partner's port
type
 attribute partnerLink
 specifies invoked partner port type
 attribute operation
 specifies invoked operation of the partner port type
 attribute inputVariable
 specifies variable with the input message
 can be replaced by toParts element with toPart child elements if
the input message has more parts
 attribute outputVariable
 specifies variable with the output message
 can be replaced by fromParts element with fromPart child
elements if the output message has more parts
Summer 2013
Process Definition – invoke
<process>
<invoke
name="CreditCardCheckInvoke"
partnerLink="CreditCardLink"
operation="checkCreditCard"
inputVariable="CreditCardMessage"
outputVariable="CreditCardConfirmationMessage" />
</process>
Summer 2013
Process Definition – receive
 allows business process to receive a message
from a partner service
 blocking activity
 attribute partnerLink
 specifies port type of the process that is awaited
to be invoked by the partner
 attribute operation
 specifies operation of the port type that is awaited
to be invoked by the partner
Summer 2013
Process Definition – receive
 attribute variable
 specifies variable where the arrival message will
be assigned
 attribute createInstance
 "yes"/"no" value
 if "yes" the activity creates new process
instance
Summer 2013
Process Definition – receive
<process>
<receive
name="PurchaseOrderRequestFromCustomer"
partnerLink="PurchaseOrderRequestLink"
operation="processPurchaseOrder"
variable="PurchaseOrderMessage"
createInstance="yes" />
</process>
Summer 2013
Process Definition – reply
 allows business process to send a message in
a reply to a message that was received by
receive
 similar structure to invoke
Summer 2013
Process Definition – reply
<process>
<reply
name="InvoiceReplyToCustomer"
partnerLink="PurchaseOrderRequestLink"
operation="processPurchaseOrder"
variable="InvoiceMessage" />
</process>
Summer 2013
Process Definition – receive/reply
 implements request/response message
exchange pattern
 it is a pair
 if there are more pairs, distinguish them by
attribute messageExchange
Summer 2013
Process Definition – assign
 allows updating values of variables with new
data
 copying data from one variable to another
 construct new data and copy them to a variable
 type validity checked
 element copy
 element from
 element to
Summer 2013
Process Definition – assign
 several variants of from and to:
1. from variable to variable
<assign>
<copy>
<from variable="c1" />
<to variable="c2" />
</copy>
</assign>
Summer 2013
Process Definition – assign
 several variants of from and to:
2. from variable part to variable
<assign>
<copy>
<from>$c1/lines/line[1]</from>
<to variable="c2" />
</copy>
</assign>
Summer 2013
Process Definition – assign
 several variants of from and to:
3. from XSLT script to variable
<assign>
<copy>
<from>bpel:doXslTransform(".../t.xsl", $c1)</from>
<to variable="c2" />
</copy>
</assign>
Summer 2013
Process Definition – sequence
 specifies activities to be performed
sequentially
Summer 2013
Process Definition – sequence
<process>
<sequence>
<receive name="PurchaseOrderRequestFromCustomer" ... />
<assign>
<copy>
<from>$PurchaseOrderMessage/creditCard</from>
<to variable="CreditCardMessage" />
</copy>
</assign>
<invoke name="CreditCardCheckInvoke" ... />
<assign>...</assign>
<reply name="InvokeReplyToCustomer />
</sequence> </process>
Summer 2013
Process Definition – flow
 specifies one or more activities to be
performed concurrently
Summer 2013
Process Definition – flow
<process>
<flow>
<sequence>
<invoke name="CreditCardCheckInvoke" ... />
<invoke name="ProcessPaymentInvoke" ... />
</sequence>
<invoke name="CalculatePriceInvoke" ... />
<invoke name="LogisticsInvoke" ... />
</flow>
</process>
Summer 2013
Process Definition – flow
 element link
 declares synchronization dependency for flow
 attribute name
• identifies dependency within flow
Summer 2013
Process Definition – flow
<process>
<flow>
<links>
<link name="PriceToPaymentLink" />
</links>
...
</flow>
</process>
Summer 2013
Process Definition – flow
 each activity may contain sources with one or more
source and targets with one or more target
 establish synchronization relations via links
 element source
 attribute linkName - specifies that the activity is source
activity of the link
 element target
 attribute linkName - specifies that the activity is target
activity of the link
Summer 2013
Process Definition – flow
 for a given link, its target activities must wait
until its source activities have finished
Summer 2013
Process Definition – flow
<process>
<flow>
...
<invoke name="CalculatePriceInvoke" ... >
<sources>
<source name="PriceToPaymentLink" />
</sources>
</invoke>
...
</flow>
</process>
Summer 2013
Process Definition – flow
<process>
<flow>
...
<sequence>
<invoke name="CreditCardCheckInvoke" ... />
<invoke name="ProcessPaymentInvoke" ... >
<targets>
<target name="PriceToPaymentLink" />
</target>
</invoke>
</sequence>
...
</flow>
</process>
Summer 2013
Process Definition – flow
 element joinCondition in targets
 contains logical expression specifying waiting
condition
Summer 2013
Process Definition – flow
<flow>
<links>...</links>
<sequence name="W">
<targets>
<joinCondition>$XtoW and $YtoW</joinCondition>
<target linkName="XtoW" />
<target linkName="YtoW" />
</targets>
...
</sequence>
</flow>
Summer 2013
Process Definition – flow
 element transitionCondition in
source
 contains logical expression specifying condition for
setting the link to true (additional condition to
"being finished")
Summer 2013
Process Definition – flow
<flow>
<links>...</links>
<sequence name="X">
<sources>
<source linkName="XtoV">
<transitionCondition>$c &gt; 1000</transitionCondition>
</source>
<source linkName="XtoW">
<transitionCondition>$c &le; 1000</transitionCondition>
</source>
</sources>
...
</sequence>
</flow>
Summer 2013
Process Definition – scope
 allows definition of local partner
links, variables and activities
Summer 2013
Process Definition – if
 used to select exactly one activity from given branches
 branch = activity
 first branch is directly as child
 element condition
 contains logical expression
 condition for first branch activity
 element elseif
 element condition
 other branch activity under a condition
 element else
 last branch
Summer 2013
Process Definition – if
<if>
<invoke>...</invoke>
<condition>$PaymentMessage/price &gt; 1000</condition>
<elseif>
<invoke>...</invoke>
<condition>$PaymentMessage/price&gt;500</condition>
</elseif>
<else>
<invoke>...</invoke>
</else>
</if>
Summer 2013
Process Definition – while
 used to define that the child activity is to be
repeated as long as the specified condition is
true
 element condition
 contains logical expression
Summer 2013
Process Definition – while
<while>
<condition>$c1 &gt; 1000</condition>
<sequence>
<invoke>...</invoke>
<assign>
<from>...</from>
<to>$c1</to>
</assign>
</sequence>
</while>
Summer 2013
Process Definition – forEach
 iterates its child scope exactly N+1 times
where N is given by finalCounterValue
child element minus startCounterValue
child element
 iterated activity is in the child scope
 attribute parallel
 "yes"/"no" value
 if "yes" iterations are performed in parallel
  flow with N+1 activities each for one iteration
Summer 2013
Process Definition – forEach
<forEach parallel="yes" countername="n">
<startCounterValue>1</startCounterValue>
<finalCounterValue>
count($PurchaseOrder//item)
</finalCounterValue>
<scope>
... variable $n with actual counter value ...
... iterated activity ...
</scope>
</forEach>
Summer 2013
Advanced Concepts
 not presented in this lecture:
 fault handling
 event handling
 terminating processes
 undoing completed work (i.e. compensations)
 message correlation
 dynamic partner resolution
 abstract processes
Summer 2013

Mais conteúdo relacionado

Mais procurados

Android chapter16-web-services
Android chapter16-web-servicesAndroid chapter16-web-services
Android chapter16-web-servicesAravindharamanan S
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webserviceDong Ngoc
 
Svcc2009 Async Ws
Svcc2009 Async WsSvcc2009 Async Ws
Svcc2009 Async WsManoj Kumar
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2kriszyp
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSam Brannen
 
Data Binding Unleashed for Composite Applications
Data Binding Unleashed for Composite ApplicationsData Binding Unleashed for Composite Applications
Data Binding Unleashed for Composite ApplicationsRaymond Feng
 
The importance of Exchange 2013 CAS in Exchange 2013 coexistence | Part 1/2 |...
The importance of Exchange 2013 CAS in Exchange 2013 coexistence | Part 1/2 |...The importance of Exchange 2013 CAS in Exchange 2013 coexistence | Part 1/2 |...
The importance of Exchange 2013 CAS in Exchange 2013 coexistence | Part 1/2 |...Eyal Doron
 

Mais procurados (10)

SOAP-based Web Services
SOAP-based Web ServicesSOAP-based Web Services
SOAP-based Web Services
 
Android chapter16-web-services
Android chapter16-web-servicesAndroid chapter16-web-services
Android chapter16-web-services
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webservice
 
Svcc2009 Async Ws
Svcc2009 Async WsSvcc2009 Async Ws
Svcc2009 Async Ws
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
 
Soap and Rest
Soap and RestSoap and Rest
Soap and Rest
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
WebServices
WebServicesWebServices
WebServices
 
Data Binding Unleashed for Composite Applications
Data Binding Unleashed for Composite ApplicationsData Binding Unleashed for Composite Applications
Data Binding Unleashed for Composite Applications
 
The importance of Exchange 2013 CAS in Exchange 2013 coexistence | Part 1/2 |...
The importance of Exchange 2013 CAS in Exchange 2013 coexistence | Part 1/2 |...The importance of Exchange 2013 CAS in Exchange 2013 coexistence | Part 1/2 |...
The importance of Exchange 2013 CAS in Exchange 2013 coexistence | Part 1/2 |...
 

Semelhante a Web Services - Business Process Execution Language

Semelhante a Web Services - Business Process Execution Language (20)

Web services
Web servicesWeb services
Web services
 
Java Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDIJava Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDI
 
Lecture 16 - Web Services
Lecture 16 - Web ServicesLecture 16 - Web Services
Lecture 16 - Web Services
 
Steps india technologies
Steps india technologiesSteps india technologies
Steps india technologies
 
Steps india technologies .com
Steps india technologies .comSteps india technologies .com
Steps india technologies .com
 
Web service introduction
Web service introductionWeb service introduction
Web service introduction
 
Cloud computing 22 soap and uddi in services
Cloud computing 22 soap and uddi in servicesCloud computing 22 soap and uddi in services
Cloud computing 22 soap and uddi in services
 
Cloud computing 20 service modelling
Cloud computing 20 service modellingCloud computing 20 service modelling
Cloud computing 20 service modelling
 
Web services tutorial
Web services tutorialWeb services tutorial
Web services tutorial
 
Webservices
WebservicesWebservices
Webservices
 
Wsdl
WsdlWsdl
Wsdl
 
Web services
Web servicesWeb services
Web services
 
Web Services - WSDL
Web Services - WSDLWeb Services - WSDL
Web Services - WSDL
 
Web Services
Web Services Web Services
Web Services
 
Webservices
WebservicesWebservices
Webservices
 
Web service architecture
Web service architectureWeb service architecture
Web service architecture
 
Developmeant and deployment of webservice
Developmeant and deployment of webserviceDevelopmeant and deployment of webservice
Developmeant and deployment of webservice
 
Cloud computing 21 concept of wsdl modeling
Cloud computing 21 concept of wsdl modelingCloud computing 21 concept of wsdl modeling
Cloud computing 21 concept of wsdl modeling
 
Service Oriented Architecture Updated Luqman
Service Oriented Architecture Updated  LuqmanService Oriented Architecture Updated  Luqman
Service Oriented Architecture Updated Luqman
 
SOA web services concepts
SOA web services conceptsSOA web services concepts
SOA web services concepts
 

Mais de Martin Necasky

Linked Open Data - Masaryk University in Brno 8.11.2016
Linked Open Data - Masaryk University in Brno 8.11.2016Linked Open Data - Masaryk University in Brno 8.11.2016
Linked Open Data - Masaryk University in Brno 8.11.2016Martin Necasky
 
Tutoriál : Otevřená a propojitelná data veřejné správy
Tutoriál : Otevřená a propojitelná data veřejné správyTutoriál : Otevřená a propojitelná data veřejné správy
Tutoriál : Otevřená a propojitelná data veřejné správyMartin Necasky
 
Linked Data for Czech Legislation - 2nd year of our project
Linked Data for Czech Legislation - 2nd year of our projectLinked Data for Czech Legislation - 2nd year of our project
Linked Data for Czech Legislation - 2nd year of our projectMartin Necasky
 
Linked Open Data for Public Contracts
Linked Open Data for Public ContractsLinked Open Data for Public Contracts
Linked Open Data for Public ContractsMartin Necasky
 
Linked Data for Czech Legislation
Linked Data for Czech LegislationLinked Data for Czech Legislation
Linked Data for Czech LegislationMartin Necasky
 
Otevrena data v CR - aktualni stav (brezen 2013)
Otevrena data v CR - aktualni stav (brezen 2013)Otevrena data v CR - aktualni stav (brezen 2013)
Otevrena data v CR - aktualni stav (brezen 2013)Martin Necasky
 
Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Martin Necasky
 
Web Services - SOAP (part 2)
Web Services - SOAP (part 2)Web Services - SOAP (part 2)
Web Services - SOAP (part 2)Martin Necasky
 
Otevrene problemy architektury elektronickeho zdravotnictvi
Otevrene problemy architektury elektronickeho zdravotnictviOtevrene problemy architektury elektronickeho zdravotnictvi
Otevrene problemy architektury elektronickeho zdravotnictviMartin Necasky
 
Vysledek souteze o navrh hospodarneho a funkcniho elektronickeho zdravotnictvi
Vysledek souteze o navrh hospodarneho a funkcniho elektronickeho zdravotnictviVysledek souteze o navrh hospodarneho a funkcniho elektronickeho zdravotnictvi
Vysledek souteze o navrh hospodarneho a funkcniho elektronickeho zdravotnictviMartin Necasky
 
Web Services - Introduction
Web Services - IntroductionWeb Services - Introduction
Web Services - IntroductionMartin Necasky
 
Techniky a nástroje pro propojená data (Linked Data)
Techniky a nástroje pro propojená data (Linked Data)Techniky a nástroje pro propojená data (Linked Data)
Techniky a nástroje pro propojená data (Linked Data)Martin Necasky
 
Linked Data pro Evropský sociální fond
Linked Data pro Evropský sociální fondLinked Data pro Evropský sociální fond
Linked Data pro Evropský sociální fondMartin Necasky
 

Mais de Martin Necasky (14)

Linked Open Data - Masaryk University in Brno 8.11.2016
Linked Open Data - Masaryk University in Brno 8.11.2016Linked Open Data - Masaryk University in Brno 8.11.2016
Linked Open Data - Masaryk University in Brno 8.11.2016
 
Tutoriál : Otevřená a propojitelná data veřejné správy
Tutoriál : Otevřená a propojitelná data veřejné správyTutoriál : Otevřená a propojitelná data veřejné správy
Tutoriál : Otevřená a propojitelná data veřejné správy
 
Linked Data for Czech Legislation - 2nd year of our project
Linked Data for Czech Legislation - 2nd year of our projectLinked Data for Czech Legislation - 2nd year of our project
Linked Data for Czech Legislation - 2nd year of our project
 
Linked Open Data for Public Contracts
Linked Open Data for Public ContractsLinked Open Data for Public Contracts
Linked Open Data for Public Contracts
 
Linked Data for Czech Legislation
Linked Data for Czech LegislationLinked Data for Czech Legislation
Linked Data for Czech Legislation
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Otevrena data v CR - aktualni stav (brezen 2013)
Otevrena data v CR - aktualni stav (brezen 2013)Otevrena data v CR - aktualni stav (brezen 2013)
Otevrena data v CR - aktualni stav (brezen 2013)
 
Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)
 
Web Services - SOAP (part 2)
Web Services - SOAP (part 2)Web Services - SOAP (part 2)
Web Services - SOAP (part 2)
 
Otevrene problemy architektury elektronickeho zdravotnictvi
Otevrene problemy architektury elektronickeho zdravotnictviOtevrene problemy architektury elektronickeho zdravotnictvi
Otevrene problemy architektury elektronickeho zdravotnictvi
 
Vysledek souteze o navrh hospodarneho a funkcniho elektronickeho zdravotnictvi
Vysledek souteze o navrh hospodarneho a funkcniho elektronickeho zdravotnictviVysledek souteze o navrh hospodarneho a funkcniho elektronickeho zdravotnictvi
Vysledek souteze o navrh hospodarneho a funkcniho elektronickeho zdravotnictvi
 
Web Services - Introduction
Web Services - IntroductionWeb Services - Introduction
Web Services - Introduction
 
Techniky a nástroje pro propojená data (Linked Data)
Techniky a nástroje pro propojená data (Linked Data)Techniky a nástroje pro propojená data (Linked Data)
Techniky a nástroje pro propojená data (Linked Data)
 
Linked Data pro Evropský sociální fond
Linked Data pro Evropský sociální fondLinked Data pro Evropský sociální fond
Linked Data pro Evropský sociální fond
 

Último

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Último (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Web Services - Business Process Execution Language

  • 1. Web Services (NSWI145) Lecture 09: WS BPEL Martin Nečaský, Ph.D. Faculty of Mathematics and Physics Charles University in Prague, Czech Republic Summer 2013
  • 2. Core WS Technologies  SOAP  defines XML messaging protocol for basic web service interoperability  WSDL  introduces common grammar for describing web services Summer 2013
  • 3. Business Process Automation  ordering of activities with beginning and end performed to achieve business outcome  has inputs and outputs Summer 2013
  • 4. Business Process Automation  WSDL provides only stateless model for particular  request-response message exchange, or  uncorrelated one-way message exchange  typical model of business interaction  sequence of particular peer-to-peer message exchanges • request-response and/or one-way  stateful, long running interactions involving two or more parties Summer 2013
  • 5. Business Process Automation  core WS technologies allow automation of only particular message exchange  we need additional WS technologies to support automation of whole business processes  core terms  WS orchestration  WS choreography Summer 2013
  • 6. WS Orchestration  specifies an executable process  result is a web service  view of one party that controls the process  WS-BPEL: Web Services Business Process Execution Language Summer 2013
  • 7. WS Choreography  specifies a sequence of messages between collaborating partners and resources  how they should communicate with each other  not an executable process  no particular view of particular partner  WS-CDL: Web Services Choreography Description Language Summer 2013
  • 8. BPEL  XML based language for orchestrating Web Services  BPEL has two parts  extensions to WSDL  business process execution constructs  BPEL script (internal process specification) + WSDL document (external process specification)  define new Web Service implemented as orchestration of other Web Services  requires WSDL 1.1 (WSDL 2.0 not supported) Summer 2013
  • 9. Sample Process Receive Purchase Order Send Invoice Check Credit Card Process Payment Calculate Purchase Order Price Arrange Logistics Summer 2013
  • 10. BPEL  BPEL process = Abstract Web Service  has WSDL description • port types composed of operations with inputs and outputs • operates only on the level of WSDL portTypes – no binding to concrete services specified by WS-BPEL process description  orchestrates other web services Summer 2013
  • 11. Process Exposition with WSDL  exposes BPEL process as a web service described with WSDL  WSDL 1.1 file with few restrictions and extensions  restrictions • no service and binding is defined • only types, messages, port types with operations Summer 2013
  • 12. Process Exposition with WSDL PurchaseOrder Process PurchaseOrder PortType sendPurchaseOrder Operation Customer Purchase Order Invoice Summer 2013
  • 13. Process Exposition with WSDL <wsdl:description targetNamespace="http://purchase" ...> ... <wsdl:portType name="PurchaseOrderPortType"> <wsdl:operation name="sendPurchaseOrderOperation"> <wsdl:input name="pos:PurchaseOrder" /> <wsdl:output name="pos:Invoice" /> </wsdl:operation> </wsdl:portType> </wsdl:description> Summer 2013
  • 14. Process Exposition with WSDL  WSDL 1.1 file with few restrictions and extensions  extensions • partner link type – characterization of conversational relationships between process and its partner • partner link type between process and web service utilized by process – two participants (process and web service) each with own role • partner link type between process and its client – one participant (process) with own role Summer 2013
  • 15. CreditCard Service CreditCard PortType checkCreditCard Operation Process Exposition with WSDL PurchaseOrder Process CreditCardCallback PortType processPayment Operation confirmCreditCard Operation CreditCardConfirmation confirmPayment Operation PaymentConfirmation partner link type CreditCard Payment Summer 2013
  • 16. Process Exposition with WSDL <wsdl:description targetNamespace="http://purchase" ...> ... <wsdl:portType name="CreditCardCallbackPortType"> <wsdl:operation name="confirmCreditCardOperation"> <wsdl:input name="cc:CreditCardConfirmation" /> </wsdl:operation> <wsdl:operation name="confirmPaymentOperation"> <wsdl:input name="cc:PaymentConfirmation" /> </wsdl:operation> </wsdl:portType> </wsdl:description> Summer 2013
  • 17. Process Exposition with WSDL <wsdl:description targetNamespace="http://creditcard" ...> ... <wsdl:portType name="CreditCardPortType"> <wsdl:operation name="checkCreditCardOperation"> <wsdl:input name="cc:CreditCard" /> <wsdl:output name="cc:CreditCardConfirmation" /> </wsdl:operation> <wsdl:operation name="processPaymentOperation"> <wsdl:input name="cc:Payment" /> <wsdl:output name="cc:PaymentConfirmation" /> </wsdl:operation> </wsdl:portType> </wsdl:description> Summer 2013
  • 18. Process Exposition with WSDL  element partnerLinkType  WSDL extension  specifies WSDL port types the process offers to and requires from a partner service  attribute name • unique name of the partner link type within the scope of the WSDL description  two (typically) or one element role • each specifies role one of the communicating services acts • attribute name – unique name of the role within the partner link type • attribute portType – specifies WSDL port type the service acting in this role must offer Summer 2013
  • 19. Process Exposition with WSDL <wsdl:description xmlns:plnk = "http://docs.oasis-open.org/wsbpel/2.0/plnktype"> ... <plnk:partnerLinkType name="CreditCardLinkType"> <plnk:role name="CreditCardServiceRole" portType="cc:CreditCardPortType" /> <plnk:role name="CreditCardClientRole" portType="pos:CreditCardCallbackPortType" /> </plnk:partnerLinkType> </wsdl:description> Summer 2013
  • 20. Process Exposition with WSDL <wsdl:description xmlns:plnk = "http://docs.oasis-open.org/wsbpel/2.0/plnktype"> ... <plnk:partnerLinkType name="PurchaseOrderRequestLinkType"> <plnk:role name="PurchaseOrderServiceRole" portType="pos:PurchaseOrderPortType" /> </plnk:partnerLinkType> </wsdl:description> Summer 2013
  • 21. Process Definition  root element process with four major sections:  partnerLinks section • relationships from process to external partner services  variables section • declaration of process data  faultHandlers section • handlers for processing faults  main activity • activity to be executed by the process Summer 2013
  • 22. Process Exposition with WSDL <process xmlns = "http://docs.oasis-open.org/wsbpel/2.0/ process/executable"> <partnerLinks>...</partnerLinks> <variables>...</variables> <faultHandlers>...</faultHandlers> <!–- {MAIN ACTIVITY} --> </process> Summer 2013
  • 23. Process Definition – Partner Link  specified by element partnerLink  models a link between the process and a partner service  instance of a partner link type  attribute name  unique name of the partner link within the process  attribute partnerLinkType  reference to the partner link type Summer 2013
  • 24. Process Definition – Partner Link  attribute myRole  references the role in the partner link type acted by the process  attribute partnerRole  references the role in the partner link type acted by the partner service Summer 2013
  • 25. Process Definition – Partner Link <process> <partnerLinks> <partnerLink name="CreditCardLink" partnerLinkType="pos:CreditCardLinkType" myRole="CreditCardClientRole" partnerRole="CreditCardServiceRole" /> ... </partnerLinks> ... </process> Summer 2013
  • 26. Process Definition – Partner Link <process> <partnerLinks> ... <partnerLink name="PurchaseOrderRequestLink" partnerLinkType="pos:PurchaseOrderRequestLinkType" myRole="PurchaseOrderServerRole" /> ... </partnerLinks> ... </process> Summer 2013
  • 27. Process Definition – Variable  element variable  variables hold data that constitute the state of the process  attribute name • unique variable name  content type of the variable specified as WSDL message type, XSD element or XSD simple/complex type • attribute messageType – reference to WSDL message type • attribute element – reference to XSD element declaration • attribute type – reference to XSD simple/complex type definition Summer 2013
  • 28. Process Definition – Variable <process> <variables> <variable name="PurchaseOrderMessage" messageType="pos:PurchaseOrder" /> <variable name="CreditCardMessage" messageType="cc:CreditCard" /> <variable name="CreditCardConfirmationMessage" messageType="cc:CreditCardConfirmation" /> <variable name="InvoiceMessage" messageType="pos:Invoice" /> ... </variables> ... </process> Summer 2013
  • 29. Process Definition - Activities  specify the process itself (main activity) or fault handling  several types of activities:  messaging activities • invoke, receive, reply, assign, …  structured activities • sequence, flow, if, while, …  fault activities • throw, exit, …  compensation activities • compensate, … Summer 2013
  • 30. Process Definition – invoke  allows business process to call a partner service  invokes one-way or request-response operation on a partner's port type  attribute partnerLink  specifies invoked partner port type  attribute operation  specifies invoked operation of the partner port type  attribute inputVariable  specifies variable with the input message  can be replaced by toParts element with toPart child elements if the input message has more parts  attribute outputVariable  specifies variable with the output message  can be replaced by fromParts element with fromPart child elements if the output message has more parts Summer 2013
  • 31. Process Definition – invoke <process> <invoke name="CreditCardCheckInvoke" partnerLink="CreditCardLink" operation="checkCreditCard" inputVariable="CreditCardMessage" outputVariable="CreditCardConfirmationMessage" /> </process> Summer 2013
  • 32. Process Definition – receive  allows business process to receive a message from a partner service  blocking activity  attribute partnerLink  specifies port type of the process that is awaited to be invoked by the partner  attribute operation  specifies operation of the port type that is awaited to be invoked by the partner Summer 2013
  • 33. Process Definition – receive  attribute variable  specifies variable where the arrival message will be assigned  attribute createInstance  "yes"/"no" value  if "yes" the activity creates new process instance Summer 2013
  • 34. Process Definition – receive <process> <receive name="PurchaseOrderRequestFromCustomer" partnerLink="PurchaseOrderRequestLink" operation="processPurchaseOrder" variable="PurchaseOrderMessage" createInstance="yes" /> </process> Summer 2013
  • 35. Process Definition – reply  allows business process to send a message in a reply to a message that was received by receive  similar structure to invoke Summer 2013
  • 36. Process Definition – reply <process> <reply name="InvoiceReplyToCustomer" partnerLink="PurchaseOrderRequestLink" operation="processPurchaseOrder" variable="InvoiceMessage" /> </process> Summer 2013
  • 37. Process Definition – receive/reply  implements request/response message exchange pattern  it is a pair  if there are more pairs, distinguish them by attribute messageExchange Summer 2013
  • 38. Process Definition – assign  allows updating values of variables with new data  copying data from one variable to another  construct new data and copy them to a variable  type validity checked  element copy  element from  element to Summer 2013
  • 39. Process Definition – assign  several variants of from and to: 1. from variable to variable <assign> <copy> <from variable="c1" /> <to variable="c2" /> </copy> </assign> Summer 2013
  • 40. Process Definition – assign  several variants of from and to: 2. from variable part to variable <assign> <copy> <from>$c1/lines/line[1]</from> <to variable="c2" /> </copy> </assign> Summer 2013
  • 41. Process Definition – assign  several variants of from and to: 3. from XSLT script to variable <assign> <copy> <from>bpel:doXslTransform(".../t.xsl", $c1)</from> <to variable="c2" /> </copy> </assign> Summer 2013
  • 42. Process Definition – sequence  specifies activities to be performed sequentially Summer 2013
  • 43. Process Definition – sequence <process> <sequence> <receive name="PurchaseOrderRequestFromCustomer" ... /> <assign> <copy> <from>$PurchaseOrderMessage/creditCard</from> <to variable="CreditCardMessage" /> </copy> </assign> <invoke name="CreditCardCheckInvoke" ... /> <assign>...</assign> <reply name="InvokeReplyToCustomer /> </sequence> </process> Summer 2013
  • 44. Process Definition – flow  specifies one or more activities to be performed concurrently Summer 2013
  • 45. Process Definition – flow <process> <flow> <sequence> <invoke name="CreditCardCheckInvoke" ... /> <invoke name="ProcessPaymentInvoke" ... /> </sequence> <invoke name="CalculatePriceInvoke" ... /> <invoke name="LogisticsInvoke" ... /> </flow> </process> Summer 2013
  • 46. Process Definition – flow  element link  declares synchronization dependency for flow  attribute name • identifies dependency within flow Summer 2013
  • 47. Process Definition – flow <process> <flow> <links> <link name="PriceToPaymentLink" /> </links> ... </flow> </process> Summer 2013
  • 48. Process Definition – flow  each activity may contain sources with one or more source and targets with one or more target  establish synchronization relations via links  element source  attribute linkName - specifies that the activity is source activity of the link  element target  attribute linkName - specifies that the activity is target activity of the link Summer 2013
  • 49. Process Definition – flow  for a given link, its target activities must wait until its source activities have finished Summer 2013
  • 50. Process Definition – flow <process> <flow> ... <invoke name="CalculatePriceInvoke" ... > <sources> <source name="PriceToPaymentLink" /> </sources> </invoke> ... </flow> </process> Summer 2013
  • 51. Process Definition – flow <process> <flow> ... <sequence> <invoke name="CreditCardCheckInvoke" ... /> <invoke name="ProcessPaymentInvoke" ... > <targets> <target name="PriceToPaymentLink" /> </target> </invoke> </sequence> ... </flow> </process> Summer 2013
  • 52. Process Definition – flow  element joinCondition in targets  contains logical expression specifying waiting condition Summer 2013
  • 53. Process Definition – flow <flow> <links>...</links> <sequence name="W"> <targets> <joinCondition>$XtoW and $YtoW</joinCondition> <target linkName="XtoW" /> <target linkName="YtoW" /> </targets> ... </sequence> </flow> Summer 2013
  • 54. Process Definition – flow  element transitionCondition in source  contains logical expression specifying condition for setting the link to true (additional condition to "being finished") Summer 2013
  • 55. Process Definition – flow <flow> <links>...</links> <sequence name="X"> <sources> <source linkName="XtoV"> <transitionCondition>$c &gt; 1000</transitionCondition> </source> <source linkName="XtoW"> <transitionCondition>$c &le; 1000</transitionCondition> </source> </sources> ... </sequence> </flow> Summer 2013
  • 56. Process Definition – scope  allows definition of local partner links, variables and activities Summer 2013
  • 57. Process Definition – if  used to select exactly one activity from given branches  branch = activity  first branch is directly as child  element condition  contains logical expression  condition for first branch activity  element elseif  element condition  other branch activity under a condition  element else  last branch Summer 2013
  • 58. Process Definition – if <if> <invoke>...</invoke> <condition>$PaymentMessage/price &gt; 1000</condition> <elseif> <invoke>...</invoke> <condition>$PaymentMessage/price&gt;500</condition> </elseif> <else> <invoke>...</invoke> </else> </if> Summer 2013
  • 59. Process Definition – while  used to define that the child activity is to be repeated as long as the specified condition is true  element condition  contains logical expression Summer 2013
  • 60. Process Definition – while <while> <condition>$c1 &gt; 1000</condition> <sequence> <invoke>...</invoke> <assign> <from>...</from> <to>$c1</to> </assign> </sequence> </while> Summer 2013
  • 61. Process Definition – forEach  iterates its child scope exactly N+1 times where N is given by finalCounterValue child element minus startCounterValue child element  iterated activity is in the child scope  attribute parallel  "yes"/"no" value  if "yes" iterations are performed in parallel   flow with N+1 activities each for one iteration Summer 2013
  • 62. Process Definition – forEach <forEach parallel="yes" countername="n"> <startCounterValue>1</startCounterValue> <finalCounterValue> count($PurchaseOrder//item) </finalCounterValue> <scope> ... variable $n with actual counter value ... ... iterated activity ... </scope> </forEach> Summer 2013
  • 63. Advanced Concepts  not presented in this lecture:  fault handling  event handling  terminating processes  undoing completed work (i.e. compensations)  message correlation  dynamic partner resolution  abstract processes Summer 2013