BPEL (Business Process Execution Language) - PowerPoint PPT Presentation

About This Presentation
Title:

BPEL (Business Process Execution Language)

Description:

Code to execute when 'undoing' an action -- (process body) ! What the process actually does ... is compensated to 'undo' business effects of unfinished ... – PowerPoint PPT presentation

Number of Views:124
Avg rating:3.0/5.0
Slides: 19
Provided by: francisc45
Category:

less

Transcript and Presenter's Notes

Title: BPEL (Business Process Execution Language)


1
BPEL (Business Process Execution Language)
  • presented by
  • Cagdas E. Gerede
  • 01/24/06
  • Web Services and Security Seminar
  • UC-Santa Barbara

Adaptation from Nirmal Mukhis slides
2
Business Process Execution Language
  • enables
  • Definition of Business Processes using Web
    Services
  • Coordination of a set of Web service interactions
  • Degree of interoperability at the process level
    (describe process and use it in different runtime
    infrastructures)
  • where it comes from
  • Builds on XML and Web Services
  • Convergence of two workflow languages (WSFL
    directed graphs XLANG block-structured
    language)

3
Orchestration
4
Versions
  • v1.0 - BPEL4WS - August 2002
  • v1.1 March 2003
  • v2.0 Draft - WSBPEL OASIS
  • (some issues discussed)
  • how to use XPath
  • whether there should be sub-processes in BPEL
  • how abstract processes should be used

5
Simple Example
Composite Service - Orchestrated by BPEL
6
Traditional Flow Models
Activities represent units of processing.
Control links define execution flow as a directed
acyclic graph
Activities are mapped to application invocations
or human actions
Flow of data is explicitly modeled through data
links.
7
Structure of a BPEL4WS Process
  • ltprocess ...gt
  • ltpartnersgt ... lt/partnersgt
  • lt!-- Web services the process interacts with
    --gt
  • ltcontainersgt ... lt/containersgt
  • lt! Data used by the process --gt
  • ltcorrelationSetsgt ... lt/correlationSetsgt
  • lt! Used to support asynchronous interactions
    --gt
  • ltfaultHandlersgt ... lt/faultHandlersgt
  • lt!Alternate execution path to deal with faulty
    conditions --gt
  • ltcompensationHandlersgt ... lt/compensationHandle
    rsgt
  • lt!Code to execute when undoing an action
    --gt
  • (process body)
  • lt! What the process actually does --gt
  • lt/processgt

8
BPEL Basic Activities
  • ltinvoke partner... portType...
    operation...
  • inputContainer... outputContainer...
    /gt
  • lt!-- process invokes an operation on a partner
    --gt
  • ltreceive partner... portType...
    operation...
  • container... createInstance.../gt
  • lt!-- process receives invocation from a
    partner --gt
  • ltreply partner... portType...
    operation...
  • container.../gt
  • lt!-- process send reply message in partner
    invocation --gt
  • ltassigngt
  • ltcopygt
  • ltfrom container.../gt ltto
    container.../gt
  • lt/copygt
  • lt/assigngt
  • lt! Data assignment between containers
    --gt

9
BPEL and WSDL Partners
Partner A
Partner B
WSDL
WSDL A
Process
Synchronous Communication
10
BPEL and WSDL. Partners
Partner B
Asynchronous Communication
11
Partner Definitions and Links
  • ltpartner name... serviceLinkType...
  • partnerRole... myRole.../gt
  • lt! A partner is accessed over a WS
    channel, defined by
  • a service link type --gt
  • ltserviceLinkType name..."gt
  • ltrole name..."gt
  • ltportType name..."/gt
  • lt/rolegt
  • ltrole name..."gt
  • ltportType name.../gt
  • lt/rolegt
  • lt/serviceLinkTypegt
  • lt! A SLT defines two roles and the
    portTypes that each role needs to
  • support --gt

12
BPEL Data Model
Activities input/ output is kept in global
variables.
Globally scoped data variables typed as WSDL
messages
Assignment activities move data around.
ltcontainer name... message.../gt
13
BPEL Composition of Web Services
Process WSDL
Component B
Component A
Bs WSDL
As WSDL
Call Back
14
More Basic Activities
  • ltthrow faultName..." faultContainer.../gt
  • lt!-- process detects processing error and
    switches into fault processing mode --gt
  • ltterminate/gt
  • lt! pull the plug --gt
  • ltwait for...? until...?/gt
  • lt!-- process execution stops for a specified
    amount of time--gt
  • ltemptygt
  • lt! Do nothing a convenience element --gt

