Sei sulla pagina 1di 41

BPEL

An Introduction
to
BPEL

SOA Solutions

What Is BPEL?
Business Process Execution Language
(BPEL) is an XML-based language for
creating a process, which is a set of logical
steps (called activities) that guide a
workflow
A BPEL process fulfills a workflow primarily
by accessing one service after another.
Each of those services is called a partner
service.
SOA Solutions

The Oracle BPEL Process Manager

Oracle BPEL Process Manager is an engine for designing,


deploying, and managing BPEL business processes.

The Oracle BPEL Process Manager

SOA
Solutions
3

The Oracle BPEL Process Manager

The BPEL Designer provides a graphical and user-friendly way to


build BPEL processes

The core BPEL engine provides the most mature, scalable and
robust implementation of a BPEL. It also provide dehydration
future.

The built-in integration services enable developers to easily


leverage advanced connectivity and transformation capabilities
from standard BPEL processes.

The extensible WSDL binding framework enables connectivity to


protocols

The BPEL Console provides a mature web-based interface for

SOA and
Solutions
debugging of processes

management,
HCL Proprietary
& Confidential.administration
Not for Distribution.
4

Oracle BPEL Process Manager


Components

The design environment (Oracle JDeveloper) enables you to design and deploy
BPEL processes. You design BPEL processes by dragging and dropping elements
(known as activities) into the process and editing their property pages. You integrate
BPEL processes with external services that you also design and edit (known as partner
links). You also integrate technology adapters and services such as workflows,
worklists, transformations, notifications, sensors, and business rules with the process.
When design is complete, you deploy the process from the design environment to
Oracle BPEL Server.
If deployment is successful, you can run and manage the BPEL process from Oracle
BPEL Control.

SOA Solutions

HCL Proprietary & Confidential. Not for Distribution.


5

Initial State of the BPEL Process


JDeveloper creates the following 3 files under the BPEL Project in the
Application Navigator

bpel.xml : The deployment descriptor for the process. The file contains the
metadata for the BPEL process and defines the location of the WSDL files
for services called by this flow, along with other project-specific parameters.

projectname.bpel : The BPEL source for the process.

projectname.wsdl : The WSDL interface for the process. The WSDL


defines:
The input and output messages for this flow.
The client interface and operations supported
The message types specified as values for partnerLinkType attributes in
partner Link elemens in the BPEL process.

SOA Solutions

Overview of Activities
Activities are the building blocks of a
BPEL process.
Oracle JDeveloper includes a set of
activities that you drag and drop into
a BPEL process and double-click an
activity to define its attributes
(property values).
SOA Solutions

Assign Activity
Provides a way to copy data between variables in a BPEL
Process
One of the ways you can copy data from source to target in
a BPEL Process.
<assign name=Assign_1>

muraliksoa@gmail.com
8

Assign Activity
When you Double Click the Activity Icon. Assign popup
window will appear you can perform following operation
Copy , Append, insert and Remove

SOA
Solutions
9

Assign Activity
Copy operation

SOA
Solutions
10

10

Empty Activity

This activity enables you to insert a no-operation instruction into a process.


This activity is useful when you need to use an activity that does nothing
(for example, when a fault needs to be caught and suppressed).

SOA
Solutions
11

11

Flow and FlowN Activity


One or more activity performed concurrently
FlowN activity allow the user to create an activities and
specify the number of branches of these activity to create.
Process activities in parallel dynamically

SOA
Solutions
12

12

Invoke Activity
This activity enables the user to specify an operation you
want to invoke for the service (identified by its partner link).
The operation can be
One way Operation
Two way operation ( Request Response or Response-Request)

You can also automatically create variables in an invoke


activity.
An invoke activity invokes a synchronous service or initiates
an asynchronous Web service

SOA Solutions

13

Invoke Activity
When user double click on Invoke Icon, a pop window will
appear and user can perform following tasks.
Provide the activity with a meaningful name.
Select the partner link for which to specify an operation
Select the operation to be performed
Automatically create a variable or select an existing
variable in which to transport the data (payload)

14

SOA SOlutions

14

Invoke Activity

SOA
Solutions
15

15

Java embedding Activities


This activity enables you to add custom Java code to a BPEL
process using the Java BPEL exec extension <bpelx:exec>.
When user double click on the Java embedding icon, popup
window will appear and user can enter the java code on it.

SOA
Solutions
16

16

Notification Activities
This activity enables you to send notification about an
event to a user, group, or destination address.
You can send a notification by e-mail, voice mail, fax, pager,
or short message service (SMS).

SOA Solutions

17

Partner Links

Partner Links are a reference to an external service that can be called by


the BPEL process or call into the BPEL process.
Partner Links are BPEL components that are used to define the
communication between the BPEL engine and external components.
External components : Web Services
J2EE applications
Database Applications
Adapters

18

SOA Solutions

18

PartnerLink Window

19

SOA Solutions

19

Partner Link Window Fields


