Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "“This presentation is for informational purposes only and may not be incorporated into a contract or agreement.”"— Presentation transcript:

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

2

3 Dave Shaffer, Director Product Mgmt Oracle Corporation David.shaffer@oracle.com Matjaz B. Juric, University of Maribor

4 “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

5 “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

6 “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 (,, ) Perform activities sequentially ( ) or in parallel ( ) Express conditions ( ) Perform loops ( ) Handle variables ( )

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

8 “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 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)

9 “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

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

11 “This presentation is for informational purposes only and may not be incorporated into a contract or agreement.” Signaling Faults to Clients Synchronous replies Asynchronous processes

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

13 “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 can define local Variables Fault handlers Event handlers Partner links Compensation handlers Correlation sets

14 “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-AtomicTransaction Compensation model WS-BusinessActivity Long-Running Transactions

15 “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 activity Handler can be invoked only after activity has completed normally

16 “This presentation is for informational purposes only and may not be incorporated into a contract or agreement.” 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 enableInstanceCompensation attribute

17 “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 Handling and Compensation

18 “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

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

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

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

22 “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 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

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

24 “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 Handling

25 “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 ( createInstance 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

26 “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.

27 “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......

28 “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 a specific element or attribute of the message We use property name as alias for message part and location <bpws:propertyAlias propertyName="tns:ISSN" messageType="bst:TravelResponseMessage" part="book" query="/book/bkr:ISSN"/>

29 “This presentation is for informational purposes only and may not be incorporated into a contract or agreement.” Use Properties in BPEL Extract with getVariableProperty() Use in assignments bpws:getVariableProperty (‘BookRating', 'ISSN')

30 “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 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

31 “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,, parts of activities or activity Used to specify which correlation sets should be used Nested within any of the above-mentioned activities

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

33 “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 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

34 “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 transaction- aware Java resources using JTA Ease of development

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

36 “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 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

37 “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 Mapped to interface ( IBookDscType ), class ( BookDscType ), and factory Access through get/set methods e.g. getISSN()

38 “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, …) 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

39 “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

40 “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

41 “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 declaration JDeveloper 10.1.3 provides wizards to automate these steps!

42 “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.0 still Working Draft Most BPEL concepts will stay unchanged Some new activities:

43 “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 New style: $BookPurchase.book $BookRatingRequest.book

44 “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 Automatic initialization of partner links New standard faults Unclear about support for user interactions Possible extension proposed by BPEL4People specification

45 “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

46 “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

47 “This presentation is for informational purposes only and may not be incorporated into a contract or agreement.” A Q & Q U E S T I O N S A N S W E R S

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


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

Similar presentations


Ads by Google