24
Vasile Alaiba <[email protected]> Prezentare sustinuta in cadrul Cercului de cercetare BPM Facultatea de Informatica, Univ. “Al.I.Cuza” Iasi http://profs.info.uaic.ro/~alaiba/cercbpm

Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba Prezentare sustinuta in cadrul Cercului de cercetare BPM

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

Vasile Alaiba <[email protected]>

Prezentare sustinuta in cadrul Cercului de cercetare BPM

Facultatea de Informatica, Univ. “Al.I.Cuza” Iasi

http://profs.info.uaic.ro/~alaiba/cercbpm

Page 2: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

Web Services Business Process Web Services Business Process Web Services Business Process Web Services Business Process Execution Language Version 2.0, Execution Language Version 2.0, Execution Language Version 2.0, Execution Language Version 2.0, OASIS Standard, April 2007OASIS Standard, April 2007OASIS Standard, April 2007OASIS Standard, April 2007

M.B. Juric, M.B. Juric, M.B. Juric, M.B. Juric, Business Process Execution Language for Web Services, Second Second Second Second Edition, Packt Publishing, 2006Edition, Packt Publishing, 2006Edition, Packt Publishing, 2006Edition, Packt Publishing, 2006

Execution Language Version 2.0, Execution Language Version 2.0, Execution Language Version 2.0, Execution Language Version 2.0, OASIS Standard, April 2007OASIS Standard, April 2007OASIS Standard, April 2007OASIS Standard, April 2007 Edition, Packt Publishing, 2006Edition, Packt Publishing, 2006Edition, Packt Publishing, 2006Edition, Packt Publishing, 2006

Page 3: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

� BPEL uses an XML-based vocabulary that allows us to specify and describe business BPEL uses an XML-based vocabulary that allows us to specify and describe business processes.

� Executable business processes Executable business processes Executable business processes Executable business processes � Executable business processes Executable business processes Executable business processes Executable business processes ◦ specify the exact details of business processes and can be executed by a BPEL engine. and can be executed by a BPEL engine.

� Abstract business processesAbstract business processesAbstract business processesAbstract business processes◦ specify only the public message exchange between parties, without including the specific between parties, without including the specific details of process flows

Page 4: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

A BPEL process and its relation to web servicesA BPEL process and its relation to web servicesBPEL introduces WSDL extensions, which enable us to accurately specify relations

between several web services in the between several web services in the business process.

Page 5: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

� Business processes compose a set of existing servicesBusiness processes compose a set of existing services

When we describe a business process in BPEL, When we describe a business process in BPEL, we actually define a new web service that is a

composition of existing services.composition of existing services.

Page 6: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

� Activities◦ A BPEL process consists of steps. Each step is called an ◦ A BPEL process consists of steps. Each step is called an activity.activity.activity.activity.◦ BPEL supports basic and structured activities.◦ Basic:◦ Basic:

� invoking other web services, receiving a request, generating a response, manipulating data variables, indicating faults and exceptions, waiting or terminatingand exceptions, waiting or terminating

◦ Structured: � (ordered) sequence, flow (parallel execution), case-switch (branching), while (loops), pick (select one of a number of alternate paths)(branching), while (loops), pick (select one of a number of alternate paths)

� Partner links

� VariablesVariables

Page 7: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

<process name="Travel"

targetNamespace="http://packtpub.com/bpel/travel/"

xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"

xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"

xmlns:trv="http://packtpub.com/bpel/travel/"

xmlns:emp="http://packtpub.com/service/employee/"

xmlns:aln="http://packtpub.com/service/airline/" >

<partnerLinks><partnerLinks>

<partnerLink name="client"

partnerLinkType="trv:travelLT"

myRole="travelService"/>

<partnerLink name="employeeTravelStatus"

partnerLinkType="emp:employeeLT"

partnerRole="employeeTravelStatusService"/>

<partnerLink name="AmericanAirlines" <partnerLink name="AmericanAirlines"

partnerLinkType="aln:flightLT"

myRole="airlineCustomer"

partnerRole="airlineService"/>

