More Related Content
Similar to Business Process Management with BPMN & BPEL
Similar to Business Process Management with BPMN & BPEL (20)
More from Tammo van Lessen
More from Tammo van Lessen (9)
Business Process Management with BPMN & BPEL
- 2. About me: Tammo van Lessen
SOA/BPM Consultant
Working on Intalio|BPMS Server
Member of the BPMN 2.0 FTF
Apache Software Foundation
Member
Apache ODE: PMC Chair, Committer
Book author
German book about BPEL
Researcher @ IAAS, University of Stuttgart
© Tammo van Lessen 3
- 3. The Talk Today
Motivation for BPM
BPM & IT
Business Process Lifecycle
Programming in the Small vs. Programming in the Large
Workflow Languages / Standards / Status Quo
WS-BPEL concepts
Summary
© Tammo van Lessen 4
- 4. Business Processes: A Definition
Hammer & Champy [1993]
“a collection of activities that takes one or more kinds of input
and creates an output that is of value to the customer.”
Davenport [1992]
“a structured, measured set of activities designed to produce a
specific output for a particular customer or market. It implies a
strong emphasis on how work is done within an organization,
in contrast to a product focus’s emphasis on what. A process is
thus a specific ordering of work activities across time and
space, with a beginning and an end, and clearly defined inputs
and outputs: a structure for action. ... Taking a process
approach implies adopting the customer’s point of view.
Processes are the structure by which an organization does what
is necessary to produce value for its customers.”
© Tammo van Lessen 5
- 5. Motivation
Modeling Business Processes
You understand what is happening in your organization.
You understand who is responsible for certain tasks.
You understand which resources are involved.
Simulating Business Processes
You understand how your processes could be optimized.
You can identify bottlenecks, dead locks, waste of time and
resources.
Executing Business Processes
You can automate parts of your business processes.
You can implement changes to your processes as you go.
Monitor Business Processes
You can get a health status of your organization in real time.
Optimize Business Processes
You can continuously improve your organization’s processes.
© Tammo van Lessen 6
- 7. Process == Product
Best practice:
Take the customer’s point of view
Your process is your product and vice versa (on certain
levels)
Products can be composed of other products (recursion)
Process Model:
Abstract view on how a product is
build/composed/manufactured
Process Instance
Abstract view on a concrete product
© Tammo van Lessen 8
- 8. Business Process Modelling Notation (BPMN 1.x)
Notation for business experts to analyse, document
and discuss business processes.
Activities, Gateways, Events
Control & Data flow (Sequence Flow, Data Objects)
Organisational modelling (Pools, Lanes)
No defined execution semantics!
Calls for a technical language for business process
automation
© Tammo van Lessen 9
- 9. Business Process Execution Language (BPEL)
Standardized XML-based language for executable,
technical business processes
Hybrid language: block-structured & graph-based
Well-defined execution language
No dead-locks, no lack-of-synchronization
Graphs must be acyclic
Tied to concepts of SOA/Web Services
No support for human activities
No notation!
© Tammo van Lessen 10
- 10. BPMN + BPEL
Established Approach
Business experts create BPMN models
IT experts translate them to BPEL in order to make them
executable
Problem
Mapping BPMN to BPEL is not straight forward
Lax vs. strict semantics
Loops / Blocks
Lack of technical details in BPMN models
Roundtripping is difficult
© Tammo van Lessen 11
- 11. Business Process Model and Notation (BPMN 2.0)
Best of both worlds
A notation (subset) for BPEL
A meta model and execution semantics for BPMN
Notational support for Choreographies
BPMN 2.0 models
are now interchangeable
can be executed
can carry technical details
© Tammo van Lessen 12
- 12. Mind the Gap
BPMN 2.0 does not
automatically bridge
the Business/IT gap
Don‘t entirely trust
the business model
Business model and
technical model
may diverge
Be careful with
blocking/non-
blocking tasks
© Tammo van Lessen 13
- 13. How Much BPMN do you Need?
BPMN is very complex
Try to agree on subsets
Discuss your models
zur Muehlen, M.; Recker, J.: How much BPMN do you need?
http://www.bpm-research.com/2008/03/03/how-much-bpmn-do-you-need/
© Tammo van Lessen 14
- 15. Different Kinds of BPMS (1)
The “commercial” model
Standards-based
Proprietary extension
Closed-source
Typically well tested & supported
Often combined with consulting & support offerings
The “open source” model
Standards-based and/or proprietary
Source code is available for free
Tech experts needed to get started
The “commercial open source” model
Based on open source
Sell technical experience, glue code, consulting & support
E.g. Intalio, WSO2, Redhat,…
© Tammo van Lessen 16
- 16. Different Kinds of BPMS (2)
The “embedded” approach
Light-weight process engine
Can be easily integrated into your application
Java-centric
E.g. jBPM, Drools Flow, Activiti
The “SOA” approach
Architecture typically more heavy-weight
Orchestrates services to achieve a higher business goal
Service implementation is hidden by an interface and is
exchangeable (mostly Web Services).
E.g. Apache ODE, IBM, Oracle, SAP,…
© Tammo van Lessen 17
- 17. The Basis: Service Platform
Orchestration Protocols State
Components
Discovery, Negotiation, Agreement
Composite Atomic
Reliable Quality
Security Transactions
Messaging of Service
Interface + Bindings Policy Description
XML Non-XML Messaging
Transports Transport
© Tammo van Lessen , Frank Leymann
- 18. The Basis: Web Service Platform
WS-C, WS-CDL,
BPEL WSRF
BPEL4Chor Components
Composite Atomic
UDDI, WS-A, WS-MEX, WSIL
Quality
WSRM WS-Security* WS-AT, WS-BA,…
of Service
WSDL WS-Policy* Description
SOAP, WS-A JMS, RMI/IIOP Messaging
HTTP, SMTP, XMPP, TCP/IP, FTP, Tuple Spaces,… Transport
© Tammo van Lessen , Frank Leymann
- 19. Why Orchestration?
???
To achieve a business
goal, you often need
more than one service…
Which to use, in which
order, how to use them?
© Tammo van Lessen , Frank Leymann
- 21. Process-based SOA
Messages / Conversations
ESB / WS Gateway
PI PI PI
PI PI PI
PI PI PI
PI PI PI
PI PI PI
PI PI PI
PM PM PM
Process Engine
© Tammo van Lessen 22
- 22. The Programming Models
Application
Processes
Programming in
the Large
Business Workflow
System
Service Configuration
Deployment pL EPR Service Bus
pT
Programming in
IT
Web Services
Service
the Small Container
© Tammo van Lessen
- 24. What is BPEL?
Business Process Execution Language
7/02 IBM & MS, 5/03 +BEA+SAP+Siebel, 4/07 OASIS Standard
High-level programming language
Recursive Model
BPEL has native support for
Long running processes
Scalability
Concurrency
Message and instance correlation
Fault handling
Compensation based recovery
Phoenix behaviour
Most important: BPEL is standard and supported by most important
vendors.
Defined Execution Semantics
Abstract Processes (protocols, “views” on internal processes)
© Tammo van Lessen 25
- 25. BPEL 2.0 Activities
Basic Activities Structured Activities
receive reply invoke A flow pick
B C M1 M2 … A
assign validate
sequence forEach
1. 2. … N. 1. 2. … N.
throw rethrow exit
while if-elseif-else
c1 c2
compensate compensateScope c …
repeatUntil scope
wait
c
empty
extensionActivity
© Tammo van Lessen
- 26. BPEL Concepts: Variables & Partner Links
Variables
Shared variables, statically typed via WSDL messages, XSD elements or
XSD types
“Global” process variables and “local” scoped variables
Partner Links / Partner Link Types
Partner Links define “contract channels” between partners
Mutual call-back dependency
Associates interfaces (pTs) with roles
Partner Links define which partner takes which role
Key concept to enable asynchronous messaging!
Role 1 / myRole Role 2 / partnerRole “I expect from my partner
an implementation of this!”
portType portType
© Tammo van Lessen 29
- 27. BPEL Concepts: Fault Handling & Compensation
Fault Handling
Like in Java, enables alternative execution paths
Can trigger compensation
Compensation
ACID Transactions are not applicable when dealing with
long running processes
Compensation-based recovery
Compensation Handler can reverse the work performed by an
already completed scope
Compensation Handler is “installed” after successful execution of a
scope
Compensation can only be triggered by
fault/compensation/termination handler of the enclosing scope
© Tammo van Lessen 30
- 29. BPEL Concepts: Data Manipulation
(Strong type system)
No explicit data flow
Assigning variable values
By receiving a message from a partner service
By invoking a partner service and storing the result into a
variable
Copying (parts) of variables into other variables
<assign>
Drawbacks: Quite cumbersome, requires often XSLT
Look at E4X and BPELJ
© Tammo van Lessen 32
- 30. BPEL Concepts: Modelling Styles
Block structured modelling
Nesting of structured activities
Use of <flow> activity for parallelism
Graph based modelling
<flow> activity with links t1 t2
Transition conditions & join conditions j
Dead-Path-Elimination
Acyclic graph to ensure sound execution
semantics
Loops can be realized with <while> /
<repeatUntil> / <forEach>
© Tammo van Lessen 33
- 31. Message Correlation
How can a messages be routed to the correct
process instance?
A process instance is assigned one or more keys
Business data is used as key
Process 4
(0123,15)
customerID
Process 3
orderNumber (0815,42)
Process 2
Message 1 (4711,37)
Process 1
4711 37 (0815,12)
Message 2
0815 42
© Tammo van Lessen 34
- 32. BPEL Extensions
BPEL4People/WS-HT BPEL4SWS
Support for Human Support for Semantic
Tasks Web Services (Service
Standardization almost Discovery)
done
Data Mediation
BPEL-SPE
BPELlight
Support for sub-
processes WSDL-less BPEL
Autonomy is key Is about message
BPELJ exchanges
Use Java in BPEL BPEL JS/E4X
Activities Use JavaScript/E4X for
Use Java types in BPEL variable assignments
© Tammo van Lessen 35
- 33. Summary
Process-oriented thinking is key to benefit from
service orientation
on a business level
on a technical level
recursive aggregation model helps to support any
granularity
BPEL is
best suited for technical service orchestrations
tailormade for WS-* based environments
© Tammo van Lessen 36
- 35. Apache ODE: Project Stats
Open Source (Apache)
ODE is widely deployed and being used in commercial
projects
Intalio|BPMS
WSO2 BPS
Redhat/JBoss RiftSaw
Progress Fuse ESB
BPEL compliance
Supports BPEL 1.1 & BPEL 2.0
http://ode.apache.org/ws-bpel-20-specification-
compliance.html
Runs on different platforms with different databases
Interoperable with existing tools
© Tammo van Lessen 39
- 36. Apache ODE: Features
Fast and scalable process engine
Modular design & embeddable
Lightweight ESB included
Supported protocols: SOAP via HTTP/JMS/SMTP/what ever
Axis2 can do, POX/HTTP
Implicit Message Correlation
Via SOAP headers and WS-Addressing
Different deployment scenarios
JBI, hot-deployment
Robustness
Everything is internally executed within JTA/XA transactions
Management and Auditing
© Tammo van Lessen 40
- 37. Apache ODE: Architecture
Modular and extensible
Deployment *.bpel, *.wsdl,
architecture Unit deploy.xml
Deployment Strategy
Apache ODE
Integration Layer BPEL
OModel
Compiler
Process and Instance
Management
BPEL Runtime
Data Access
Axis2
Scheduler
Management &
JACOB DAOs
JBI
Events
Event Processor SCA
Hiber Open
Scheduler
Transaction Manager … nate JPA
Expressions
DB
© Tammo van Lessen 41
- 38. Thank you for
your attention!
Questions?
© Tammo van Lessen 42