Organization for the Advancement of Structured Information Systems

Business Transaction Protocol
Primer

An OASIS Committee Supporting Document

Version: 1.0

3 June 2002

Copyright and related notices

Copyright © The Organization for the Advancement of Structured Information Standards (OASIS), 2002. All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

________

OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.

OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.


Acknowledgements

Employees of the following companies participated in the finalization of this specification as members of the OASIS Business Transactions Technical Committee:

BEA Systems, Inc.
Bowstreet, Inc.
Choreology Ltd.
Entrust, Inc.
Hewlett-Packard Co.
Interwoven Inc.
IONA Technologies PLC
Oracle Corp.
SeeBeyond Inc.
Sun Microsystems Computer Corp.
Talking Blocks Inc.

And contributions from the following individuals

Alex Ceponkus
Gordon Hamilton
Bill Pope

Development of this primer did not involve a formal and exhaustive review process of the kind used to fashion the BTP 1.0 Committee Specification. As a result it represents a looser consensus from which members of the OASIS BT TC and their companies might demur in particular respects.

The primary authors and editors of the primer were:

Mark Potts
Bill Cox
Bill Pope

Contributions to its writing were made by

Sanjay Dalal
Peter Furniss
Alastair Green
Mark Little
Sazi Temel
Jim Webber

In memory of Ed Felt

Ed Felt of BEA Systems Inc. was an active and highly valued contributor to the work of the OASIS Business Transactions Technical Committee.

His many years of design and implementation experience with the Tuxedo system, WebLogic’s Java transactions, and WebLogic Integration’s Conversation Management Protocol were brought to bear in his comments on and proposals for this specification.

He was killed in the crash of the hijacked United Airlines flight 93 near Pittsburgh,

on 11 September 2001.


Executive Summary

Increasingly an application is no longer a stand-alone entity.  Applications must access other applications and modify data held by other organizations to get their work done. 

As business interactions extend over the Internet, a protocol is needed to manage the interactions in that loosely coupled, asynchronous environment, where traditional techniques of resource locking no longer work. We show a detailed set of examples in a travel agency/travel provider scenario to illustrate many concepts of BTP in a real-world business environment.

The Business Transaction Protocol, or “BTP,” provides a common understanding and a way to communicate guarantees and limits on guarantees between organizations.  The formal rules are necessary for the distribution of parts of business processes outside the boundaries of an organization.   BTP solves part of the problem for developers of loosely coupled transactions—the coordination and forcing a consistent termination portions.  Expertise in the design of compensating actions is still required, but these compensations are local rather than distributed.


Table of Contents

Copyright and related notices

Acknowledgements

Executive Summary

Table of Contents

Introduction

Transactions in Loosely-coupled Systems

Requirements for Business Transactions

The Business Transaction Protocol

Goals and Motivation for BTP

Atoms and Cohesions

The Travel Scenario

Example 1—Single Party Atomic Transaction

Example 2—Multiple Party Atomic Transaction

Example 3—Single Service Type Cohesion

Example 4—Multiple Service Type Cohesion

Example 5—Multi Party Compound Transaction

Reading the Specification

Questions and Answers

References

 


Introduction

