23
Page 1 Business Process Orchestration B. Ramamurthy

Page 1 Business Process Orchestration B. Ramamurthy

  • View
    226

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Page 1 Business Process Orchestration B. Ramamurthy

Page 1

Business Process Orchestration

B. Ramamurthy

Page 2: Page 1 Business Process Orchestration B. Ramamurthy

Page 2

Reference

1. Oracle BPEL reference2. Based on SOA for Business

Developer, Concepts, BPEL, and SCA

by B. Margolis with J. Sharpe McPress, Lewisville, TX, 2007.

Page 3: Page 1 Business Process Orchestration B. Ramamurthy

Page 3

Motivation

• We created single web service to represent a business process.

• We now move on to create “composite” services that represent a real-world business processes.

• In particular, we will discuss Business Process Execution Language (BPEL).

Page 4: Page 1 Business Process Orchestration B. Ramamurthy

Page 4

BPEL (Oracle definition)

• BPEL (or BPEL4WS) is a language used for the definition and execution of business processes using Web services.

• BPEL enables the top-down realization of Service Oriented Architecture (SOA) through composition, orchestration, and coordination of Web services.

• BPEL provides a relatively easy and straightforward way to compose several Web services into new composite services called business processes.

Page 5: Page 1 Business Process Orchestration B. Ramamurthy

Page 5

BPEL Technologies

• BPEL builds on the foundation of XML and Web services;

• It uses an XML-based language that supports the Web services technology stack, including SOAP, WSDL, UDDI, WS-Reliable Messaging, WS-Addressing, WS-Coordination, and WS-Transaction.

Page 6: Page 1 Business Process Orchestration B. Ramamurthy

Page 6

Services Integration

• Web services can be combined in two ways:– Orchestration– Choreography

Page 7: Page 1 Business Process Orchestration B. Ramamurthy

Page 7

Orchestration

• Used in private business processes;• A central process (which can be another Web

service) takes control of the involved Web services and coordinates the execution of different operations on the Web services involved in the operation.

• The involved Web services do not "know" (and do not need to know) that they are involved in a composition process and that they are taking part in a higher-level business process.

• Only the central coordinator of the orchestration is aware of this goal, so the orchestration is centralized with explicit definitions of operations and the order of invocation of Web services.

Page 8: Page 1 Business Process Orchestration B. Ramamurthy

Page 8

Orchestration (contd.)

Page 9: Page 1 Business Process Orchestration B. Ramamurthy

Page 9

Choreography

• Choreography, in contrast, does not rely on a central coordinator.

• Rather, each Web service involved in the choreography knows exactly when to execute its operations and with whom to interact.

• Choreography is a collaborative effort focusing on the exchange of messages in public business processes.

• All participants in the choreography need to be aware of the business process, operations to execute, messages to exchange, and the timing of message exchanges.

Page 10: Page 1 Business Process Orchestration B. Ramamurthy

Page 10

Choreography (contd.)

Page 11: Page 1 Business Process Orchestration B. Ramamurthy

Page 11

Choreography vs. Orchestration

• From the perspective of composing Web services to execute business processes, orchestration is a more flexible paradigm and has the following advantages over choreography: – The coordination of component processes is

centrally managed by a known coordinator. – Web services can be incorporated without

their being aware that they are taking part in a larger business process.

– Alternative scenarios can be put in place in case faults occur.

Page 12: Page 1 Business Process Orchestration B. Ramamurthy

Page 12

“Go figure”

Orchestration and Choreography?

Page 13: Page 1 Business Process Orchestration B. Ramamurthy

Page 13

BPEL support

• BPEL supports two different ways of describing business processes that support orchestration and choreography: – Executable processes allow you to specify

the exact details of business processes. They follow the orchestration paradigm and can be executed by an orchestration engine.

– Abstract business protocols allow specification of the public message exchange between parties only. They do not include the internal details of process flows and are not executable. They follow the choreography paradigm.

