0% found this document useful (0 votes)
20 views47 pages

Bpel Tutorial Steps To To Build Business Process

The document discusses business processes and orchestration using BPEL. It provides an overview of what business processes are, the differences between choreography and orchestration, and how BPEL can be used to orchestrate services and integrate heterogeneous systems into end-to-end business processes.

Uploaded by

airace
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views47 pages

Bpel Tutorial Steps To To Build Business Process

The document discusses business processes and orchestration using BPEL. It provides an overview of what business processes are, the differences between choreography and orchestration, and how BPEL can be used to orchestrate services and integrate heterogeneous systems into end-to-end business processes.

Uploaded by

airace
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Oracle

Developer Day



Oracle
Developer Day
Oracle Fusion Middleware

Integrare si modelare
procese de business (BPEL)

Liviu Gherman
Senior Sales Consultant
Oracle Romania
Oracle
Developer Day
Comprehensive Hot-Pluggable Unbreakable

Oracle
Developer Day
Agenda

• Business Processes & Orchestration


• What is BPEL ?
• BPEL Programming Language
• Steps to Build a Business Process
• Oracle BPEL Process Manager

Oracle
Developer Day
What is a Business Process?
• Specifies the potential execution order of
operations from a (collection) of services
• Resembles flow-chart like expression of an
algorithm
• Enables the specifying of long-running
transactions
• Model layered on top of WSDL service
– Peer-to-peer interaction between WSDL services
• Follows WSDL model of separation
– Partners and interactions represented as abstract WSDL interfaces
(portTypes and operations)
• Each step (operation) is called an activity

Oracle
Developer Day
One Service is Not Enough:
Business Process Integration
SAP Mainframe

Formulate
Check Fulfillment
Inventory Offer
Submit Transform Send
Determine Can
Racing Order/ Result to
Discount Fulfill?
Order Customer User
Check Formulate
Credit Rejection

Portal Java Web App

Oracle
Developer Day
Business Process
Case Study: DSL Provisioning
There is a continuous need for enterprises to tie disparate
applications and services into end-to-end process flows.

DSL Provisioning Process


Goals
• Compress the total processing time
(Real Time)
• Better visibility
(Auditing, Reporting)
• Ability to change the process
• Incremental roll out

Challenges
• 8 Heterogeneous Systems
• Sophisticated flow logic
• Avoid hardwired point-point integration
• Exceptions are hard
Oracle
Developer Day
Business Process
Choreography vs. Orchestration
• Choreography
– The observable public exchange of messages, rules of
interaction and agreements between two or more business
process endpoints
• Orchestration
– An executable business process describing a flow from the
perspective and under control of a single endpoint
(commonly: Workflow)

Purchase Order Business Process Example

Purchase Order Request


Business Business
“A” Purchase Order Acknowledgement “B”

Oracle Purchase Order Response


Developer Day
Business Process
From a Choreography Perspective …

Business “A” Public Process Business “B”


(Network)
Send Receive
PO PO
PO Request

Receive PO Send
Ack PO Ack
PO Acknowledgement

Receive PO Send PO
Response Response
PO Response

Choreography – The observable public exchange of messages


Oracle
Developer Day
Business Process
From a Orchestration Perspective …
Private Process
Business “A” BPEL Workflow

Send
Transform
PO PO Request
From ERP

Receive PO
Ack
PO Acknowledgement

To ERP
Receive PO
Transform
Response
PO Response

Orchestration – A private executable business process


Oracle
Developer Day
Business Process
Choreography and Orchestration Together
Business Analyst Tool
Business Business
“A” “B” Generate BPEL
Generate BPEL
Template
Template

Business “A” BPEL Workflow Business “B” BPEL Workflow


Send Receive
Transform PO Transform
PO PO
Request

Receive PO Send PO Ack


Ack PO
Acknowledgement

Receive PO Send PO
Transform PO Transform
Response Response
Response

Two BPEL workflow templates reflecting a business agreement


Oracle
Developer Day
Orchestration Requirements
Java Services (EJB)

Java Services
Messaging(EJB) Connectivity
Destinations (JMS)
Heterogenous
Messaging Destinations (JMS)Back Ends
Legacy Applications (JCA, adapters)
Silos of API and mechanisms
Opaque/heterogeneous data definitions
Synchronizing multiple data stores
User Tasks

Flow Control

