<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='../ws/arch/2/xmlspec.xsl'?>
<!DOCTYPE spec
  PUBLIC "-//W3C//DTD Specification V2.1//EN" "../ws/arch/2/xmlspec-v21.dtd">
<spec w3c-doctype="other" other-doctype="use-case" role="editors-copy">
   <header>
      <title>Web service use case: Travel reservation</title>
      <w3c-designation>ws-example</w3c-designation>
      <w3c-doctype>Use case</w3c-doctype>
      <pubdate>
         <day>5</day>
         <month>May</month>
         <year>2002</year>
      </pubdate>
      <publoc>
         <loc href="http://www.w3.org/2002/06/ws-example">http://www.w3.org/2002/06/ws-example</loc> (<loc href="http://www.w3.org/2002/06/ws-example.xml">XML version</loc> and <loc href="http://www.w3.org/2002/06/ws-example.xml">HTML version</loc>)</publoc>
      <prevlocs>
         <loc href="http://www.w3.org/2002/04/17-ws-usecase">http://www.w3.org/2002/04/17-ws-usecase</loc>
      </prevlocs>
      <authlist>
         <author>
            <name>Hugo Haas</name>
            <affiliation>W3C</affiliation>
            <email href="mailto:hugo@w3.org">hugo@w3.org</email>
         </author>
      </authlist>
      <abstract>
         <p>This documents attempts to put together a use case involving a set of Web
services to serve as an useful example for Web services and to generate
requirements for the <loc href="http://www.w3.org/2002/ws/arch/">Web Services
Architecture Working Group</loc>.</p>
         <p>This example, due to its very broad scope, will be incomplete, and will
evolve over time. In its current state, this usage scenario is somewhat
simplified: there might be additional security, privacy constraints, etc.</p>
         <p>I attempted to use the <loc href="http://www.w3.org/2002/ws/arch/2/04/f2f-minutes#Notes5">method that
one of the subgroups tried out at the April 2002 face-to-face meeting</loc>.</p>
    </abstract>
      <status>
         <p>This document was incorporated in the <loc href='http://www.w3.org/TR/2002/WD-ws-arch-scenarios-20020730/'>30 July 2002
      version of the Web Services Architecture Usage Scenarios</loc>.</p>
      <p>Please send comments on this documents on the <loc
      href="mailto:www-ws-arch@w3.org">www-ws-arch publicly archived
      mailing list</loc>.</p>
      </status>
      <langusage>
         <language id="en">English</language>
      </langusage>
      <revisiondesc>
         <p>Last Modified: $Date: 2003/01/28 10:52:55 $</p>
      </revisiondesc>
   </header>
   <body>
      <div1 id="Descriptio">
         <head>Description</head>
         <p>A company (travel agent) wants to offer to people the ability to book
complete vacation packages: plane/train/bus tickets, hotels, car rental,
excursions, etc.</p>
         <p>Service providers (airlines, bus companies, hotel chains, etc) are
providing Web services to query their offerings and perform reservations.</p>
         <p>Credit card companies are also providing services to guarantee payments
made by consumers.</p>
         <p>Due to the loosely coupled-nature of Web services, the travel agent
doesn't need to have a priori agreements with service providers or credit
card companies. This allows the travel agent to have access to more services,
offering more options to its customers, the credit card companies to offer
their services broadly and therefore make their customers happy, and the
service providers can offer their services broadly and easily and therefore
generating more business for themselves.</p>
      </div1>
      <div1 id="Scope">
         <head>Scope</head>
         <p>For this version of the usage scenario, we will limit ourselves to booking
of vacation packages. We will assume that cancellation is not possible once a
package has been purchased.</p>
      </div1>
      <div1 id="Stakeholde">
         <head>Stakeholders / Interests</head>
         <p>Travel agent: provides a system to provide the user with options for
his/her vacation; earns money by charging fees for each package bought.</p>
         <p>Service providers: sell their services by making them available widely.</p>
         <p>Credit card company: enable customers to use their credit cards in a very
large number of cases; make profit with each money transaction.</p>
         <p>Consumer: book vacation easily by choosing among a large variety of
offers.</p>
         <p>Only the user in the scenario is a human being. The travel agent service,