15
BPEL Structured Activities
  • ltsequencegt
  • lt! execute activities sequentially--gt
  • ltflowgt
  • lt! execute activities in parallel--gt
  • ltwhilegt
  • lt! iterate execution of activities until
    condition
  • is violated--gt
  • ltpickgt
  • lt! several event activities (receive message,
    timer event) scheduled for execution in parallel
    first one is selected and corresponding code
    executed. --gt
  • ltlink ...gt
  • lt! defines a control dependency between a
  • source activity and a target --gt

16
Nesting Structured Activities. Example
ltsequencegt ltreceive .../gt ltflowgt
ltsequencegt ltinvoke .../gt ltwhile
... gt ltassigngt ... lt/assigngt
lt/whilegt lt/sequencegt ltsequencegt
ltreceive .../gt ltinvoke ... gt
lt/sequencegt lt/flowgt ltreplygt lt/sequencegt
Seq
Flow
Seq
Seq
While
17
Flow Oriented Authoring Style
Customer asks for a loan, giving name and amount
info. Two services are involved -A risk
assessor which can approve the loan if the risk
is low -A loan approver which checks the name and
decides whether to approve the loan. The reply
goes back to the customer.
18
Structured Authoring Style
19
BPEL Handlers and Scopes
Scope
Fault Handler
  • A scope is a set of (basic or structured)
    activities.
  • Each scope can have two types of handlers
    associated
  • Fault handlers. Many can be attached, for
    different fault types.
  • Compensation handlers. A single compensation
    handler per scope.

Compensation Handler
20
How Handlers Work
  • A compensation handler is used to reverse the
    work performed by an already completed scope
  • A compensation handler can only be invoked by the
    fault handler or compensation handler of its
    immediate enclosing scope
  • A fault handler defines alternate execution paths
    when a fault occurs within the scope.
  • Typical scenario
  • Fault is thrown (retuned by invoke or explicitly
    by process)
  • Execution of scope is terminated
  • Appropriate fault handler located (with usual
    propagation semantics)
  • Main execution is compensated to undo business
    effects of unfinished work.

21
Scope and Fault Example
A
Fault
B
E
C
D
22
What is Correlation?
  • BPEL can model many types of interactions
  • simple stateless interactions
  • Stateful, long running, asynchronous
    interactions.
  • Correlation sets (CSs) provide support for the
    latter
  • CSs represent the data that is used to maintain
    the state of the interaction (a conversation).
  • At the process end of the interaction, CSs allow
    incoming messages to reach the right process
    instance.
  • What is a correlation set?
  • A set of business data fields that capture the
    state of the interaction (correlating business
    data). For example a purchase order number, a
    customer id, etc.
  • Each set is initialized once
  • Its values do not change in the course of the
    interaction.

23
Defining Correlation Sets
  • ltcorrelationSet name... properties.../gt
  • lt! A CS is a named set of properties.
    Properties are defined as WSDL extensibility
    elements --gt
  • ltbpwsproperty name..." type..."/gt
  • lt! A property has a simple XSD type and a
    global name (Qname) --gt
  • ltbpwspropertyAlias propertyName..."
  • messageType..." part..."
  • query..."/gt
  • lt! A property is mapped to a field in a WSDL
    message type. The property can thus be found in
    the messages actually exchanged. Typically a
    property will be mapped to several different
    message types and carried on many interactions,
    across operations and portTypes --gt

24
Using Correlation
  • ltreceive partner... operation...
    portType...
  • container...gt
  • ltcorrelationsgt
  • ltcorrelation set"PurchaseOrder"
  • initiation"yes/gt
  • lt/correlationsgt
  • lt/receivegt
  • lt! An input or output operation identifies
    which correlation sets apply to the messages
    received or sent. That CS will be used to assure
    that the message is related to the appropriate
    stateful interaction.
  • lt! A CS is initialized once, in an interaction
    where the set appears with the initiation
    attribute set to yes. Its value may never be
    changed afterward --gt

25
BPEL Critique
  • No notion of independent activities - everything
    in a BPEL is a web service operation, not "an
    activity", i.e. a unit of work
  • No human interaction modeling
  • Interacting activities interacting together
    two-by-two (multiple BPEL documents for a single
    process)
  • BPEL can only represent multi-party collaboration
    that have a "center" of control.
    (Ariba/CommerceOne - some B2B agent in the middle)

26
  • - Questions -

27
(No Transcript)
28
Resources
  • BPEL4WS 1.0
  • http//www-106.ibm.com/developerworks/webservices/
    library/ws-bpel/
  • BPWS4J Java Implementations
  • http//www.alphaworks.ibm.com/tech/bpws4j
  • http//www.collaxa.com/
  • Two introductions to BPEL
  • http//www.ibm.com/developerworks/webservices/libr
    ary/ws-bpelcol1
  • http//www.ibm.com/developerworks/webservices/libr
    ary/ws-bpelwp/
Write a Comment
User Comments (0)
About PowerShow.com