?
Asynchrony,
User Tasks Flow Coordination, Data
! Transformation, Compensation, Version Control,
Auditing

Scalability
Web Services (Sync and Async)
Unpredictable loads
Orchestration Asymmetric performance capabilities

Management and Security


Access control, Encryption, Logging, Metering
Web Services Independent of the service
(Sync and Async)
Interaction/Access
Catalog, Customization, Access

Oracle
Developer Day
BPEL, The Orchestrator
PORTAL Web Service

Java Service

? Database
Stored Procedures
J2EE ERP
SAP, Oracle, etc.
BPEL

User Tasks
TOMCAT
Oracle
Developer Day
The Buzz
“ Gartner believes that BPEL will emerge as the leading
industry standard for Web service orchestration
and coordination of business processes.

- David Smith, Research Vice President and fellow, Gartner

“ BPEL is the future of the integration space. ”


- John Rymer, Vice President, Forrester Research, Inc.

Oracle
Developer Day
Orchestrate Services
Credit Rating
Order Entry United Loan
A A
D D
A A
P P
T T
E E
R WSDL R

BPEL
Fulfillment Star Loan

A
D W
A S
P D
T Service Bus L
E
R
Application Server

Oracle
Developer Day
What is BPEL?
Markup language for composing a set of discrete
services into an end-to-end process flow

• 10+ years of R&D from start


Credit Check
MSFT and IBM
Bad
• SOAP but also Java, JCA Credit !
• Rich Flow Semantics
• Optimized Bindings Star Loan
United Loan
• XPATH+XSLT+XQuery
• WS-Security
• A Process is a Service

end

Oracle
Developer Day
BPEL History
Proprietary Standard
BPML BPSS WSCI BPEL4WS 1.1
(Intallio et al) (ebXML) (Sun et al)
(OASIS)

2000/05 2001/03 2001/05 2001/06 2002/03 2002/06 2002/08 2003/04 2005/2006

XLang WSFL WSCL BPEL4WS 1.0 WS-BPEL 2.0


(Microsoft) (IBM) (HP) (IBM, Microsoft) (OASIS)

Oracle
Developer Day
BPEL – Programming Language

• Variables
• Activities
• Control Flow
• Scope
• Fault Handling
• Event Handling

Oracle
Developer Day
BPEL - Variables
• Used to store, reformat and transform
messages
• Required to send and receive messages
• Each variable has a Type
Example:
<variables>
<variable name="loanApplication"
messageType="ns2:LoanServiceRequestMess
age"/>
</variables>

Oracle
Developer Day
BPEL - Activities
•Primitive Activities •Structured Activities
– <invoke> – <sequence>
– <receive> – <switch>
– <assign> – <pick>
– <reply> – <flow>
– <throw> – <link>
– <terminate> – <while>
– <wait> – <scope>

Oracle
Developer Day
BPEL - Activities
• <invoke>
– Invoke a service synchronously
Ex: Invoke Credit Service
• <receive>
– Waits for the incoming message, either to start the process or for
a callback
Ex: Wait for a message from United Loan
• <reply>
– Return response for synchronous process, relate to initial
<receive>
• <assign>
– Copy data between variables, expressions and endpoint
references
– Used with XPath expressions and XSLT engine
Ex: Copy Loan Application from input payload to United Loan
input
Oracle
Developer Day
BPEL – Scope
• Scopes can be used to divide the business
process into organized parts
• A <scope> is an execution context for the
contained activities, and a process is,
itself, a <scope>
• A <scope> defines local variables and can
catch and handle either specific faults or
all faults that occur with it
Ex: GetCreditRating Scope – Invoke Credit
Service and catch exceptions
Oracle
Developer Day
BPEL – Control Flow
• BPEL provides the usual branching and looping control flow
constructs
• A <sequence> executes activities in serial order
• A <switch> executes at most one alternative based on
expressions specified on child <case> elements with an
optional <otherwise>
Ex: Choose between United and Star loan offers based on
lower APR
• A <while> loops through activities while a variable's value
is true
• BPEL provides a parallel control construct through the
<flow> activity
Ex: Invoke United and Star Loan services in parallel

