Bpel Tutorial Steps To To Build Business Process
Bpel Tutorial Steps To To Build Business Process
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
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
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.
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)
Receive PO Send
Ack PO Ack
PO Acknowledgement
Receive PO Send PO
Response Response
PO Response
Send
Transform
PO PO Request
From ERP
Receive PO
Ack
PO Acknowledgement
To ERP
Receive PO
Transform
Response
PO Response
Receive PO Send PO
Transform PO Transform
Response Response
Response
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
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
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
end
Oracle
Developer Day
BPEL History
Proprietary Standard
BPML BPSS WSCI BPEL4WS 1.1
(Intallio et al) (ebXML) (Sun et al)
(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
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
Deployment Descriptor
LoanFlow
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.
Deployment Descriptor
LoanFlow
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
Deployment Descriptor
LoanFlow
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
Receive Receive
Loan Offer Loan Offer <receive>.
<receive>.
<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
Deployment Descriptor
LoanFlow
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
Deployment Descriptor
LoanFlow
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
Deployment Descriptor
LoanFlow
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
Oracle
Developer Day
BPEL Concepts
BPEL/Java Integration
Oracle
Developer Day
Cross Platform
Application Server IDE
• Oracle Application Server • JDeveloper
• WebLogic Server
• Eclipse
• WebSphere
• JBoss
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
Oracle
Developer Day
Oracle
Developer Day
Oracle
Developer Day