<partnerLink name="DeltaAirlines" <partnerLink name="DeltaAirlines"

partnerLinkType="aln:flightLT"

myRole="airlineCustomer"

partnerRole="airlineService"/>

</partnerLinks>

Page 8: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

� Links to all parties BPEL interacts with are called partner links. partner links. partner links. partner links. Links to all parties BPEL interacts with are called partner links. partner links. partner links. partner links.

� Partner linksPartner linksPartner linksPartner links◦ web services that are invoked by the BPEL process, web services that are invoked by the BPEL process, web services that are invoked by the BPEL process, web services that are invoked by the BPEL process, ◦ web services that are invoked by the BPEL process, web services that are invoked by the BPEL process, web services that are invoked by the BPEL process, web services that are invoked by the BPEL process, also called also called also called also called invoked partner linksinvoked partner linksinvoked partner linksinvoked partner links

◦ links to clients, and can invoke the BPEL process, links to clients, and can invoke the BPEL process, links to clients, and can invoke the BPEL process, links to clients, and can invoke the BPEL process, also called also called also called also called client partner linksclient partner linksclient partner linksclient partner linkslinks to clients, and can invoke the BPEL process, links to clients, and can invoke the BPEL process, links to clients, and can invoke the BPEL process, links to clients, and can invoke the BPEL process, also called also called also called also called client partner linksclient partner linksclient partner linksclient partner links

� Note that each BPEL process has at least one Note that each BPEL process has at least one Note that each BPEL process has at least one Note that each BPEL process has at least one client partner link, because there has to be a client partner link, because there has to be a client partner link, because there has to be a client partner link, because there has to be a client partner link, because there has to be a client partner link, because there has to be a client partner link, because there has to be a client partner link, because there has to be a client that first invokes the BPEL process. client that first invokes the BPEL process. client that first invokes the BPEL process. client that first invokes the BPEL process.

Page 9: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

� A partner link type declares how two parties interact and what each party offers. interact and what each party offers.

<partnerLinkType name="insuranceLT"

xmlns="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">xmlns="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">

<role name="insuranceService">

<portType name="ins:ComputeInsurancePremiumPT"/>

</role>

<role name="insuranceRequester">

<portType name="com:ComputeInsurancePremiumCallbackPT"/><portType name="com:ComputeInsurancePremiumCallbackPT"/>

</role>

</partnerLinkType>

...

<portType name="ComputeInsurancePremiumPT"><portType name="ComputeInsurancePremiumPT">

<operation name="...">

<input message="..." />

</operation>

</portType></portType>

Page 10: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

<process ...>...<sequence><sequence><!-- Wait for the incoming request to start the process --><receive ... /><receive ... /><!-- Invoke a set of related web services, one by one --><invoke ... /><invoke ... /><invoke ... /><invoke ... />...

Sequentially Invoking Web Services

...</sequence>

</process>

Sequentially Invoking Web ServicesA BPEL process definition is written as an XML document using the <process> root

element. Web services are invoked sequentially using <invoke> in a

element. Web services are invoked sequentially using <invoke> in a

<sequence> element.

Page 11: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

<process ...>...<sequence><sequence><!-- Wait for the incoming request to start the process --><receive ... /><!-- Invoke a set of related web services, concurrently --><flow><flow><invoke ... /><invoke ... /><invoke ... />

</flow><invoke ... />

</flow>...

</sequence></process>

Concurrently Invoking Web Services

</process>

Concurrently Invoking Web ServicesWeb services are invoked concurrently using <invoke> in a <flow> element.using <invoke> in a <flow> element.

Page 12: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

<process ...>

...

<sequence>

<!-- Wait for the incoming request to start the process --><!-- Wait for the incoming request to start the process -->

<receive ... />

<!-- Invoke two sequences concurrently -->

<flow>

<!-- The three invokes below execute sequentially --><!-- The three invokes below execute sequentially -->

<sequence>

<invoke ... />

<invoke ... />

<invoke ... />

</sequence></sequence>

<!-- The two invokes below execute sequentially -->

