thoughts on the GSoC2009 and OpenMRS summer internship Friday, August 14, 2009

Working on a GSoC project was indeed a wonderful experience. To make it more interesting, working as a summer intern at OpenMRS was value added experience. :) (discarding that fact that SL doesnt have any summers. <:o) ).

Starting the project i had so little experience working with the Quartz scheduling framework. Then again this was my first project from scratch. I had to go through all of the software development phases. Well that was a lovely experience. I had a lot of help from OpenMRS developers to complete my project. All helped to test the module and give feedback. without those comments the current schedulerQuartz module wouldn't have come this far. i was lucky enough to have my own Lab machine which helped a lot to test the module and to do Demos.

Justin Miranda, being my mentor was a great benefit to this project. I can remember the hours he spent advising me on how to improve usability. His supervision made the module to have good unique features. I must say that i didnt have any kind of pressure from him while doing this project. (of course we only had less than 3 months to complete it and get it running). you rock!

looking back, OpenMRS is a great place for anyone to do their summer internship for Google Summer of code project. Developers working at OpenMRS knows how to identify your capabilities and only to take what you can give. It has a friendly environment so that a new comer would feel comfortable enough to give his full effort in making a project success.

I would like to thank Justin for supervising my project. And everyone at OpenMRS for helping me to bring the schedulerQuartz to where it is right now.

schedulerQuartz v0.2.0 user guide

QuartzScheduler v0.2.0 User Guide

Table of Contents
1 About QuartzScheduler

2 Module Settings.

3 Using the module

3.1 Module Sections.

3.1.1 Scheduler Manager
3.1.2 Scheduler Details

3.1.3 Scheduler Log

4 Creating a new Task

5 Get details of a created Task and modifying


1 About QuartzScheduler

The quartzScheduler module was create as a Google Summer of Code 2009 Project. It’s a scheduler created to give extensive scheduling features to OpenMRS users. The quartzScheduler uses OpenMRSs core schedulers Task classes to schedule its tasks.

Additional information can be acquired emailing the module creator djmlog103[-at-]gmail.com or contacting the developer list dev[-at-]openmrs.org
2 Module Settings
The quartzScheduler module needs a set of parameters to be passed before users start using the module. These set of parameters of parameters are used to setup mail configurations in order for the module to use its email notifications features. You should save the following set of key,value pairs in your OPENMRS_RUNTIME_PROPERTIES.PROPERTIES file. Please note that the module notification service users only stmp transmission.

Eg:
schedulerquartz.smtphost=smtp.orgmail.com
schedulerquartz.smtpport=465

schedulerquartz.smtpdebug=false
schedulerquartz.smtpusername=yourOrganization@email.com

schedulerquartz.smtppassword=password

schedulerquartz.serverhost=www.organization.org/openmrs


3 Using the module
After loading the quartzScheduler module, a new category named Quartz Scheduler will appear in the Administration section.





Figure 1: Loaded Module


3.1 Module Sections

  • Scheduler Manager : Create, Edit, Delete Tasks.
  • Scheduler Details : Shows information about the Quartz Scheduler.
  • Scheduler Log : A detailed module level log.

3.1.1 Scheduler Manager

This section allows users to Create new Tasks, Edit and Delete existing tasks.











Figure 2: Scheduler Manager page
3.1.2 Scheduler Details
The SchedulerQuartz scheduling module is created using Quartz scheduling Framework. This Section Allows you to see on what configurations the Quartz Scheduler is running on.











Figure 3: Scheduler Details page
3.1.3 Scheduler Log
This section is intended for Task developers. This page contains all the log data produced in the module scope. The Scheduler log page is equipped with a tailing feature which would print latest lines of the log file in the given iteration time. To improve usability the module log is printed in reverse order to avoid scrolling. This means that all the current data from the log will be printed on top of the page.











Figure 4: Scheduler Log page
4 Creating a new Task
Creating a new task is quite simple. Go to the Scheduler Manager page. Click on the Create Task button.