airline, hotel and payment services that the travel agent service is
interacting with, are machines.</p>
      </div1>
      <div1 id="Actors">
         <head>Actors &amp; Goals</head>
         <p>Consumer: best combination of services and prices for his/her needs.</p>
         <p>Travel agent: customer satisfaction, sell packages.</p>
         <p>Service providers: sell services.</p>
         <p>Credit company: qualify buyer, do the payment.</p>
      </div1>
      <div1 id="Cases">
         <head>Usage scenarios</head>
         <p>The following use cases describe how a user would make a reservation for a
vacation package (flight and hotel room).</p>
         <p>Here is a list of diagrams giving an overview of
    the scenario, with the introduction of a new hotel service:</p>
         <ulist>
      
            <item>
               <p>
                  <loc href="../Talks/www2002-hh-0508-wsa/ta.svg">Overview</loc>.</p>
            </item>
      
            <item>
               <p>
                  <loc href="../Talks/www2002-hh-0508-wsa/exa1.svg">Composing a vacation package</loc>.</p>
            </item>
      
            <item>
               <p>
                  <loc href="../Talks/www2002-hh-0508-wsa/exa2.svg">Booking a chosen vacation package</loc>.</p>
            </item>
      
            <item>
               <p>
                  <loc href="../Talks/www2002-hh-0508-wsa/exa3.svg">Introducing a new hotel Web service</loc>.</p>
            </item>
      
            <item>
               <p>
                  <loc href="../Talks/www2002-hh-0508-wsa/exa4.svg">Booking the new cheaperoption chosen</loc>.</p>
            </item>
    
         </ulist>
         <p>An assumption for this usage scenario is that all the services are using
common concepts (e.g. flight, economy class, room, etc). For the travel agent
service to understand the airline services and to be able to send meaningful
information to them, a travel industry ontology needs to exist and be used by
the Web services taking part in this scenario. An ontology is a formal
description of a set of concepts and their relationships to each other. By
associating a name with each concept, an ontology defines a standard
vocabulary that can be used to communicate those concepts.</p>
         <p>It has to be noted that some additional technology is needed for this
usage scenario:</p>
         <ulist>
  
            <item>
               <p>context maintenance.</p>
            </item>
  
            <item>
               <p>reliability: in order to make money, each step needs to happen.</p>
            </item>
  
            <item>
               <p>trust mechanisms for the services to do business with each other.</p>
            </item>
  
            <item>
               <p>description of orchestration of services: if a reservation of a flight
    involves interacting with a couple of Web services, the airline would
    document in a machine readable way how to interact with the two single
    services in order to get the desired result, including how to handle
    errors in the process fails before the operation is completed.</p>
            </item>
  
            <item>
               <p>...</p>
            </item>

         </ulist>
         <p>Note that this usage scenario could be different in the following ways:</p>
         <ulist>
  
            <item>
               <p>the user could have bought some travel agent software; the travel agent
    service could reside locally on his/her computer.</p>
            </item>
  
            <item>
               <p>the user could write tools to interact directly with the airline and
    hotel services.</p>
            </item>

         </ulist>
         <div2 id="L109">
            <head>1. User requests availabilities about some travel dates</head>
            <div3 id="Goal">
               <head>Goal / Context</head>
               <p>The user gets the location of a travel agent service via an unspecified
way (search engine, URI in an email, service directory, etc).</p>
               <p>The user provides a destination and some dates to the travel agent
service. The travel agent service inquires airlines about deals and presents
them to the user.</p>
            </div3>
            <div3 id="Scenario">
               <head>Scenario / Steps</head>
               <olist>
  
                  <item>
                     <p>The user is presented with a form to fill in order to provide the
    travel agent service with details about dates of his/her travel and the
    destination.</p>
                  </item>
  
                  <item>
                     <p>The user submits the information to the service in order to get a list
    of flights corresponding to his/her schedule.</p>
                  </item>
  
                  <item>
                     <p>The travel agent service finds a list of airlines.</p>
                  </item>
  
                  <item>
                     <p>For each airline found: 
    <olist>
      
                           <item>
                              <p>The travel agent service requests a description of how to
        communicate with the service found.</p>
                           </item>
      
                           <item>
                              <p>The travel agent service requests a list of flights accommodating
        the user.</p>
                           </item>
    
                        </olist>
  
                     </p>
                  </item>
  
                  <item>
                     <p>The travel agent service presents the results of the queries to the
    user letting him choose the best option.</p>
                  </item>

               </olist>
            </div3>
            <div3 id="Extensions">
               <head>Extensions</head>
               <p>If no flight can be found, the user should be presented with an error.</p>
            </div3>
            <div3 id="Technologi">
               <head>Technologies / Requirements</head>
               <p>Discovery technology: used by the travel agent service to find the
