|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TODAY'S TOP SOA & WEBSERVICES LINKS Feature BPEL: Make Your Services Flow
BPEL: Make Your Services Flow
By: Doron Sherman
Jun. 17, 2003 12:00 AM
Until now, the options available for implementing business flows in a typical enterprise-computing environment were daunting. IT project managers had to choose between complex high-end EAI/BPM solutions and high-risk application development projects. More often than not, IT decision makers opted to do nothing and wait. When IBM, Microsoft, and others submitted the BPEL4WS specification to OASIS, a compelling alternative to the traditional options became available. BPEL is to process orchestration what SQL was to data management. Its impact is significant; transforming application integration from a risky and expensive endeavor into a mainstream development practice. BPEL has the potential to create the foundation for new composite, Internet-scale, loosely coupled applications. Toward Composite Business Flows This new genre of applications is driving the emergence of an event-driven architecture (EDA) and the development of composite business flows across existing IT assets. It is inspiring renewed interest in EAI, BPM, and workflow solutions, but with radically new requirements. Unlike the stand-alone, monolithic nature of existing solutions, this genre calls for implementation of long-running business processes that coordinate flow and asynchronous conversations while allowing for effective handling of exceptions and performance of manual tasks. Web services started as the technology answer to the need to ease connectivity to existing IT assets and enable simplified, all-XML application-to-application communication. Business agility, as well as other technical requirements such as scalability, reliability, and flexibility, drives users to assemble Web services into business processes that are themselves exposed as Web services. An Example
![]() In addition, the ATP process involved exception handling and mandated reporting of processing statistics to facilitate gradual on-going improvements to the process. Better management of exceptions and greater visibility to decision makers at the chemical manufacturer are important goals. Finally, the inefficient handling of the manual process resulted in high transaction costs. Being able to handle a larger volume of ATP requests, each costing less to process, will increase profitability. Technical Challenges of Flow Implementation Controlling proper routing of documents among the various participants also requires flow coordination. For example, an inventory levels check has to occur in parallel to production schedule verification. The ATP process is a long-running business transaction, where some of its activities may be in need of reversal, or undo, when exceptions occur during execution. Maintaining execution integrity in the context of asynchronous conversations mandates the use of compensating transactions. Hence, cooperating services and applications taking part in the ATP process should provide undo logic to reverse the effect of actions taken during normal processing. This cancellation method is provided in lieu of a conventional atomic transaction mechanism, since resource locking is inappropriate here. Managing compensating transactions requires the use of a transaction coordinator to handle such cancellations. Emerging Web Service Orchestration Stack
![]() The current phase of the evolving Web services stack is orchestration; i.e. coordinating interactions among published Web services and composing them into long-running flows. Orchestration is comprised of three pillars: asynchronous conversations, flow coordination, and exception management. In support of these pillars (explained next), and building on its foundation, the Web services stack adds: Pillar 1: Asynchronous Conversations The basic interaction pattern involves a business flow initiating a request to an asynchronous Web service. The Web service can take an arbitrarily long time to complete its execution upon receiving a request. Once execution is completed, the service replies to the sender of the request. In order to carry out this interaction, certain information needs to be exchanged between the sender (business flow) and the receiver (async service). The sender needs to provide the receiver with a reply-to address (so that the receiver knows where to send the reply, i.e. invoke a callback once ready). The sender also needs to provide the receiver with a correlation ID. Post execution, the correlation ID is sent from the receiver to the sender so that the reply from the receiver can be associated with the correct originating request on the sender side. This basic pattern can be extended to a multi-step interaction when the business flow needs to invoke the service through more than one entry point or vice versa. The formalism for asynchronous conversations includes WS-Addressing, WS-ReliableMessaging, and BPEL Service Link. WS-Addressing specifies correlation and callback information. WS-Addressing provides transport-neutral mechanisms for addressing Web services and messages by defining XML elements to identify Web service endpoints and to secure end-to-end endpoint identification in transmitted messages. WS-ReliableMessaging allows messages to be delivered reliably between interacting Web services in the presence of software component, system, or network failures. Its primary goal is to create a modular mechanism for reliable message delivery. BPEL Service Link defines the callback interface. Pillar 2: Flow Coordination
![]() Flow coordination is comprised of the WSDL interface, XML variables, partners, flow activities, and compensation handlers. BPEL4WS relies heavily on WSDL descriptions of the services involved in order to refer to exchanged messages, the operations being invoked, and the portTypes they belong to. The ATP process uses a WSDL interface to integrate, for example, into a customer portal. XML variables are containers for data exchanged between the interacting services. Partners are external services which participate in the business process. Flow activities are basic and structured commands that define the rules and sequences for interacting with each service. Flow activities will be explained later. Compensation handlers are rules for undoing parts for the business flow in case of exceptions. The ATP process includes XML variables such as the credit rating, production schedule, and inventory status. These variables are used for exchanging data with the partners (external services), which include a credit check mainframe application fronted by MQSeries, a production plans SAP application, and an inventory check SAP application. The XML variables are used for holding the data used for requests sent to a partner and for replies received from a partner. They are also used to store intermediate information, such as the combined planning information sent to the supplier hub. Compensation handlers are used within a business process, where it might be necessary to undo one of the steps that have already been successfully completed. Compensation handlers define these undo steps at the level of a predefined scope. A compensation handler contains one activity which is run when a scope needs to be compensated. Since activities can share XML variables, completing scopes with associated compensation handlers need to save a snapshot of the data when the scope is completed. This data is used by the handler in case it is invoked (e.g., upon encountering an exception at some later point in time). Compensation handlers become ready to run once the scope they're associated with is completed successfully. BPEL Activities Structured activities define the order in which activities execute. They describe how a business process is created by composing the basic activities it performs into structures. These structures entail the control patterns, data flow, fault handling, external event handling, and coordination of message exchanges between process instances. The control flow is a hybrid model halway between block structured and state transitions. It uses links to establish dependencies between block definitions and put their own constraints on how activities are set to run. Links are associated with conditions based on XPath expressions that evaluate to true or false for determining if an activity is to run or terminate (a join condition). It does not have process composition (i.e., a sub-process) but does have service composition (through use of the WSDL interface of a BPEL flow). BPEL will drive the creation of a new generation of assembly tools that allow enterprises to implement coarse-grain processes by visually composing and tying activities and service interactions into collaborative and transactional business flows. The key benefit is developer productivity for creation of business flows but also the ability to quickly adapt to change, an essential requirement in most real-world implementations of organizations' business flows. Pillar #3: Exception Management The basic interaction pattern (see Figure 4) is similar to the one described for asynchronous conversations (i.e., a business flow initiating a request to an asynchronous Web service). The use case here involves an exception signaled during the business flow, before the service completes its execution. In BPEL, a local fault handler associated with the Web service, is invoked subsequent to the signaled exception. In addition, the asynchronous service is notified of the exception through a cancellation request using WS-Transaction.
![]() The formalism for exception management includes the use of fault handlers and compensation handlers. Fault handlers are used when exceptions are signaled during the execution of an invoked Web service. Compensation handlers, on the other hand, reverse or undo the effect of an invocation of a Web service that completed its execution. Exception management also includes WS-Coordination and WS-Transaction. These specifications provide cancellation requests across a network of services to ensure coordination of interacting services in case of failures, as well as guaranteeing the integrity of the overall execution. BPEL Infrastructure
![]() The BPEL server supports orchestration logic provided in BPEL form for execution of business flows. Although not a mandatory requirement, a BPEL server runtime can utilize a J2EE application server for its underlying execution environment (rather than reinventing the wheel with respect to multithreading, database connection pooling, etc.). It also provides native J2EE integration by leveraging the J2EE application server runtime environment. To ensure reliability of long-running business flows involving asynchronous conversations with Web services and loosely-coupled business transactions, it uses context dehydration for executing flows. The dehydration mechanism uses a persistent store, such as a relational database, to safely store, and subsequently retrieve, flow instances. The second important element of the infrastructure is the BPEL console, which is designed to provide ease of management for business flows deployed to the BPEL server. It offers essential monitoring and administration facilities to developers as well as operational and business users. These facilities include testing and debugging of business flows, audit trail of flow execution in both textual and graphical form, reporting and statistics, and versioning. The last capability is particularly important for long-running flows since multiple versions of the same business flow must run in parallel at times (e.g., when a new version phases in and an old version phases out). The BPEL infrastructure should be equipped with strong support for integration. Integration capabilities are conveniently expressed through connectors that plug into the BPEL server. These connectors should support both synchronous and asynchronous interactions. Common connectors needed for enterprise computing environments include XML Web services, Java/J2EE, .NET, JMS, e-mail, and portal infrastructure (for user interaction). Such connectors should be transparent to flow logic developers and have no effect upon the portability of the BPEL code. Conclusion YOUR FEEDBACK
SOA WORLD LATEST STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||