Web Services Business Process Execution Language WSBPEL 2
Web Services Business Process Execution Language (WS-BPEL 2. 0) The Standards Landscape n n n Dieter König Senior Technical Staff Member IBM Software Group Böblingen, Germany dieterkoenig@de. ibm. com
Web Services Standards for SOA The Web Services Platform Architecture Discovery, Negotiation, Agreement Orchestration Component Model Protocols Composite Reliable Messaging Security State Components Atomic Transactions Quality of Service Interface + Bindings Policy Description XML Non-XML Messaging Transport SOA on your terms and our expertise © 2007 IBM Corporation
Web Services Standards for SOA The Web Services Platform Architecture UDDI, WS-Addr, Metadata Exch. , … Discovery, Negotiation, Agreement WS-C WS-N* Orchestration WS-BPEL Protocols Component SCA Model State WS-RF Composite Reliable WS-RM Messaging Security WS-Security* Components Atomic WS-AT WS-BA Transactions Quality of Service Interface + Bindings WSDL* Policy WS-Policy* Description SOAP, XML WS-Addr* JMS, Non-XML RMI/IIOP, . . . Messaging Transport HTTP, TCP/IP, SMTP, FTP, … Transport SOA on your terms and our expertise © 2007 IBM Corporation
Web Services Standards for SOA The Web Services Platform Architecture UDDI, WS-Addr, Metadata Exch. , … Discovery, Negotiation, Agreement WS-C WS-N* Orchestration WS-BPEL Protocols Component SCA Model State WS-RF Composite Reliable WS-RM Messaging Security WS-Security* Components Atomic WS-AT WS-BA Transactions Quality of Service Interface + Bindings WSDL* Policy WS-Policy* Description SOAP, XML WS-Addr* JMS, Non-XML RMI/IIOP, . . . Messaging Transport HTTP, TCP/IP, SMTP, FTP, … Transport SOA on your terms and our expertise © 2007 IBM Corporation
WS-BPEL Standards Roadmap WS-BPEL 2. 0 www. oasis. org WS-BPEL 2. 0 Extensions for People (BPEL 4 People) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpel 4 people WS-BPEL 2. 0 Extensions for Sub-Processes (BPEL-SPE) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpelsubproc WS-BPEL 2. 0 Extensions for Java (BPELJ) http: //www-128. ibm. com/developerworks/library/specification/ws-bpelj Service Component Architecture (SCA) www. osoa. org SCA Assembly Model SCA WS-BPEL Client and Implementation Model SOA on your terms and our expertise © 2007 IBM Corporation
WSDL Message receive Variables exit reply 42 throw XML Schema Type invoke XML Schema Element rethrow Basic Activities assign validate partner link Partner Links wait compensate process empty Port Type 1 compensate. Scope Partner Link Type Port Type 2 receive extension. Activity invoke receive invoke flow pick event handler for. Each sequence while invoke Structured Activities Handlers if-else compensation handler repeat. Until scope fault handler Properties Correlation Sets Property 1 Property 2 termination handler
Application Integration. net WAS Business Process RMI/IIOP SOAP Legacy integration MQSeries CICS MQSeries Delivery channels
BPEL in SOA: Abstract View WS-BPEL is a Recursive Aggregation Model for Web Services n n Aggregation: a set of Web services can be tied into one or more new Web service by means of a business process model Recursive: these new Web services can again be tied into other new Web services
Benefits of WS-BPEL Business-Level Modeling Tool 1 Modeling Tool 3 Modeling Tool 2 WS-BPEL Tool 1 WS-BPEL Tool WS-BPEL Engine 1 WS-BPEL Engine WS-BPEL 2 IT-Level … Modeling Tooln WS-BPEL Toolk WS-BPEL Enginek
Two-Level Programming Model n Programming in the large l Non-programmers implementing processes n n Flow logic deals with combining functions in order to solve a more complex problem (such as processing an order) Programming in the small l Programmers implementing low-level services n Function logic deals with a discrete fine-grained task (such as retrieving an order document or updating a customer record)
Process Usage Patterns n Aiming for a single approach for both l Executable processes n l Contain the partner’s business logic behind an external protocol Abstract processes n n Define the publicly visible behavior of some or all of the services an executable process offers Define a process template embodying domainspecific best practices
WS-BPEL Language Constructs n n n n WS-BPEL process definition Recursive composition and partner links Variable properties Correlation sets Basic and structured activities Scopes Compensation handling
WS-BPEL Process Definition process Declare dependencies on external XML Schema or WSDL definitions imports extensions Declare namespaces of WS-BPEL extension attributes and elements Relationships that a WSBPEL process will employ in its behavior partner links message exchanges Relationship between inbound and outbound message activities Data holding state of a business process or exchanged with partners variables correlation sets Application data fields that together identify a conversation Concurrently process inbound messages or timer alarms event handlers fault handlers Deal with exceptional situations in a process Perform the process logic – any number of activities may be recursively nested primary activity WSDL definitions XML schemas
Partner Links process Peer-to-peer conversational partner relationship partner link invoke receive Outbound request – service required by the process Inbound request – service provided by the process WSDL port type Provided port type my. Role partner link type WSDL port type Required port type
Variables process Variables defined using WSDL messages request invoke receive response 42 xsl: transform reply WSDL messages message response assign 42 Variables defined using XML schema elements or types XML Schema XML elements / types schemas
Properties and Correlation Sets n n How to identify stateful instances via stateless WS interfaces? A process instance is assigned one or more keys l l l Business data is used as key, e. g. , customer. ID A key can be compound, e. g. , (customer. ID, order. Number) WS-BPEL calls a key a correlation set – it is used to correlate an incoming message with a process instance customer. ID order. Number Process 4 (0123, 15) Process 3 (0815, 42) Process 2 (4711, 37) Message 1 4711 37 0815 42 Message 2 Process 1 (0815, 12)
Basic Activities process Do a blocking wait for a matching message to arrive / send a message in reply Invoke a one-way or request-response operation Update the values of variables or partner links with new data exit Immediately terminate execution of a business process instance invoke compensate Invoke compensation on all completed child scopes in default order assign compensate. Scope Invoke compensation on one completed child scope wait Wait for a given time period or until a certain time has passed empty No-op instruction for a business process extension. Activity Wrapper for language extensions receive Validate XML data stored in variables validate Generate a fault from inside the business process throw Forward a fault from inside a fault handler rethrow reply
Structured Activities process Contained activities are executed in parallel, partially ordered through control links Contained activities are performed sequentially in lexical order Contained activity is repeated while a predicate holds Contained activity is repeated until a predicate holds flow A C B pick M 1 M 2 sequence for. Each 2. … N. 1. if-else c 1 repeat. Until c 2. … N. 1. while c … A c 2 … scope Block and wait for a suitable message to arrive (or time out) Contained activity is performed sequentially or in parallel, controlled by a specified counter variable Select exactly one branch of activity from a set of choices Associate contained activity with its own local variables, partner links, etc. , and handlers
Scopes provide a context which influences the execution behavior of its enclosed activities process Local declarations – partner links, message exchanges, variables, correlation sets scope Local handlers – event handlers, fault handlers, a termination handler, and a compensation handler Isolated scopes provide control of concurrent access to shared resources scope primary activity scope scope Termination handler to deal with forced scope termination (external faults) Compensation handler to undo persisted effects of already completed activities
WS-BPEL Abstract Processes n n Hiding process details Abstract process use cases
Hiding Process Details Abstract Process Enterprise public view Executable Process private process
Abstraction and Completion An abstract process describes “behavior” It may not be executable It may omit certain information ap q abstraction ep p q executable completion Omitted information represents modeling artifacts that may be provided later
WS-BPEL Adoption – Products n n n n Active Endpoints Active. BPEL BEA Web. Logic Cape Clear Orchestrator Intalio/Apache Orchestration Director Engine (Ode) IBM Web. Sphere Process Server Microsoft Biz. Talk Server Mid. Office BPEL Engine (open source) Open. Link Virtuoso Universal Server Oracle BPEL Process Manager Parasoft BPEL Maestro Progress Sonic BPEL Server SAP Net. Weaver Sun e. Insight BPM
WS-BPEL Standards Roadmap WS-BPEL 2. 0 www. oasis. org WS-BPEL 2. 0 Extensions for People (BPEL 4 People) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpel 4 people WS-BPEL 2. 0 Extensions for Sub-Processes (BPEL-SPE) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpelsubproc WS-BPEL 2. 0 Extensions for Java (BPELJ) http: //www-128. ibm. com/developerworks/library/specification/ws-bpelj Service Component Architecture (SCA) www. osoa. org SCA Assembly Model SCA WS-BPEL Client and Implementation Model SOA on your terms and our expertise © 2007 IBM Corporation
BPEL 4 People & WS-Human. Task § Specifications published June 25, 2007 http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpel 4 people/ § Next step: OASIS Technical Committee to be created to standardize BPEL 4 People and WS-Human. Task SOA on your terms and our expertise © 2007 IBM Corporation
BPEL 4 People & WS-Human. Task – Requirements § Integration of human-executed activities in Web services-based business processes § Integration of human-executed activities in SOA-based applications § Standard-based solution to support interoperability and portability scenarios SOA on your terms and our expertise © 2007 IBM Corporation
BPEL 4 People & WS-Human. Task – Approach § BPEL 4 People – Definition of human interactions within WS-BPEL processes – Specification built on top of WS-BPEL 2. 0 § WS-Human. Task – Definition of service-enabled human tasks and notifications – Coordination protocol used to control autonomy and life cycle of service-enabled human tasks in an interoperable manner – Interoperable programming interface enabling task client applications to work with human tasks SOA on your terms and our expertise © 2007 IBM Corporation
BPEL 4 People: People Activities and Tasks Process Process People activity Invoke activity Inline Task Definition Standalone Task Definition Task can only be used inside of process context Task is interoperable as well as portable Standalone Task Definition Task can be used outside of process context Task is just a Web service with no additional constraints Communication with task is based on coordination protocol Easy to switch between performing the task by humans or programs Task is interoperable as well as portable SOA on your terms and our expertise © 2007 IBM Corporation
BPEL 4 People: Web Service vs. Human Task Translation Process receive document automatic translation manual translation Web Service Endpoint Abstract Organizational Group reply translation SOA on your terms and our expertise © 2007 IBM Corporation
BPEL 4 People: People Links and People Resolution Brochure Creation Process Org Database create Deployment Descriptor "Authors" Select staff Where qualification = "tech writer" approve Deployment Descriptor "Approvers" revise Select staff Where responsibility = "marketing" Departments Department 1 Member 2. . . Department 2. . . Users Group 1 Member 2. . . Group 2. . . Roles Role 1 Member 2. . . Role 2. . . SOA on your terms and our expertise © 2007 IBM Corporation
WS-BPEL Standards Roadmap WS-BPEL 2. 0 www. oasis. org WS-BPEL 2. 0 Extensions for People (BPEL 4 People) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpel 4 people WS-BPEL 2. 0 Extensions for Sub-Processes (BPEL-SPE) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpelsubproc WS-BPEL 2. 0 Extensions for Java (BPELJ) http: //www-128. ibm. com/developerworks/library/specification/ws-bpelj Service Component Architecture (SCA) www. osoa. org SCA Assembly Model SCA WS-BPEL Client and Implementation Model SOA on your terms and our expertise © 2007 IBM Corporation
WS-BPEL 2. 0 Extensions for Sub-Processes (BPEL-SPE) § Services used by an activity may be implemented as another process – In BPEL this is hidden from the engine(s) running both processes – Both processes can be coupled to a larger “virtual” process • Their lifecycle can be coupled • They may share context § Benefits – Reuse of process knowledge • Same business problems • Best practices – Enhanced modeling capabilities • Decomposition of large processes, outsourcing • Composition – modular process structure – Large-scale distributed execution • Process “parts” on different platforms, within one enterprise or even across enterprises (“B 2 B processes”) SOA on your terms and our expertise © 2007 IBM Corporation
Sub-Processes – Definition and Invocation WFMS 1 Parent Process Local Sub-Process call Inline Sub-Process Remote Sub-Process WFMS 2 SOA on your terms and our expertise © 2007 IBM Corporation
Sub-Processes – Coordination Protocol Request Call Inline Sub-Process Compensation Handler Register Call Return Call Compensate Coordination protocol Remote Sub-Process Reply Parent process Business Process and WS Infrastructure Application protocol Business Process and WS Infrastructure SOA on your terms and our expertise © 2007 IBM Corporation
WS-BPEL Standards Roadmap WS-BPEL 2. 0 www. oasis. org WS-BPEL 2. 0 Extensions for People (BPEL 4 People) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpel 4 people WS-BPEL 2. 0 Extensions for Sub-Processes (BPEL-SPE) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpelsubproc WS-BPEL 2. 0 Extensions for Java (BPELJ) http: //www-128. ibm. com/developerworks/library/specification/ws-bpelj Service Component Architecture (SCA) www. osoa. org SCA Assembly Model SCA WS-BPEL Client and Implementation Model SOA on your terms and our expertise © 2007 IBM Corporation
WS-BPEL 2. 0 Extensions for Java (BPELJ) § Include inline Java code in BPEL processes – Activities – Conditions – Variable initialization § Orchestrate long-running interactions with Java components § Support advanced transactional capabilities – Atomic Scopes and Atomic Processes SOA on your terms and our expertise © 2007 IBM Corporation
BPELJ Examples – Inline Java Expressions § Condition (Boolean Expression) <if> <condition expression. Language="urn: oasis: names: tc: wsbpel: 2. 0: sublang: java 1. 4 "> widget. equals(get. Variable. Property("PO", "product. Name")) </condition> . . . <else>. . . </else> </if> § Variable initialization (General Expression) <variable name="sales. Tax" type="xsd: float"> <from expression. Language="urn: oasis: names: tc: wsbpel: 2. 0: sublang: java 1. 4 "> subtotal * tax. Rate </from> </variable> SOA on your terms and our expertise © 2007 IBM Corporation
BPELJ Examples – Inline Java Activity § Extension Activity <process name="purchase. Order. Process" bpelj: xml. Binding="bpelj: DOM 3". . . > <variables> <variable name="justification. Doc" type="lns: justification. Document "/> <variable name="po" type="lns: POMsg" bpelj: xml. Binding="bpelj: SDO 1. 0"/> </variables> <sequence> . . . <extension. Activity> <bpelj: snippet> // Get the approver using SDO accessor Approver approver = po. get. Approver(); // Get the approver's comments Node. List comment. Node. List = justification. Doc. get. Elements. By. Tag. Name("approver. Comment"); . . . </bpelj: snippet> </extension. Activity> </sequence> </process> SOA on your terms and our expertise © 2007 IBM Corporation
WS-BPEL Standards Roadmap WS-BPEL 2. 0 www. oasis. org WS-BPEL 2. 0 Extensions for People (BPEL 4 People) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpel 4 people WS-BPEL 2. 0 Extensions for Sub-Processes (BPEL-SPE) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpelsubproc WS-BPEL 2. 0 Extensions for Java (BPELJ) http: //www-128. ibm. com/developerworks/library/specification/ws-bpelj Service Component Architecture (SCA) www. osoa. org SCA Assembly Model SCA WS-BPEL Client and Implementation Model SOA on your terms and our expertise © 2007 IBM Corporation
SCA Assembly Model – Component Properties Services … … Implementation - Java - WS-BPEL - Composite -… References Service Component Architecture
SCA Assembly Model – Composite Property setting Service - Java interface - WSDL Port. Type Reference - Java interface - WSDL Port. Type Component A Wire Component B Wire Binding - Web Service - SCA - JCA - JMS - SLSB -… Service Component Architecture
SCA WS-BPEL Client and Implementation Model § Specifies how WS-BPEL can be used with SCA Use any valid WS-BPEL 2. 0 process definition as the implementation of a component within SCA Use WS-BPEL to implement any SCA Component Type that uses only WSDL interfaces to define services and references, possibly with some SCA specific extensions used in process definition. Create a WS-BPEL process definition that uses SCA extensions and generate an SCA Component Type and use that type within an SCA assembly Some SCA capabilities (such as properties and multi-party references) can only be used by WS-BPEL process definitions that use SCA extensions. Service Component Architecture
SCA WS-BPEL Client and Implementation Model WS-BPEL inside Properties Services WS-BPEL Process … … Implementation - Java - WS-BPEL - Composite -… References Service Component Architecture
SCA WS-BPEL Client & Implementation Model Services and References WS-BPEL Process partner. Link A (my. Role) partner. Link B (partner. Role) flow Service wire A Reference receive B invoke reply Service Component Architecture wire
SCA WS-BPEL Client & Implementation Model Properties property currency WS-BPEL Process sca: property="yes" variable currency flow. . . Service Component Architecture
WS-BPEL Standards Roadmap WS-BPEL 2. 0 www. oasis. org WS-BPEL 2. 0 Extensions for People (BPEL 4 People) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpel 4 people WS-BPEL 2. 0 Extensions for Sub-Processes (BPEL-SPE) http: //www-128. ibm. com/developerworks/webservices/library/specification/ws-bpelsubproc WS-BPEL 2. 0 Extensions for Java (BPELJ) http: //www-128. ibm. com/developerworks/library/specification/ws-bpelj Service Component Architecture (SCA) www. osoa. org SCA Assembly Model SCA WS-BPEL Client and Implementation Model SOA on your terms and our expertise © 2007 IBM Corporation
- Slides: 46