airlines services.</p>
               <p>Description language: used by the airlines to describe their query
services to the travel agent service.</p>
               <p>Response to queries: XML documents that the travel agent service processes
and merge together.</p>
               <p>Ontologies: the data coming from different airline services and expressed
with different XML vocabularies needs some semantics to be merged in a
meaningful way.</p>
            </div3>
         </div2>
         <div2 id="L156">
            <head>2. User requests chooses flight and looks for hotels</head>
            <div3 id="Goal1">
               <head>Goal / Context</head>
               <p>The user has been presented with options for flights to go to his/her
destination. The user chooses a preferred flight. The service puts the seats
on hold, and goes on with proposing lodging options to the user.</p>
            </div3>
            <div3 id="Scenario1">
               <head>Scenario / Steps</head>
               <olist>
  
                  <item>
                     <p>The user communicates his/her choice for the flight.</p>
                  </item>
  
                  <item>
                     <p>The travel agent service requests the chosen airline to put the flight
    on hold: 
    <olist>
      
                           <item>
                              <p>The travel agent service requests a description of how to put a
        seat on hold to the airline service.</p>
                           </item>
      
                           <item>
                              <p>The travel agent service sends the request accordingly.</p>
                           </item>
    
                        </olist>
  
                     </p>
                  </item>
  
                  <item>
                     <p>The airline returns a confirmation number with an expiry date.</p>
                  </item>
  
                  <item>
                     <p>The travel agent service finds a list of airlines.</p>
                  </item>
  
                  <item>
                     <p>For each hotel found: 
    <olist>
      
                           <item>
                              <p>The travel agent service requests a description of how to
        communicate with the service found.</p>
                           </item>
      
                           <item>
                              <p>The travel agent service requests accommodation options for the
        period.</p>
                           </item>
    
                        </olist>
  
                     </p>
                  </item>
  
                  <item>
                     <p>The travel agent service looks for payment services available, and
    builds a list of options for the user.</p>
                  </item>
  
                  <item>
                     <p>The travel agent service presents the results of the queries to the
    user letting him choose the best option, along with the payment options
    offered.</p>
                  </item>

               </olist>
            </div3>
            <div3 id="Extensions1">
               <head>Extensions</head>
               <p>If the seats chosen are not available anymore, the travel agent service
presents the user with an error message and the user is presented with an
updated list of available flights to choose from.</p>
            </div3>
            <div3 id="Technologi1">
               <head>Technologies / Requirements</head>
               <p>Description language: used by the airlines to describe their services to
put tickets on hold to the travel agent service, by the hotels to describe
their query services to the travel agent service.</p>
               <p>Discovery technology: used by the travel agent service to find the hotels
services.</p>
               <p>Ontologies: the data coming from different accommodation services and
expressed with different XML vocabularies needs some semantics to be merged
in a meaningful way.</p>
            </div3>
         </div2>
         <div2 id="L212">
            <head>3. User books hotel room and flight</head>
            <div3 id="Goal2">
               <head>Goal / Context</head>
               <p>The user has been presented with options for hotels to go to his/her
