Making a Checkout Request
From the CML application's home page, the library user clicks Search for Library Materials to see the Library.asp page. After searching the library database (see Searching for Library Materials), if an interesting title appears, the user can now click it to see more information.
This is the sequence of events that occurs when a user makes a checkout request:
- The library user clicks Request Title to check the item out. This button is presented on the Ddetails.asp page, which appears on the Library.asp page through an #include directive. Clicking this button executes the DoRequest subroutine in Library.asp.
- By setting the src for the ifRequest IFrame, DoRequest invokes Request.asp, passing the bib# of the requested item, which indicates a unique title in the FmLib database.
- In Request.asp, a User object is created, using the CreateObject method of the Server ASP object. The library user's logon name (provided by the UserInfo component) is passed to the User object's UpdateInfoFromExchange method to look up the borrower in the directory of Microsoft Exchange Server. If the user is found there, the request continues; if not, the request is halted and the message "Checkout requests are not allowed" is displayed, with the suggestion that the user contact the library directly.
- If borrower information is found in Microsoft Exchange Server, this information, which includes the user's default location (current office number) is stored in the Session object for use during future library requests in the current session. This design aids performance because these values, stored in memory, are retrieved much more quickly than finding them out-of-process in Microsoft Exchange Server.
- Request.asp displays to the borrower the borrower's location and a text field for optional comments. The borrower can edit these fields before clicking Go, which invokes RequestOK.asp.
- If the borrower has not already made a request for this title, RequestOK.asp calls the MakeRequest method of the User object.
- MakeRequest calls the Enqueue method of the TableQueue object, which calls the stored procedure fm_queue_enqueue to place the request in the queue.
- The MakeRequest method calls the SetComplete method of the MTSEnvironment object to set the enqueuing transaction to complete.