Скачать презентацию This presentation is for informational purposes only and Скачать презентацию This presentation is for informational purposes only and

ffcbafcb1e23aef360c611c5cc5b9999.ppt

  • Количество слайдов: 48

“This presentation is for informational purposes only and may not be incorporated into a “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

“This presentation is for informational purposes only and may not be incorporated into a “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Dave Shaffer, Director Product Mgmt Oracle Corporation David. shaffer@oracle. com Matjaz B. Juric, University Dave Shaffer, Director Product Mgmt Oracle Corporation David. shaffer@oracle. com Matjaz B. Juric, University of Maribor “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Advanced BPEL Faults & compensation Event handling Correlation, BPEL 2. 0 and more “This Advanced BPEL Faults & compensation Event handling Correlation, BPEL 2. 0 and more “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Agenda • • Fault handling and compensation Event handling Correlation of asynchronous messages Extending Agenda • • Fault handling and compensation Event handling Correlation of asynchronous messages Extending the reach of BPEL: Web Services Invocation Framework (WSIF) • BPEL version 2. 0 • Q&A “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

BPEL for Service Composition • BPEL is a language for service composition (programming-in-the-large) • BPEL for Service Composition • BPEL is a language for service composition (programming-in-the-large) • Makes it easy to • Invoke services (, , ) • Perform activities sequentially () or in parallel () • Express conditions () • Perform loops () • Handle variables () “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Example BPEL Process <<WS>> Book Rating Client port. Type <<WS>> Bookstore 1 port. Type Example BPEL Process <> Book Rating Client port. Type <> Bookstore 1 port. Type <> Bookstore 2 “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

BPEL Processes and Faults • Sources of faults in BPEL processes • Synchronous invocation BPEL Processes and Faults • Sources of faults in BPEL processes • Synchronous invocation of web services • Service returns WSDL fault message • BPEL server signals fault due to error condition in the server, network communication, operating system, etc. • BPEL defines several standard faults • BPEL process related faults • Process throws fault to signal an exception • Fault thrown automatically (e. g. because of join failure) “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

WSDL Faults • WSDL does not require unique fault names within namespace • Faults WSDL Faults • WSDL does not require unique fault names within namespace • Faults with same name and namespace are considered as the same fault in BPEL “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Signaling Faults in BPEL • <throw> activity • Specify fault names only <throw fault. Signaling Faults in BPEL • activity • Specify fault names only • Specify fault name and variable • Faults are not automatically propagated to the clients “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Signaling Faults to Clients • Synchronous replies <reply partner. Link=“Client“ port. Type= Signaling Faults to Clients • Synchronous replies • Asynchronous processes “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

BPEL Fault Handlers <process. . . >. . . <fault. Handlers> <catch fault. Name=“buy: BPEL Fault Handlers . . . . . . . . . . . . “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Scopes • To divide complex processes into hierarchically organized parts • Within scopes we Scopes • To divide complex processes into hierarchically organized parts • Within scopes we can define local • • • Variables Fault handlers Event handlers Partner links Compensation handlers Correlation sets “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Compensation • Reverse effects of activities that have been carried out as part of Compensation • Reverse effects of activities that have been carried out as part of BPEL process that is being abandoned • Transaction models • ACID model • WS-Atomic. Transaction • Compensation model • WS-Business. Activity • Long-Running Transactions “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Compensation Handlers • Can be defined for whole process, scope, or inline for <invoke> Compensation Handlers • Can be defined for whole process, scope, or inline for activity • Handler can be invoked only after activity has completed normally “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Invoking Compensation Handlers • Explicitly using <compensate> activity • Optionally specify scope name <compensate Invoking Compensation Handlers • Explicitly using activity • Optionally specify scope name • Can be invoked from the fault or compensation handler of the scope that immediately encloses the scope for which compensation should be performed • BPEL process compensation handler • enable. Instance. Compensation attribute “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

D E M O N S T R A T I O N Fault D E M O N S T R A T I O N Fault Handling and Compensation “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Events • BPEL can handle two types of events • Message events • Incoming Events • BPEL can handle two types of events • Message events • Incoming messages on port types • Alarm events • Duration: 15 minutes • Deadline: September 21 st 2005, 5: 20 PM • “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Pick Activity • <receive> waits for a single message • <pick> awaits the occurrence Pick Activity • waits for a single message • awaits the occurrence of one of a set of events • Message events: • Alarm events: • Duration • Deadline “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

<pick> <on. Message partner. Link= “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Pick as Initial Activity “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Event Handlers • React on events while BPEL process executes • Typical usage: to Event Handlers • React on events while BPEL process executes • Typical usage: to handle cancellation message from the client • Syntax similar to activity • Difference: • we can specify zero or more events and/or zero or more events • Message events can occur multiple times, even concurrently “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

<process. . . >. . . <event. Handlers> <on. Message partner. Link= . . . . . . . . . “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