Page 14: Page 1 Business Process Orchestration B. Ramamurthy

Page 14

BPEL Process

• A BPEL process specifies the exact order in which participating Web services should be invoked, either sequentially or in parallel.

• With BPEL, you can express conditional behaviors. For example, an invocation of a Web service can depend on the value of a previous invocation.

• You can also construct loops, declare variables, copy and assign values, define fault handlers, and so on.

• By combining all these constructs, you can define complex business processes in an algorithmic manner.

Page 15: Page 1 Business Process Orchestration B. Ramamurthy

Page 15

BPEL Process

• BPEL is an XML-based language for creating a process, which is set of logical steps called activities.

• BPLE supports integration of business services.• Orchestration using BPEL creates a service that

accepts messages from services A and B and sends related messages to services X and Y.

• A BPEL process queries the messages it receives, calculates and compares the values it obtained from the queries.

• BPEL (2.0) standard relies on XPath (1.0 or 2.0) standard to accomplish its tasks.

Page 16: Page 1 Business Process Orchestration B. Ramamurthy

Page 16

BPEL Process

• A process fulfills a workflow primarily by accessing one service after another.

• A BPEL process example:– Accept a request for an insurance quote– If the submitted details are appropriate,

calculate the quote and include it in the response.

– Otherwise say “No” and include a justification.

Page 17: Page 1 Business Process Orchestration B. Ramamurthy

Page 17

A typical BPEL Scenario

• BPEL business process receives a request. To fulfill it, the process invokes the involved Web services and then responds to the original caller.

• Because the BPEL process communicates with other Web services, it relies heavily on the WSDL description of the Web services invoked by the composite Web service.

Page 18: Page 1 Business Process Orchestration B. Ramamurthy

Page 18

BPEL Process: primitive/basic activities

• A BPEL process consists of steps; each step is called an "activity."

• BPEL supports primitive as well as structure activities. Primitive activities represent basic constructs and are used for common tasks, such as the following:

• Invoking other Web services, using <invoke> • Waiting for the client to invoke the business process by

sending a message, using <receive> (receiving a request)

• Generating a response for synchronous operations, using <reply>

• Manipulating data variables, using <assign> • Indicating faults and exceptions, using <throw> • Waiting for some time, using <wait> • Terminating the entire process, using <terminate>

Page 19: Page 1 Business Process Orchestration B. Ramamurthy

Page 19

BPEL Process: Structured Activities

• To combine primitive activities, BPEL supports several structure activities. The most important are

• Sequence (<sequence>), which allows us definition of a set of activities that will be invoked in an ordered sequence

• Flow (<flow>) for defining a set of activities that will be invoked in parallel

• Case-switch construct (<switch>) for implementing branches

• While (<while>) for defining loops • The ability to select one of several alternative

paths, using <pick>

Page 20: Page 1 Business Process Orchestration B. Ramamurthy

Page 20

BPEL Process: Other elements

• Each BPEL process will also define partner links, using <partnerLink>, and declare variables, using <variable>.

Page 21: Page 1 Business Process Orchestration B. Ramamurthy

Page 21

Example 1

• Lets look at a complete example from ref. 2 (Ben Margolis’ text)

Page 22: Page 1 Business Process Orchestration B. Ramamurthy

Page 22

Example 2

• Second example is a travel business example from Ref. 1 (Oracle connection)

• We will use the handout, that is a copy of the document available at:

http://www.oracle.com/technology/pub/articles/matjaz_bpel1.html

Page 23: Page 1 Business Process Orchestration B. Ramamurthy

Page 23

Summary

• We reviewed a BPEL process for integration of business processes.

• We studied the fundamental elements of BPEL and usage BPEL through an example.

• Given a description of business, you should be able to define a BPEL process for the business.

• There are professional tools available for development of BPEL model.

• We will explore some next semester in our service-enabled enterprise course.