8.3. Solution

The e-mail Windows service takes care of sending e-mails and decouples the process of sending the e-mail from the application. The application should still work if an e-mail fails to send because the e-mail server is down. This section builds the notification functionality that is used for the workflow framework built in the previous chapter. This is done by adding records to the e-mail table when specific events happen during the approval process. For the Paid Time Off application, three types of notifications will be set up. First, the system should notify users when they become the owner of an issue. For example, when a request is submitted and sent to the direct manager, the direct manger should get an e-mail with a link to the item that was just submitted. The system should also notify users anytime an item they submitted changes state. That way, the original submitter will be notified after his or her manager, VP, or HR administrator approves the request.

The system should also allow users to specify that they want to be notified when a request goes to a specific state. For example, if I am the submitter's direct manager and have already approved their request and the submitter then cancels the request, I want to be notified. When a request is cancelled, it does not go back to the direct manager, so there needs to be some way for the direct manager to be notified.

Users should also be allowed to "subscribe" to any of the three notifications. That way, if users ...

Get ASP.NET 3.5 Enterprise Application Development with Visual Studio® 2008: Problem - Design - Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.