Name : A unique and recognizable name you
provide for the partner link.
WSDL File:The name and location of the Web
Services Description Language (WSDL) file that you
select for the partner link.
Partner Link Type:The partner link defined in the
WSDL file.
Partner Type:The role performed by the partner link
(in this example, the CreditRatingService service).
My Role:The role performed by the BPEL process.

20

SOA Solutions

20

Pick Activity
This activity waits for the occurrence of one event in a set
of events and performs the activity associated with that
event
This activity provide two branches
OnMessage (on left)
onTimeOut (on Right)

onMessage contains code for Receive Message


onTimeOut contains the code for Time Out
Whichever branch completes first is executed; the other
branch is not
21

SOA Solutions

21

Pick Activity
<pick name=Test
<OnMessage> . </onMessage>
<onAlarm> . </onAlarm> </pick>

22

SOA Solutions

22

Receive Activity
When user double click on Receive icon, popup window will
appear and user can perform following task
Provide the receive activity with a name.
Select the partner link service for which to specify an operation
Select the operation to be performed

Automatically create a variable or select an existing variable


in which to transport the callback response

23

SOA Solutions

23

Receive Activity

24

Soa Solutions

24

Receive Activity
This activity specifies the partner link from which to receive
information and the port type and operation for the partner
link to invoke
This activity waits for an asynchronous callback response
message from a service

25

SOA Solutions

25

Reply Activity
When user double click on Reply icon, a Popup window will
appear and user can perform following task
Provide the activity with a meaningful name.
Select the partner link for which to specify an operation
Select the operation to be performed
Automatically create a variable or select an existing
variable in which to transport the data (payload)
26

SOA Solutions

26

Reply Activity

27

SOA Solutions

27

Scope Activity

A scope activity is similar to {} block in a high level


programming language.
This activity consist of nested activities that can have own
local variable, fault handlers, compensation handler.

28

SOA Solutions

28

Sequence Activity
This activity enables you to define a
collection of activities to be
performed in sequential order

29

SOA SOlutions

29

Switch Activity
It is similar to High level Programming language switch case
statement
It has one or more conditional branch, followed by optionally
an otherwise branch
Switch
case Matching Expression1: Action
case Matching Expression2: Action
otherwise : Action

if the otherwise branch is not specified explicitly, then an


otherwise branch with an empty activity is assumed to be
available

30

SOA SOlutions

30

Switch Activity
<switch name>
<case condition= > </case>.
<otherwise />
</switch>

31

SOA Solutions

31

Transform Activity
This activity enables you to create a transformation that
maps source elements to target elements.
This activity enables the user to convert the structure of an
xml from one format to another through xslt processor.
When the user click on the transform icon, Popup window
will appear and user can create, or assign the map file.

32

SOA SOlutions

32

Transform Activity

Soa Solutions

33

UserTask Activities

This activity enables you to start the Workflow wizard.


A workflow describes the tasks, input or output information,
and procedural steps that must be performed by users or
groups as part of the end-to-end business process.

34

Soa solutions

34

Wait Activity
This activity allows a process to specify a delay for a certain
period of time or until a certain deadline is reached.
User can use expression to calculate the time period for
which the process will wait of the time it waits until
<wait name=Test_timer for=PT2M />
For value should be like PT2M (P designator must always
be present and precedes year(Y), month(M), Day (d). T
precedes the time part Hour(H), Minute(M) and Second(s)
<wait name=Test_timer until =2008-02-12T12:43:59
/>
35

SOA SOLUTIONS

35

Wait Activity

36

SOA Solutions

36

While Activity
It is similar to High level Programming language while loop
Iteration Purpose
While(condition) { Action }
Action should be performed until the given condition becomes false

37

SOA Solutions

37

Exception handling Activities


Catch
To catch a specific named fault message
This activity enables the user to create optional fault handling
logic.
Fault handling should be associate with scope
Fault handlers in a scope activity enable you to create a set of
custom fault-handling activities, which are defined as catch
activities. Each catch activity is defined to intercept a specific
type of fault

Catch All.
Soa solutions

38 unspecified fault.
To handle any

38

Exception handling Activities


Compensate Activity
This activity invokes compensation on an inner scope activity
that has already successfully completed.
This activity can be invoked only from within a fault handler or
another compensation handler.
The compensation handler is invoked with the compensate
activity, which names the scope on which the compensation
handler is to be invoked.

Throw Activity
This activity generate a fault from inside the business process

Termination Activity
A terminate activity enables you to end the tasks of an activity
39

SOA SOlutions

39

Developing BPEL Service


Structure of a synchronous Service
A client Partner Link representing the
client who initiates this BPEL process as a
service.
A Receive activity ,called receive Input to
receive a request message from the client.
A Reply activity called call back client for
the BPEL process to return a synchronous
response msg to client.
SOA SOlutions

40

Developing BPEL Service


Structure of an asynchronous Service
The client partner link that represent the
requester of this service and is used for the
A Receive activity called receiveInput, to
receive a request message from the client.
An Invoke activity called callbackclient to
enable the BPEL process to initiate an
asynchronous callback to the client who initiated
the process and to send a response message to
the client.
.

41

SOA Solutions

41

Potrebbero piacerti anche