D E M O N S T R A T I O N Event D E M O N S T R A T I O N Event Handling “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Correlation of Async Messages • BPEL processes use stateful model • When client starts Correlation of Async Messages • BPEL processes use stateful model • When client starts a process, a new instance is created (create. Instance attribute) • Asynchronous messages (and callbacks) must be delivered to correct instance = correlation • Automatic using WS-Addressing • Supported by Oracle BPEL Process Manager • Manual using BPEL message properties with correlation sets “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Message Properties • Message properties allow us to associate relevant data with names • Message Properties • Message properties allow us to associate relevant data with names • Message properties have global significance in business processes and are mapped to multiple messages • Examples: • Book ISSN number, social security numbers, tax payer numbers, flight numbers, license plate numbers, etc. “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Example • Message properties are defined in WSDL • WSDL extensibility mechanism is used Example • Message properties are defined in WSDL • WSDL extensibility mechanism is used . . . . . . “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Mapping Properties to Messages • Property aliases map a property selected message • To Mapping Properties to Messages • Property aliases map a property selected message • To a specific element or attribute of the message • We use property name as alias for message part and location “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Use Properties in BPEL • Extract with get. Variable. Property() bpws: get. Variable. Property Use Properties in BPEL • Extract with get. Variable. Property() bpws: get. Variable. Property (‘Book. Rating', 'ISSN') • Use in assignments “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Correlation Sets • A set of properties shared by messages and used for correlation Correlation Sets • A set of properties shared by messages and used for correlation = correlation set • Initiator - partner that sends the first message and defines the values of the properties • Followers - get property values for their correlation sets from incoming messages “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Using Correlation Sets • Correlation sets are used in • <invoke>, <receive>, <reply> • Using Correlation Sets • Correlation sets are used in • , , parts of activities or activity • Used to specify which correlation sets should be used • Nested within any of the above-mentioned activities “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

“This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

WSIF • Web Services Invocation Framework • Access resources other than web services • WSIF • Web Services Invocation Framework • Access resources other than web services • Java classes, EJBs, JCA, HTTP (get/post), etc. • No code changes in BPEL process required • And no proprietary extensions to BPEL • Only WSDL has to be modified • WSIF allows to describe various resources with WSDL and bind them to actual software providers “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

WSIF Benefits • Access to various resources from BPEL • Not only web services WSIF Benefits • Access to various resources from BPEL • Not only web services • WSIF maintains performance of native protocols • Invoking Java classes is faster than web services • WSIF enables automatic propagation of transactional contexts between transactionaware Java resources using JTA • Ease of development “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Java class instead of WS <<Java>> Book Rating Client port. Type <<WS>> Bookstore 1 Java class instead of WS <> Book Rating Client port. Type <> Bookstore 1 port. Type <> Bookstore 2 “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Java to XML Bindings • Mapping between XML and Java • BPEL variables are Java to XML Bindings • Mapping between XML and Java • BPEL variables are XML • Java variables are not • Options: • Handle XML manually using DOM • Automated mapping • Default – XML facades • Custom – JAXB, XML Beans, Asix Beans, write our own “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

XML Facade Example • Simple types mapped automatically • For complex types we use XML Facade Example • Simple types mapped automatically • For complex types we use schemac tool • Mapped to interface (IBook. Dsc. Type), class (Book. Dsc. Type), and factory • Access through get/set methods e. g. get. ISSN() “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Define WSIF Bindings • Binding specifies: • Type of binding (Java class, EJB, JCA, Define WSIF Bindings • Binding specifies: • Type of binding (Java class, EJB, JCA, …) • Mapping of data types (XML to Java) • Mapping of operations (WSDL operation to Java method) and faults • Service to use: exact name and location of Java resource (class, EJB, JCA, …) • We can propagate Java exceptions to BPEL • Java exceptions are mapped to WSDL faults “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

D E M O N S T R A T I O N WSIF D E M O N S T R A T I O N WSIF binding to Java class “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

WSIF Support • Oracle BPEL Process Manager currently provides support for following WSIF bindings: WSIF Support • Oracle BPEL Process Manager currently provides support for following WSIF bindings: • • • Java classes Enterprise Java Beans (EJB) Java Connector Architecture (JCA) HTTP GET and POST Sockets • Improved performance • Transaction context propagation “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Using Existing Resources • Define the Java to XML bindings • Define WSDL signature Using Existing Resources • Define the Java to XML bindings • Define WSDL signature for operations and exceptions • Define WSIF binding • Add declaration • JDeveloper 10. 1. 3 provides wizards to automate these steps! “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

BPEL 2. 0 • WS-BPEL 2. 0 development supervised by OASIS • WS-BPEL 2. BPEL 2. 0 • WS-BPEL 2. 0 development supervised by OASIS • WS-BPEL 2. 0 still Working Draft • Most BPEL concepts will stay unchanged • Some new activities: • • • “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

New in BPEL 2. 0 • Simplified and improved variable assignments <assign> <copy> <from New in BPEL 2. 0 • Simplified and improved variable assignments • New style: $Book. Purchase. book $Book. Rating. Request. book “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

New in BPEL 2. 0 • Improved fault handling, compensation, and event handling • New in BPEL 2. 0 • Improved fault handling, compensation, and event handling • Automatic initialization of partner links • New standard faults • Unclear about support for user interactions • Possible extension proposed by BPEL 4 People specification “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Conclusion • BPEL provides several advanced features useful for modeling real-world processes • We Conclusion • BPEL provides several advanced features useful for modeling real-world processes • We have covered fault and event handling, correlation, compensation, and WSIF • We have not covered concurrent activities and links, transitions, joins, and abstract processes • Further reading: • Oracle Technical Articles on BPEL “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

BPEL Book • Comprehensive coverage of BPEL and Oracle BPEL Process Manager • Packt BPEL Book • Comprehensive coverage of BPEL and Oracle BPEL Process Manager • Packt Publishing: www. packtpub. com “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

Q & A QUESTIONS ANSWERS “This presentation is for informational purposes only and may Q & A QUESTIONS ANSWERS “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”

“This presentation is for informational purposes only and may not be incorporated into a “This presentation is for informational purposes only and may not be incorporated into a contract or agreement. ”