FOSSology Project Logo FOSSology
Advancing open source analysis and development
 

E-mail Notification Design

Problem

Discovering licenses, or any other FOSSology analysis, is usually done as a set of background processes managed by the scheduler. Because of this, there needs to be a way of notifying users when their job is done. Continually checking the jobs display does not meet this need today.

Proposal

Allow the user to update their user record to request email notification when their job is done. If more control is necessary, a future enhancement could allow the user to override this when they queue a job. Other potential future enhancements could include a supplementary list of addresses to notify, and added information in the email notice.

The email notification functionality will be implemented by an email agent that runs after all the other tasks for the whole job. By “whole job” I'm referring to all the tasks that make up the users request (which may be multiple entries to the job table).

The agent will be called by the UI or the CLI.

The notification agent will be called the users' profile indicates that email notification was desired.

Email Notification Agent Assumptions

  • The email notification agent will use the email mail transfer agent configured on the system.
  • The email agent will use the php function mail. If there is no error, the email agent will assume the mail was successfully accepted for delivery.
  • If an error is returned upon sending a message, the agent will indicated that the e-mail did not get sent.
  • The agent will not verify the correctness of the email address.

Issue

  • If a task in the queue fails, the email notification agent will not run. We need to modify the scheduler to allow dependent tasks the option of running at the completion of a task. Today the dependent tasks only run on the successful completion of a task.

Code and Data Base Impacts

UI Pages Impacted

The following UI pages will be changed by the email functionality.

  • enhance user pages to include email notification checkbox, and optional list of email addresses.
    • Page: user_add, Code: user-add.php
    • Page: user_edit_any, Code: user-edit-any.php
    • Page: user_edit_self, Code: user_edit_self.php
  • Upload pages, add a check box and an area for additional email addresses.
    • Page: upload_file, Code: upload-file.php
    • Page: upload_srv_files, Code: upload-srv-files.php
    • Page: upload_url, Code: upload-url.php

Using stored session data, a smart detection of a users' profile can be accomplished. If their profile requests email notification, the box will be checked and any additional email addresses specified in the profile will be supplied automatically.

Other UI modules Impacted

  • core-auth.php will be changed to record the users email notification preference in the session, as well as store the list of any additional email addresses in the data base.
  • common-agents.php: add new functions to check the users notifiation preference and to schedule the jobs to for email notification.

Other Impacts

The following code will also need to change to support this functionality.

  • mkschedconf.c to configure the email agent into the scheduler file.

The following Data Base changes will be needed to support email notification:

  • job table modification: change column job_submitter from text to the user_pk(int).
  • add column email_notif to users table, value of varchar(1) default is 'y', (user wants email notification).
 
task/e-mail_notification.txt · Last modified: 2009/02/25 14:28 by markd

Copyright (C) 2007-2009 Hewlett-Packard Development Company, L.P.
FOSSology Project documentation is licensed under the GNU Free Documentation License Version 1.2
Recent changes RSS feed Valid XHTML 1.0 Valid CSS3 Driven by DokuWiki