<sequence>

<invoke ... />

<invoke ... />

Nested invocations

<invoke ... />

</sequence>

</flow>

...

</sequence>

</process>Nested invocations

<sequence> and <flow> can be nested. A process usually begins with a

<receive>, waiting for a message to

</process>

<receive>, waiting for a message to start.

Page 13: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

� Synchronous request/replySynchronous request/replySynchronous request/replySynchronous request/replySynchronous request/replySynchronous request/replySynchronous request/replySynchronous request/reply

<!-- Synchronously invoke the Employee Travel Status Web Service -->

<invoke partnerLink="employeeTravelStatus" <invoke partnerLink="employeeTravelStatus"

portType="emp:EmployeeTravelStatusPT"

operation="EmployeeTravelStatus"

inputVariable="EmployeeTravelStatusRequest"

outputVariable="EmployeeTravelStatusResponse" />outputVariable="EmployeeTravelStatusResponse" />

Page 14: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

<!-- Invoke an asynchronous operation -->

<invoke ... /> <invoke ... />

<!-- Do something else... -->

<!-- Wait for the callback -->

<receive ... /> <receive ... />

Page 15: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

� Variables are used:◦ to store messages that are exchanged between ◦ to store messages that are exchanged between business process partners ◦ to hold data that relates to the state of the process

Each variable has to be declared before it can to hold data that relates to the state of the process

� Each variable has to be declared before it can be used.

� To specify type use one of the following � To specify type use one of the following attributes:◦ • messageType: a WSDL message ◦ • element: an XML Schema element ◦ • element: an XML Schema element ◦ • type: an XML Schema simple type

Page 16: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

<variables>

<variable name="InsuranceRequest" <variable name="InsuranceRequest"

messageType="ins:InsuranceRequestMessage"/>

<variable name="PartialInsuranceDescription" <variable name="PartialInsuranceDescription"

element="ins:InsuranceDescription"/>

<variable name="LastName"

type="xs:string"/> type="xs:string"/>

</variables>

Page 17: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

<assign> <copy><copy>

<from variable="InsuredPersonRequest" part="insuredPersonData" />

<to variable="InsuranceRequest" part="insuredPersonData“part="insuredPersonData“query="/insuredPersonData/ins:LastName"/>

</copy> </assign>

<assign> <copy>

<from expression="string('Juric')" /> <to variable="LastName"/> <from expression="string('Juric')" /> <to variable="LastName"/>

</copy> </assign>

Page 18: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

� Let us consider the business travel processbusiness travel processbusiness travel processbusiness travel process. 1. The client invokes the business process, specifying 1. The client invokes the business process, specifying

the name of the employee, the destination, the departure date, and the return date.

2. The BPEL business process first checks the employee travel status. We will suppose that a web

2. The BPEL business process first checks the employee travel status. We will suppose that a web service exists through which such a check can be made.

3. Then the BPEL process will check the price for the made.

3. Then the BPEL process will check the price for the flight ticket with two airlines: American Airlines and Delta Airlines. Again we will suppose that both airline companies provide a web service through airline companies provide a web service through which such check can be made.

4. Finally, the BPEL process will select the lower price and return the travel plan to the client. and return the travel plan to the client.

Page 19: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM
Page 20: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM
Page 21: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM
Page 22: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM
Page 23: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM
Page 24: Prezentare sustinuta in cadrul Cercului de cercetare BPM ...alaiba/cercbpm/Web...Vasile Alaiba  Prezentare sustinuta in cadrul Cercului de cercetare BPM

� How can a BPEL process be designed?◦ Oracle BPEL Designer (Jdeveloper)

How can a BPEL process be designed?◦ Oracle BPEL Designer (Jdeveloper)

◦ Eclipse BPEL Editor

◦ others (to be identified)◦ others (to be identified)

� How can a BPEL process be executed?◦ Oracle BPEL ManagerOracle BPEL Manager

◦ Microsoft BizTalk

◦ Eclipse BPEL to Java translation

◦ others (to be identified)◦ others (to be identified)