Figure 5: Create a new Task

Clicking Create Task will bring a popup window which allows users to create new Tasks. Creating a new Task in the SchedulerQuartz Modules is so simplified that there is nothing to explain in this guide. A detailed explanation about creating tasks is given in the Create Task page.












Figure 6: Create Task page


5 Get details of a created Task and modifying

To get Additional information of a created task, visit the Scheduler manager page. And click on the Tasks title on which you to view additional information.










Figure 7: click to get additional information

Click on the Tasks title will bring a popup window with a detailed page of that Task. To modify the Task just click the “Edit Task” link show in figure 8.












Figure 8: Detailed info on a Task


Created on: 8/13/09
Author: djmlog103

Last week of google summer of code (2009)

It has come to the last few days of GSoC2009. I couldnt keep up with blogging my work in the past weeks. Here's a list which consist of my weekly progress. (extracted from projects tracking document)

Iteration #1 (Sunday, May 31, 2009)

  • Created new basic module for quartz scheduler
  • Committed quartzscheduler module to the svn repository
  • Made module deployable in OpenMRS 1.5
  • Integrated code and configuration that has already been written into the new module
  • Allow user to schedule a simple hello world task to write a message to the log on some interval

Iteration #2 (Sunday June 7, 2009)

  • Got to know more on how quartz work and its post-schedule(what options does it have after scheduling a job) features.
  • User stories 35-38 (Edit/new Task page)
    • 35. Allow users to enter the task name of the class.
      36. Allow users to enter the description of the schedule.
      37. Allow users to set the priority of the schedule.
      38. Allow users to set the recurrence option for the schedule
      a) Run Once
      b) Seconds
      c) Minutes
      d) Hours
      e) Daily
      f) Weekly
      g) Monthly
      h) Yearly
      i) Cron

Iteration #3 (Sunday June 14, 2009)

  • User stories 8-14 (scheduler Manager page)
    • 8. Allow users to view class name of the class being scheduled.
      a. Allow users to click on the class name and view a full description of it.
      9. Allow users to view the owner of a particular schedule.
      10. Allow users to view the date of which a particular schedule is created.
      11. Allow users to view the date of which a particular schedule is be stopped running.
      12. Allow users to view the priority of a particular schedule.
      13. Allow users to view the status of a particular schedule.
      a. Started
      b. Stopped
      c. Finished
      d. Failed
      14. Allow users to view the next occurrence time of which the scheduler will start executing.
  • User stories (view Task page )
    • Allow user to view the status of a particular schedule (Started, Stopped, Finished, Failed).
    • Allow user to view the next occurrence time of which the scheduler will start executing.
    • Allow user to view the date of which a particular schedule is being stopped running.
    • Allow user to view the status of a particular schedule.
    • Allow user to view the description of the status of a particular schedule.
  • Added more strict validations to the scheduler Form page

Iteration #4 (due Sunday June 21, 2009)

completed implementation of the following pages:
  • Scheduler Manager Page
  • View Task Page
  • Create Task Page
  • QA test on the Create Task page (Bugs Found):
    • RunOnce
    • Seconds
      • when selected the repeat option it always executes one more time than what i put.
    • Minutes
      • Doesnt execute on the given end time. the schedule finished before it.
      • when selected the repeat option it always executes one more time than what i put.
    • Hours
      • when selected the repeat option it always executes one more time than what i put.
  • Implement user stories 15-17
    • Allow users to execute a particular task immediately.
      Allow users to skip the next occurrence of a task from being executed.
      Allow users to delete a particular schedule.
  • Finalize feature list of the 3 pages with Justin.
  • Finish the View Task page completely.
  • Try to integrate openMRS Jobs, replacing the hello world dummy job.
  • Deploy quartz scheduler module to labs

Iteration #5 (due Sunday June 28, 2009)

  • Scheduler Types QA

