Working with Microsoft Outlook

In several ways, LitCrit's business logic supports actions at the user interface of the Outlook form. Because this logic is on the client computer, one could argue that it exists on the user-services tier, not the business-services tier. The BackOffice® Developer's Guide takes the position that — regardless of its physical location — this is business logic because it enforces business rules. For example, though logic in a client-side COM component may support the choice of elements to display to the user, it does not actually construct those elements' windows.

The business-services elements of the LitCrit application operate with Microsoft Outlook to support the following decisions and actions:

Decide Whether to Operate Together with CML

As the Microsoft Outlook form is opened, business logic in the form determines these things:

When an Outlook user opens the LitCrit form, this information is read from a property on the ASP Application object that resides in memory on the Web server. For more information, see Business Logic in the Outlook Form.

Display Initial Dialog Boxes and Search the Database

Business logic in the Microsoft Outlook form displays the Add Critique to Library dialog box and processes the user input it requests, which in turn determines whether the Choose Title dialog box is shown. For information on the roles these dialog boxes play, see Adding a New Critique in Outlook and Using the Find Library Title Dialog Box.

Business logic in client-side COM objects displays the Choose Title dialog box, searches the FmLib SQL Server database for titles of library items, displays the results of this search, and then processes subsequent user choices. For more information, see CML/LitCrit Client-Side Objects.

Route the Critique to the Administrator

An administrator can, using an application setting (see Application Settings Screen, Storing and Using Application Settings, and Modifying the Settings Table), make approval of critiques mandatory. In this case, the business logic processed by the Exchange Server Event Service sends newly posted critiques to the administrator for approval. Then, critiques — whether approved or rejected — are sent to their proper destinations: posted to the public folder or returned to the submitter. For more information, see Using the Exchange Event Service.

Write to the FmLib SQL Server Database

The CML/LitCrit application needs to track all critique submissions so that it can prevent submission of duplicate critiques by the same library user. (Re-editing an already approved critique is allowed, however.) For this reason, when a critique is submitted, a record of it is created in the FmLib database. This task is performed by script that runs as a result of an event on the public folder. The use of this folder event is described in Using the Exchange Event Service.

Send Invitations to Write Critiques

Business logic also sends mail from the library to borrowers requesting that they critique a just-returned item. Attached to this mail is the correct Microsoft Outlook form. This is done through a trigger in the SQL Server database that calls an extended stored procedure to send SQL Mail. See Modifying the Fm_admin_checkin Procedure under Adding CML/LitCrit Stored Procedures.