destination and a means of payment. The user chooses a hotel option. The
travel agent service contacts a bank for payment authorization. The service
books the hotel and confirms the flight, using the payment authorization from
the bank.</p>
            </div3>
            <div3 id="Scenario2">
               <head>Scenario / Steps</head>
               <olist>
  
                  <item>
                     <p>The user communicates his/her accommodation choice to the travel agent
    service.</p>
                  </item>
  
                  <item>
                     <p>The travel agent service contacts the bank service that the user chose
    to confirm payment: 
    <olist>
      
                           <item>
                              <p>The travel agent service requests a description of how to guarantee
        payment of the total amount.</p>
                           </item>
      
                           <item>
                              <p>The travel agent service send the request accordingly.</p>
                           </item>
      
                           <item>
                              <p>The response indicates success with an authorization number, signed
        by the payment authority.</p>
                           </item>
    
                        </olist>
  
                     </p>
                  </item>
  
                  <item>
                     <p>The travel agent service books the hotel room: 
    <olist>
      
                           <item>
                              <p>The travel agent service requests a description of how to book a
        room to the chosen hotel service.</p>
                           </item>
      
                           <item>
                              <p>The travel agent service sends a request in order to find out how
        to cancel the reservation should a problem occur later in the
      process.</p>
                           </item>
      
                           <item>
                              <p>The travel agent service sends the request accordingly,
        communicating the payment service chosen and the signed authorization
        number from this service.</p>
                           </item>
    
                        </olist>
  
                     </p>
                  </item>
  
                  <item>
                     <p>The travel agent service confirms the flight reservation: 
    <olist>
      
                           <item>
                              <p>The travel agent service requests a description of how to buy a
        ticket on hold to the airline service.</p>
                           </item>
      
                           <item>
                              <p>The travel agent service sends a request in order to find out how
        to cancel the reservation should a problem occur later in the
      process.</p>
                           </item>
      
                           <item>
                              <p>The travel agent service sends the request accordingly,
        communicating the payment service chosen and the signed authorization
        number from this service.</p>
                           </item>
    
                        </olist>
  
                     </p>
                  </item>
  
                  <item>
                     <p>The travel agent service charges a fee to the user: 
    <olist>
      
                           <item>
                              <p>The travel agent service requests a description of how to request
        payment to the payment service.</p>
                           </item>
      
                           <item>
                              <p>The travel agent service sends the request accordingly, along with
        the authorization number signed by the payment service.</p>
                           </item>
    
                        </olist>
  
                     </p>
                  </item>
  
                  <item>
                     <p>The service provides the user with various confirmation numbers and
    wishes the user a good vacation.</p>
                  </item>

               </olist>
            </div3>
            <div3 id="Extensions2">
               <head>Extensions</head>
               <p>If the payment service doesn't confirm the validity of the user's payment
option, the user should be presented with an error.</p>
               <p>If the hotel room cannot be booked, the user should be presented with an
error and should get to choose from an updated list of options.</p>
               <p>If the flight reservation cannot be confirmed, the hotel room reservation
should be canceled and the user should be presented with an error and start
the reservation process again.</p>
            </div3>
            <div3 id="Technologi2">
               <head>Technologies / Requirements</head>
               <p>Service description technology: used by the payment authority to describe
its confirmation service, by the hotel to describe its room booking service,
and by the airline to describe its service to buy tickets by confirming seats
on hold.</p>
               <p>Authentication technology: used by the payment authority to sign the
payment authorization to be trusted by the hotel service, the airline service
and the travel agent service.</p>
               <p>Encryption technology: used by the payment service and the travel agent
service to communicate the user's payment information confidentially.</p>
               <p>Ontologies: the payment confirmation needs to be used in a way meaningful
to the travel service, hotel and airline services; in other words, the output
of one service needs to be used as the input to other services that might use
different vocabularies.</p>
            </div3>
         </div2>
         <div2 id="Notes">
            <head>Notes on the scenario</head>
            <p>This scenario illustrates how a program, the travel agent service, can
interact dynamically with airline services, hotel services, without a priori
knowledge of them or of the way they work. Thanks to the ontologies used, the
program can adapt to variations of formats that an airline service might be
using and adapt to the introduction of new products.</p>
            <p>However, there is a limit to what the travel agent service can understand.
For example, it is likely to be able to understand the introduction of a new
class of tickets, say class Z. However, if the restrictions on class Z
tickets use concepts that it is not aware of (say that class Z tickets can
only be bought more than 60 days in advance and with a valid international
student identification), the developers of the travel agent service will need
to implement the extra logic to make it understand this new type of
restriction, including validating the student identification.</p>
      </div2>
    </div1>
  </body>
  <back>
    <div1 id="ack">
      <head>Acknowledgments</head>
      <p>Thanks to Eric Prud'hommeaux and David Booth for their
	comments, and to Max Froumentin for his help converting the document
	to XML (see <loc href="html2xmlspec.xsl">stylesheet</loc>
	applied on the XHTML version).</p>
    </div1>
  </back>
</spec>