Oracle
Developer Day
Partner Links
• Links to all parties that process interacts
• Links can be to Web Services
Ex: CreditService, UnitedLoanService,
StarLoanService
• Links can be to other BPEL processes as
well
• PartnerLinkTypes
– Declares how parties interact and what each
party offers
Oracle
Developer Day
BPEL - Fault Handling
• Handle faults to enable completion of
process using <faultHandlers>
• Use <catch> activity to handle specific
faults
Ex: Catch bad credit exception and
terminate the process
• Use <catchAll> to handle all other faults

Oracle
Developer Day
Steps to Build Business Process
1. Define Public Interface

2. Create Partner Dictionary

3. Create Message and Type Dictionary

4. Implement Transformation Logic

5. Implement Orchestration Logic

6. Create a Test Environment

7. Iterate

8. Live Pilot

9. Fine-
Fine-tune Operations Tasks

Oracle
Developer Day
Step 1: Define Public Interface
Deliverables:
• WSDL description of the interface of the implemented BPEL process

LoanRow
BPEL Process
WSDL

LoanFlow

initiate

Client
Callback
onResult

LoanFlow.wsdl

Oracle
Developer Day
Step 2: Create Partner Dictionary
Deliverables:
• List of the WSDL of the services that will be invoked as part of the BPEL Process
• For each partner, document the order in which operations will be invoked (choreography)
• Make sure that each use case describes both positive and negative use cases

LoanRow Web Service


W
BPEL Process S Credit Rating
WSDL D
L

Deployment Descriptor
LoanFlow

End point reference


initiate Web Service
W

binding
S Start Loan
D
Client L
Callback
onResult
Web Service
W
S United Loan
LoanFlow.wsdl bpel.xml D
L

Oracle
Developer Day
Step 3: Create Message and
Type Dictionary
Deliverables:
• A set of XML Schema files that describe the type of the messages and XML documents used as
part of the BPEL process.

LoanRow Web Service


W
BPEL Process S Credit Rating
WSDL D
L

Deployment Descriptor
LoanFlow

End point reference


initiate Web Service
W

binding
S Start Loan
D
Client L
Callback
variables
onResult
Schedule Request
Schedule Response Web Service
W
Exchange Request S United Loan
LoanFlow.wsdl more… bpel.xml D
L

Oracle
Developer Day
Step 4: Transformation Logic
Deliverables:
• A set of XSLT and XQuery files that encapsulate mapping information
across the various types used in the BPEL process Web Service
W
S Credit Rating
D
L

LoanRow Web Service


W
BPEL Process S Start Loan
WSDL D
L

Deployment Descriptor
LoanFlow

End point reference


initiate Web Service

binding
W
S United Loan
Client D
L
Callback
variables
onResult loanApplication
crInput transformation
W
crOutput S Schedule Map
LoanFlow.wsdl more… bpel.xml D XSLT
L

Oracle
Developer Day
Step 5: Orchestration Logic
Deliverables:
• Implement the workflow that ties the interactions across partners into an end-to-end business process.
• Make sure that all exceptions and timeouts are managed properly

Credit Rating <process> <receive>


Synchronous
<invoke> Get Rating
Negative Credit
faultHandler

Send Loan Send Loan


Application Application Star Loan
United Loan <invoke> <invoke>

Receive Receive
Loan Offer Loan Offer <receive>.
<receive>.

Select Lowest Offer

<invoke>

Oracle
Developer Day
Step 6: Iterate
Deliverables:
• Add incrementally new partners
• Keep on improving exception management Web Service
W
• Create automated test and regression framework S Credit Rating
D
L

LoanRow Web Service


W
BPEL Process S Start Loan
WSDL orchestration
D
L

Deployment Descriptor
LoanFlow

End point reference


initiate Web Service

binding
W
S United Loan
Client D
L
Callback
variables
onResult loanApplication
crInput transformation
W
crOutput S Schedule Map
LoanFlow.wsdl more… bpel.xml D XSLT
L

Oracle
Developer Day
Step 7: Create test environment
Dummy Test Services
Deliverables:
• Implement dummy test services for each end point
(could be BPEL or your favorite Web services publishing technology) Web Service
W
• Create test scenario for each positive and negative use cases S Credit Rating
D
• Crash test, longevity test (integrity/reliability) L
• Performance test, stress test

LoanRow Web Service


W
BPEL Process S Start Loan
WSDL orchestration
D
L

Deployment Descriptor
LoanFlow

End point reference


initiate Web Service