Iteration #6 (due Sunday July 5, 2009)

  • Fixed scheduling bugs in the TabsForm page.
  • Allow user to restart the scheduler.
  • Allow user to Pause all schedules in the scheduler.
  • Allow user to resume all paused schedules.
  • Allow user to view a particular tasks, number of remaining executions.
  • Allow user to click on the class name and view a full description of it (scheduler manager page).
  • Allow user to view a particular schedules list of execution dates
  • Allow user to view number of jobs in the Scheduler.
  • Allow user to view number of jobs by status (started, finished, failed, stopped).

Iteration #7 (due Sunday July 12, 2009)

  • Followed up with some R&D on how to edit quartz JobDataMap on the fly.
  • Fixed remaining bugs.

Iteration #8 (due Sunday July 19, 2009)

  • Changed DumbJob to TaskWrapper
  • view_tasks.jsp renamed to taskList.jsp
  • tabForms.jsp renamed to taskForm.jsp
  • Added the drop down list. other changes will follow after a UAT
  • Schedule List on the View Task page should be "Next 10 execution times"
  • Added Light Green and red. Green shows started tasks. Red shows paused/stopped tasks
  • The "Run Now" and "Delete" buttons should be on opposite sides. In addition, the "delete" button should be smaller (the "trash" icon) or should be a checkbox, with a Delete Selected button under the table (or in the table footer).
  • Added server time to the create task page.
  • Removed priority from the Create Task and leave that as a detail for the Edit Task page.
  • The Scheduler Manage page should also show the current time so users can compare the current time against all of the tasks that are in the system.
  • Added the scheduler logger page with tailing functionality.
  • Added the base to send notification mail
  • Added the edit task functionality.

Iteration #9 (due Sunday July 26, 2009)

  • Added Notification sending features
  • Added properties functionality
  • minor UI changes

Iteration #10 (due Sunday Aug 2, 2009)

  • added the notification Title after the UI change
  • UI changes (new functionality should stop at this stage)

Iteration #11 (due Sunday Aug 9, 2009)

  • UI
    Renamed Scheduler Manager to Task Manager
    Renamed Scheduler Summary to Scheduler Manager
    ===== Scheduler Manager===========
    Added some spacing between the scheduler Manager buttons
    Added tooltips to Restart/Pause/Resume buttons saying what itll do.

    ===== Scheduler Log ===========
    • Changed "Tail Every" to be "Refresh every" with option (Never, 10 seconds, 30 seconds, 60 seconds)
    • Changed "Get Log Now!" to "Refresh Now"
    • added < style="overflow: auto; height:400px"> ... < /div > around the logging contents so the user sees the whole page and only the logging content is scrollable.


    ===== Task Form ===========
    • Made the dialog box a little wider and taller. Maybe 750 x 550.
    • For the "Often" radio button, add "Every" above the options (like this)
    Every
    ( ) _____ seconds
    ( ) _____ minutes
    ( ) _____ hours
    ( ) _____ days
    ( ) weekday (Monday, Tuesday, Wednesday, Thursday, Friday)

    • Changed the "Start Date" / "Run Time" to be a single line (like "End at")
    Start at [01] [00] [00] [AM] [08/04/2009 ][cal]

    • Moved the server time to the "When do you want to start?" section
    When do you want to start?
    -------------------------------------------------
    The current time on the server is: 01:34:59 PM
    Start at [01] [00] [00] [AM] [08/04/2009 ][cal]

    • Changed "Repeat infinite times" to "Repeat forever"

    Funtionality
    • Added the Edit QuartzTask method
    • mail fix (receive only once)
    • Surrounded the pause/start scheduler with a box
    • Number of lines displayed message in the scheduler log
    • Fixed the Email URL

Iteration #12 (due Sunday Aug 16, 2009)

  • Tooltips made more consistent.
  • resuming a task would work only if the scheduler is in running state
  • Added sorting by title to the scheduler manager datagrid.
  • close button (x) was made consistent in the create task page.
  • made the module user guide.
  • blog and project page update.