ffcbafcb1e23aef360c611c5cc5b9999.ppt
- Количество слайдов: 48
“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. ”
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 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 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) • Makes it easy to • Invoke services (
Example BPEL Process <
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 with same name and namespace are considered as the same fault in BPEL
Signaling Faults in BPEL •
Signaling Faults to Clients • Synchronous replies
BPEL Fault Handlers
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 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
Invoking Compensation Handlers • Explicitly using
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 messages on port types • Alarm events • Duration: 15 minutes • Deadline: September 21 st 2005, 5: 20 PM •
Pick Activity •
Event Handlers • React on events while BPEL process executes • Typical usage: to handle cancellation message from the client • Syntax similar to
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 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 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
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
Use Properties in BPEL • Extract with get. Variable. Property() bpws: get. Variable. Property (‘Book. Rating', 'ISSN') • Use in assignments
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
Using Correlation Sets • Correlation sets are used in •
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 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 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 schemac tool
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 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: • • • 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 for operations and exceptions • Define WSIF binding • Add
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: • • •
New in BPEL 2. 0 • Simplified and improved variable assignments
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 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 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 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. ”