binding
W
S United Loan
Client D
L
Callback
variables
onResult loanApplication
crInput transformation
W
crOutput S Schedule Map
LoanFlow.wsdl more… bpel.xml D XSLT
L

Oracle
Developer Day
Step 8: Live Pilot Integration over
internet/intranet
Deliverables:
• Wire BPEL process to real end points Web Service
• Run regression tests W
S Credit Rating
D
L

LoanRow Web Service


W
BPEL Process S Start Loan
WSDL orchestration
D
L

Deployment Descriptor
LoanFlow

End point reference


initiate Web Service

binding
W
S United Loan
Client D
L
Callback
variables
onResult loanApplication
crInput transformation
W
crOutput S Schedule Map
LoanFlow.wsdl more… bpel.xml D XSLT
L

Oracle
Developer Day
Step 9: Fine-tune Operation
Tasks
Deliverables:
• Exception Management
• Integration with Web Service Management Framework
• Security
• Archiving

Oracle
Developer Day
Oracle BPEL Process Manager
Enterprise-strength infrastructure for designing, deploying and
managing BPEL business processes
BAM • Comprehensive and native
BPEL implementation
Oracle BPEL Process Manager
• Easy-to-use modeling tool
BPEL
Designer Workflow Rule BPEL • Scalable and reliable engine
BPEL Engine Console
• Flexible binding framework
XSLT
Mapper • Rich management and
Transformation Correlation
monitoring
Adapter WSIF Binding Queuing
Factory • Get up and running in less
Dehydration
Store than 15 minutes!
SAP EBS DB File … (Oracle
Database)

Application Server
( Oracle, BEA, JBoss, IBM)
Oracle
Developer Day
Java - J2EE Services in BPEL
Problem/Use Case

BPEL

A BPEL process BankTransfer


Session Bean

Oracle
Developer Day
BPEL Concepts
BPEL/Java Integration

There are 3 solutions to this problem:


– Wrapping the Java component into a full blown
Web service using JDeveloper or Axis
– Using the WSIF Java or EJB bindings
– Using the Java BPEL exec extension
(<bpelx:exec>)

Oracle
Developer Day
Cross Platform
Application Server IDE
• Oracle Application Server • JDeveloper
• WebLogic Server
• Eclipse
• WebSphere
• JBoss

Database Operating Systems


• Oracle Database • Linux
• SQL Server • Window XP/2003
• Oracle Lite
• Solaris
• Sybase
• Pointbase • HP UX
• zOS

Oracle
Developer Day
BPEL Value Proposition
Reduce the cost and complexity of process integration
initiatives
Cost/Complexity $700K $125K

Complex and
adapt
fragmented logic A single component encapsulates
all the process logic
Side-by-side versioning
Exceptions
are the rules manage
Console has built-in support for
adapt testing, audit trails.
Compensating Transactions
Implement 1-off complex manage makes exception handling easy
implement
orchestration elements as
part of each application implement Higher level of programming
abstraction
describe describe
Leverage infrastructure: write 20
to 30 times less code!
Build your own BPEL
Process Logic Process Logic

Oracle
Developer Day
BPEL Console
KEY FEATURES

• Visual Monitoring
• Auditing
• BPEL Debugging
• In-flight Instance Administration
• Performance Tuning
• Partitioning/Domains

Oracle
Developer Day
D E M O N S T R A T I O N

Oracle
Developer Day
Oracle’s Strategy
• Oracle Application Server Containers for J2EE
– BPEL runtime
• Oracle BPEL Process Manager / Designer
– Process modeling – model your orchestration
– Schema authoring – model your messages
– Analyzing, Monitoring, Debugging
• Cross Application Server
– Oracle, WebLogic, JBoss, WebSphere
• Cross development
– Oracle JDeveloper
• Build Web services, WSDL Authoring, BPEL Designer
• Packaging, deployment, Analyzing, Monitoring, Debugging
– Eclipse
• Oracle Application Server B2B
– Web service, B2B and EAI integration
Oracle
Developer Day
   
         
    
      
               
            
          
Oracle
Developer Day
Learn Oracle From Oracle

•Instructor led training •Oracle Certification


•Self-Study •Oracle iLearning
•Online learning •Oracle Tutor
oracle.com/education
Oracle
Developer Day
QUESTIONS
ANSWERS

Oracle
Developer Day
Oracle
Developer Day



Oracle
Developer Day

You might also like