This document is a primer on the OASIS Committee Draft of the Business Transaction Protocol, BTP 1.0.  [BTP Specification]  We do not cover the entire protocol, but we do introduce much of the terminology.  We do not discuss the optimisations designed into the protocol (from the contributed base documents, even though they are an important factor in assuring high performance of the protocol.

We suggest that you read this Primer before reading the first section of the BTP Specification.  [BTP Model]

We first describe the environment in which BTP will function, define the goals of the Business Transaction Protocol, examine a set of related examples, and conclude with some questions and answers on BTP.

Transactions in Loosely-coupled Systems

Conventional transaction processing in tightly coupled systems supports the so-called ACID properties or guarantees—a transaction is

Unfortunately, maintaining all of the transactional ACID semantics in a loosely coupled environment is not practical —in part because of the need to use compensating transactions in certain cases, in part because of more complex failures.  Typical locking techniques introduce problems where the transactions may last hours, days, or even longer, so that complex lock management algorithms or new interactions need to be introduced.

Isolation is also an issue in a distributed environment, not least in that business issues argue against indefinite locking of resources.

ACID transaction processing, of course, works well in distributed environments today.  But the assumptions that make a network of Automatic Teller Machines work well are not present in coordinating a group of autonomous parties.  The ATMs are not autonomous in terms of the transaction protocol: they communicate with a centralized database; locking can be done within that database because the database is under the control of a single enterprise; and the loosely coupled ATMs wait synchronously for a transaction to proceed.

Finally, in distributed interactions, communication is less reliable.  Connections are intermittent, load plays a significant role in performance, and (in the case of wireless mobile devices) communications may fail altogether.

We have already described the ACID properties for [tightly-coupled] transactions.  Transaction semantics that work in a tightly coupled single enterprise cannot be successfully used in loosely coupled multi-enterprise networks such as the Internet.

The Business Transaction Protocol relaxes some of the ACID properties as summarized in the following table.

Property

Tightly coupled

BTP Atoms

BTP Cohesions

Atomic

All or nothing

All or nothing

Negotiated by participants and coordinator

Consistent

Clean state changes

Clean state changes

Clean state changes. Note that client and coordinator can have interim steps to decide what the finalization set is, but once the set is determined the transition to confirmed or cancelled is always clean.

Isolated

Effects aren’t visible until all participants agree

Relaxed, visibility of effects controlled by the service

Relaxed, visibility of effects controlled by the service

Durable

Effects persist

Effects persist

Effects persist, some may be volatile

Requirements for Business Transactions

In this section, we will define BTP-specific terms and discuss how traditional transaction semantics can be weakened for the Internet.  Terms defined in the BTP Specification are in italics

As more organizations attempt to integrate heterogeneous environments with different transaction coordination semantics, both inside the enterprise and with business partners, a standard coordination protocol is required.  BTP is designed to allow the coordination of business transactions that span multiple participants ensuring that a transaction has a consistent without concern for whether the transaction spans disparate applications, developed with disparate technologies, and potentially deployed in different organizations.

In such circumstances, a single party does not control all the resources needed for a transaction.  We assume that each participant is autonomous and must manage its own resources while maintaining commitments it has made in a transaction.  This mirrors the real world of business, where there are varying degrees of privacy and control over how resources are committed and interactions managed, typically by negotiation.

In their autonomy, the participants in a business transaction may use recorded before- or after-images, or compensation operations to provide a “roll-forward, roll-back” capacity to enable coordination with respect to the overall outcome of the business transaction.  Locking can work for short-lived transactions, but compensation is more suitable for longer-lived transactions.

 

The Provider of a service decides when to commit/unlock, and when to compensate internal transactions/resources, but must provide both confirm and cancel mechanisms for commitments it makes.  The Provider decides how to meet its commitments; the Consumer manages the business transaction within the commitments made by the providers.  While participants have autonomous control of their resources, they must also offer some commitment to enable the coordinated and controlled termination of the business transaction.

BTP is a transactional protocol that allows independent participants and coordinators to negotiate commitment to a business transaction and allows implementations to manage those commitments to coordinate termination of the business transaction.

The Business Transaction Protocol

Today service providers often offer their commitments to a business transaction with caveats, or reservations.  But there is no standard protocol for those commitments to be made or managed to termination—the coordination and termination of these types of transactions requires out of band a priori agreement between developers on both the consumer and provider sides of the transaction.

The idea of negotiating commitment to transactions already exists in many situations today.  We will show realistic scenarios where commitments are made for a business transaction in a pessimistic or optimistic way.  For example, in the case of booking a flight, many providers take a pessimistic approach to their commitment to the transaction.

N.B.  We are using real company names in the following sections, in part to make the examples more realistic, and in part to defer (or even avoid) having to modify many graphics.

In the case of booking a Hotel Room, many providers take an optimistic approach to their commitment to the transaction.

BTP’s ability to coordinate between services offered by autonomous organizations makes it ideally suited for use in a Web Services environment, and as an underlying protocol for more loosely coupled business transactions semantics defined by conversation and process management standards. 

See the diagram on the next page.

Goals and Motivation for BTP

The OASIS Business Transaction Technical Committee was started to support business transactions that constitute units of work across multiple decoupled, distributed parties.  The protocol it has defined, the Business Transaction Protocol, is usually abbreviated BTP.  

BTP solves problems in environments with complex business interactions with potentially unreliable infrastructure over potentially unreliable communication links.  The goal of a typical business interaction is to provide a concrete completion or cancellation, under potentially complex business rules that need not (and can not) be understood by all participants.

More specifically, BTP goals include

·        Define a model for transactions across the internet, with participants from different organizations

·        Compose and coordinate reliable outcomes in the face of potentially unreliable communication channels and infrastructure

·        Manage the transaction life cycle

·        Support transactions between loosely-coupled systems communicating with each other asynchronously (for enterprise scalability and function)

·        Support long-running transactions that might last longer than any business will reasonably reserve its resources for another

·        Coordinate multiple related interactions

·        Provide a foundation for workflow and business modeling/execution tools

We will use a set of travel reservation examples in this Primer, as many of the problems solved by BTP are present in these common interactions.  For a more detailed description of the model of BTP, including a full discussion of error cases and optimizations, see Part One of the specification. [BTP Model]

Atoms and Cohesions

BTP Atomic Transactions, or atoms, are similar to transactions in tightly coupled systems, but the isolation property is relaxed, although the transactions are durable (see table below).  One atom coordinator and zero or more sub-coordinators coordinate a transaction; each manages one or more participants.  Participants act on behalf of services to either accept (confirm) or reject (cancel) the work done by the service within the scope of the atom. In addition, the outcome of an atom is atomic, such that all of the participants will either confirm or cancel.

Cohesive Business Transactions, the term for which is blended into the portmanteau word cohesions, similarly relax the isolation property, allowing the effects of a cohesive interaction to be externally visible before the interaction is committed.  In addition, a cohesion may deliver different termination outcomes to its participants such that some will confirm whilst the remainder will cancel. Finally, consistency is determined by agreement and interaction between the client (initiator) and the coordinator. The cohesive coordinator therefore has a more complex role than the atom coordinator.

Cohesions may consist of multiple sub-transactions; cohesions and atoms may have multiple participants, thus generating tree diagrams of relationships in a Business Transaction.


The Travel Scenario

To help explain the roles and interactions in the Business Transaction Protocol, we use the following scenario and variations for booking a trip.  The trip incorporates a flight, hotel, and car rental reservation and bookings.  The scenario covers a number possible outcomes and variations that show how BTP can be used to coordinate many different types of transactional interactions.

We will use this Scenario for five examples:

  1. Single Party Atomic Transaction

Booking a Flight at UAL.com

  1. Multi Party Atomic Transaction

Booking a Flight, Hotel and Car in one business transaction

  1. Single Service Type Cohesion  

Price comparison of a flight through UAL.com, BA.com and Qantas.com, subsequently confirming the best option and cancelled the alternatives.

  1. Multi Service Type Cohesion 

Booking a Flight, Hotel, and Car in one business transaction but including a price comparison for the flight portion through UAL.com, BA.com, and Qantas.com, and subsequently confirming one of the Flight options and Hotel and cancelling the Car bookings.

  1. Multi Party Compound Transaction 

A Consumers view of booking a Flight, Hotel and Car in one business transaction through a Travel Agent Service, where the Travel Agent acts as an intermediary of the consumers behalf.

We indicate alternative steps with a decimal notation—for example, Stage 5.1, Stage 5.2, and Stage 5.3 might all be valid continuations from a Stage 4.

We do not discuss the optimisations designed into BTP (from the contributed base documents), even though they are an important factor in assuring high performance of the protocol.  Committee Specification describes the optimisations.  [BTP Specification]


Example 1—Single Party Atomic Transaction

This is the simplest of the four examples in the scenario but one that we will explore in depth to convey the roles, messages and sequence of those messages, the BTP protocol. As we examine the other examples we will be able to apply that understanding to the more complex examples without repeating all the lower level details.

In looking more deeply at this transaction, we will see the phases of the transaction, the message exchanges, and commitments made by the involved parties.

Stage 1: Firstly the Travel Agent (Initiator) creates a business transaction (Context) for the work it wants to accomplish. It does this through, what we will abstractly refer to as, a Coordinator (Factory/Coordinator/Decider).

Stage 2: The Travel Agent (Initiator) then makes the Flight Booking Request to UAL.com also propagating the transaction details (Context).

Stage 3.1: UAL.Com responds to the request with a confirmation number for the flight it reserved for the Travel Agent. Included in the response, in this particular case, is information and the state of the transaction from UAL.com’s (Participant) perspective. The response also confirms UAL.com participation in the transaction (Enroll) and makes a commitment to the Travel Agent that it will hold this flight on the travel agents behalf for the next 24hours (Prepared+ Timeout).

Stage 3.2: Alternatively UAL.Com confirms with the Travel Agent its participation in the transaction (Enroll) separately from responding to the application request. In other longer running scenarios this may be appropriate. UAL.Com would then after a time responds and possibly declare its commitment (Prepared + Timeout)

The Travel Agent now has 24 hours to make a decision about whether to accept and confirm the flight booking. After 24 hours UAL is under no obligation to honor its commitment. There are now three possible outcomes for the business transaction.

Stage 4.1:  The Travel Agent confirms the booking within 24 hours by informing the Coordinator that it wants to confirm the booking (Confirm-Transaction). Because UAL.com has already made a commitment to the transaction, the coordinator simply confirms the booking with UAL (Confirm). The request was made within the specified time period, so UAL.com will go ahead and issue the tickets (Confirmed) and bill the travel agent. Finally, the Coordinator confirms the successful conclusion of the business transaction back to the Travel Agent (Transaction Confirmed).

Stage 4.2:  The Travel Agent cancels the booking within 24 hours. The Travel Agent does this by informing the coordinator its wish to cancel the booking (Cancel-Transaction). The coordinator now simply cancels the booking with UAL (Cancel). UAL would respond to the request to cancel, by releasing the seats on the flight (through whatever means it wishes) and confirming this action back to the Travel Agent (Cancelled). The Coordinator finally confirms the cancellation of the business transaction back to the Travel Agent (Transaction Cancelled).

Stage 4.3:  The Travel Agent neither confirms or cancels the booking within 24 hours. In this case UAL.com autonomously cancels the booking, releasing the seats on the flight (through whatever means it wishes) and informs the travel agent of the action it has taken (Cancelled). If the Travel agent then tried to confirm the reservation the Coordinator would report back to the Travel Agent the transaction was cancelled (Transaction Cancelled).


Example 2—Multiple Party Atomic Transaction

This example extends the Single Party Atomic Transaction case by adding more participants to the transaction. In the example below, the same interactions will exist, but this time the trip that we are booking includes multiple components not just a flight. Specifically this trip includes booking a Flight, reserving a hotel room and renting a Car. Without being able, to secure all three components of the trip we do not want to go ahead with the business transaction.

In BTP terms the transaction in this case is still atomic insofar as the participants will all see the same outcome: The Travel Agent needs to get agreement commitments to the business transaction and all the bookings need to either, complete successfully or fail, as a single business transaction.

We will not repeat the similar setup stages in the remaining examples.

Stage 1: Firstly the Travel Agent (Initiator) creates a business transaction (Context) for the work it want to accomplish. It does this through a Coordinator (Factory/Coordinator/Decider).

Stage 2: The Travel Agent (Initiator) then makes the Service Requests to Qantas.com Marriot.com and Hertz.com also propagating the transaction details (Context).

Stage 3: Qantas.com Marriot.com and Hertz.com (Participants) all agree to participate in the transaction (Enroll). As in example 1 they could also make commitments with regard to the business transaction in their replies to the travel agent. In this example no commitments are made at this time.

Stage 4: Once all parties have agreed to participate (Enrolled) and informed the Travel Agent of this (Context Reply), the Travel Agent can then confirm the booking. (Confirm Transaction).

Stage 5: Because there are multiple parties in this transaction the Coordinator then asks each party (Participants) to make a commitment with regard to the overall business transaction (Prepare). Qantas.com, Marriott.com, and Hertz.com (Participants) all make commitments to the business transaction with caveats in some cases. Positive commitments mean there are seats available on the flight requested through Qantas.com, there are rooms available on the dates requested at the Marriott hotel, and there is a Car available for rent for the period requested through Hertz.

Stage 6.1:  The Coordinator receives positive commitments from Qantas.com Marriot.com and Hertz.com with regard to the business transaction (Prepared). The Coordinator then proceeds with the transaction (Confirm), based on the combined positive commitments made by each party. Each party also signals back to the coordinator the verification of success (Confirmed). The Coordinator finally confirms the successful conclusion of the business transaction back to the Travel Agent (Transaction Confirmed). 

Stage 6.2:  The Coordinator receives positive commitments from Qantas.com and Marriott.com but not from Hertz.com with regard to the car rental. Because this business transaction is Atomic in nature, the Coordinator must cancel the flight booking through Qantas.com and the room reservation with Marriott. The Coordinator therefore issues a Cancel instruction to Qantas.com and Marriott.com (Cancel). Each party also signals back to the coordinator the verification of cancel request (Cancelled).

Because Hertz has already cancelled, there is no need to go back to them. Finally, the Coordinator informs the Travel Agent of the failure of business transaction (Transaction Cancelled).


Example 3—Single Service Type Cohesion

This example discusses a cohesion type transaction that relaxes not only isolation levels but allows for the relaxing of atomic properties prior to confirming or canceling a transaction. In this example, the Travel Agent chooses to start a transaction and book a flight to London. One flight option is direct on UAL and the other has two legs and two different carriers BA and Qantas. Eventually the travel Agent has to decide on one of the flights either the direct UAL flight or the combined Qantas/BA flight. By getting commitments for both the UAL flight or the combined Qantas/BA flight the Travel Agent can decide which to take knowing that they will always get the flight they decide upon as long as they make the booking compliant with any restriction made with the commitments received.

Given that the British Air/Qantas flights need to be taken as a pair, this example could be described with a sub-atom in the cohesion; we have chosen to instead describe business logic in a cohesion that has the same effect of booking either BA/Qantas in combination or United by itself.

Stage 1: Firstly the Travel Agent (Initiator) creates a business transaction (Context) for the work it want to accomplish. It does this through what we abstractly refer to as a Coordinator (Factory/Composer/Decider).

Stage 2: The Travel Agent (Initiator) then makes the Service Requests to Qantas.com UAL.com and BA.com also propagating the transaction details (Context).

Stage 3: Qantas.com, UAL.com and BA.com (Participants) all agree to participate in the transaction (Enroll). In this example Qantas also makes a commitment to the transaction (Prepared) but UAL and BA do not.

Stage 4: Based on the Prices returned the Travel Agent decides to go ahead and book the two-legged flight offered by Qantas and BA. (Confirm Inferiors B, C). Because UAL never made a commitment to the business transaction (Prepared), i.e. United did not reserve seats, there is no need to cancel the UAL flight.

Stage 5: Because the flight chosen involves two parties, Qantas and BA, the transaction the coordinator (Composer) then asks each party (Participants) that has not already done so to make a commitment with regard to the overall business transaction (Prepare). Because Qantas has already made a commitment the coordinator (Composer) only needs to get a commitment from BA (Prepare).

Even though this business transaction is a cohesive transaction (cohesion), you will notice that the final set of participants chosen from the cohesion must terminate atomically. In the example BA and Qantas need to make commitment to the transaction and complete as an atomic set, omitting the UAL flight. Again, we could have shown this as a separate atom, but instead showed how to force this outcome from the cohesion.

Stage 6.1:  The Coordinator (Composer) now has received positive commitments from Qantas.com and BA.com, the requested portions of the business transaction requested by the Travel Agent. The coordinator (Composer) therefore goes ahead and confirms the seat reservations offered by BA.com and Qantas.com.

Stage 6.2: If UAL had made a commitment (Prepared) then the coordinator (Composer) would need to explicitly cancel (Cancel) the seats reserved by UAL as part of the business transaction, at the same time as confirming the BA, Qantas flight. Finally, the Coordinator confirms the successful conclusion of the business transaction back to the Travel Agent (Transaction Confirmed).


Example 4—Multiple Service Type Cohesion

This example extends example 3 and discusses a cohesion type transaction that incorporates multiple service types and multiple services for those types. In this example, the Travel Agent chooses to start a transaction and book a vacation including Flight, Hotel and Car rental. The Hotel is specific to the location of the vacation (Perth Western Australia), the Car will be rented through Hertz, but the flight is variable—there are options on Qantas, BA, and United.

 

Stage 1: Firstly the Travel Agent (Initiator) creates a business transaction (Context) for the work it want to accomplish. It does this through a Coordinator (Factory/Composer/Decider).

Stage 2: The Travel Agent (Initiator) then makes the Service Requests to Qantas.com, UAL.com, BA.com, Marriott, and Hertz, also propagating the transaction details (Context).

Stage 3: Qantas.com, BA.com, Marriott, and Hertz (Participants) all agree to participate in the transaction (Enroll). UAL is yet to agree to participate. In this example Qantas, Marriott, and Hertz also make a commitment to the transaction (Prepared) but BA does not.

Stage 4: Based on the excellent Price returned by BA, the Travel Agent decides to go ahead and books the trip with the flight from BA, as well as the Marriott Hotel, but decides to do without the car hire after reading about Perth’s great public transport system

(Confirm Inferiors B, D).

Stage 5: Because BA has not made a commitment about seats on the flight, the Coordinator (Composer) then asks BA (Participant) to make a commitment with regard to the overall business transaction (Prepare). Because Marriott has already made a commitment the coordinator (Composer) only needs to get a commitment from BA (Prepare).


Stage 6: At this stage parties involved in the transaction have made various agreements (Enrolled) and commitments (Prepared) to the overall business transaction. UAL has neither agreed to participate nor made any commitments; BA has made a commitment based on an explicit request to do so (Prepare), Qantas autonomously made a commitment, as did Marriott and Hertz (Prepared).

Based on the Travel Agents instruction to book the flight and the hotel, the Coordinator needs to confirm with these two parties the purchase of the ticket (with BA) and confirm the room reservation (with Marriott). The Coordinator also has to cancel parties that have made commitments that are no longer required (Hertz and Qantas). The Coordinator confirms the successful conclusion of the business transaction back to the Travel Agent (Transaction Confirmed).

UAL does not need to be contacted as they did not even agree to participate and are no longer required to complete the business transaction.


Example 5—Multi Party Compound Transaction 

In this example the Travel agent itself offers a service for other consumers to utilise for holiday and trip planning.  In effect, the travel agent is an intermediary acting on behalf of the consumer and the consumer never interacts directly with Qantas, Marriott, or Hertz.  The same type of interactions we have seen in the previous examples can be compounded or nested whether they are Atomic or Cohesive (in this simple example all portions of the transaction are Atomic) to support more complicated scenarios such as supply chain and intermediaries.  This example most closely reflects the real world of the travel agent.

Stage 1: Firstly the Consumer (Initiator) creates a business transaction (Context) for the work it want to accomplish. It does this through a Coordinator (Factory/Composer/Decider).


Stage 2: The Consumer (Initiator) then makes the Service Requests to the Travel Agent, also propagating the transaction details (Context). The Travel Agent now undertakes the task of creating and managing the sub-transactions that make up the overall business transaction. 

Stage 3: The Travel Agent makes Service Requests to Qantas, Marriott and Hertz based on the Consumer’s request. Qantas, Marriott and Hertz (Participants) all agree to participate in the transaction (Enroll) and confirm that with the Travel Agent.  Once all the parties have agreed to participate in the transaction the Travel Agent (Participant/Coordinator) itself can agree to be part of the transaction initiated by the consumer (Initiator).


Stage 4: In Stage 3 all parties also made a commitment to the Travel Agent with regard to the transaction (Prepared). The Travel Agent could also make commitments (Prepared) to the Consumer when it agrees to participate in the transaction (Enroll). In this case however the Travel Agent simply replies to the Consumer and agrees to participate in the transaction (Enroll).

Stage 5: The Consumer (Initiator) now can decide to make the booking, or cancel, depending upon the information returned by the Travel Agent. The consumer (Initiator) in this case decides to not purchase the trip offered (Cancel). The Coordinator now asks Travel Agent (Participant) to cancel the booking. The Travel Agent (Coordinator), who has already received commitments from the parties (Participants) it is transacting with now must cancel with Qantas, Marriott, and Hertz.

Stage 6: Once the Travel Agent (Coordinator) has received confirmation of the requests to cancel from all parties (Participants) it can confirm the cancel operation with the Coordinator, and the Coordinator in turn can confirm the cancellation with the Consumer.

Reading the Specification

The BTP specification and Model [BTP Model] more carefully and formally define the terms we are using here.  The BTP Specification describes many more potential topologies of actors, along with interaction diagrams, selected state transition diagrams, and detailed state tables.

Questions and Answers

In this section, we answer some common questions about BTP.

·        How is BTP similar to traditional transaction processing protocols?  BTP is similar to traditional transaction protocols in that it defines a consistent termination for a unit of work, called a transaction.  BTP has improved applicability to loosely coupled distributed transactions and environments with the required weakening of “tradition” transactional guarantees (e.g. ACID).

Applications that provide a BTP enabled service need to call a BTP Participant to enrol in a transaction.  These service side applications need to implement some form of commit and cancel operations.  Whether these are compensation based or something else is up to the application writer.

Application developers who have been creating ad hoc termination protocols involving compensation will find their work simplified significantly.  While the nature of compensation actions requires significant expertise in the domain (such as financial services or workflow management), the developers’ job in creating termination and reconciliation protocols is much easier.

References

[BTP Model]   

Section 1, OASIS Business Transaction Protocol, Committee Specification 1.0. Download from http://www.oasis-open.org/business-transaction/

[BTP Specification]     

OASIS Business Transaction Protocol, Committee Specification 1.0.  Download from http://www.oasis-open.org/business-transaction/