You are on page 1of 43

Leave Management System

A Project Report Submitted By Mahita Adapa M080357CA in partial fulfillment of the requirements for the award of the degree of

Master of Computer Applications


Under the guidance of Mr. Rama Sastry Kodukulla Delivery Manager, HP, Chennai Mr. Srinivasan Pandurangan Project Manager HP,Chennai Mr Sumesh T.A Asst.Professor, CSED NIT Calicut

Department of Computer Science and Engineering

National Institute of Technology Calicut,

Kerala 673601
May 2011

NIT Calicut MCA 2011

Declaration

I hereby declare that this submission is my own work and that, to the best of my knowledge and belief, it contains no material previously published or written by another person nor material which has been accepted for the award of any other degree or diploma of the university or other institute of higher learning, except where due acknowledgment has been made in the text.

Place: NIT, Calicut Date:

Name: Mahita Adapa Signature:

Reg.No.M080357CA

I Mahita Adapa

NIT Calicut MCA 2011

Certificate
This is to certify that the thesis entitled Leave Management System Submitted by Mahita Adapa to the National Institute of Technology Calicut towards partial fulfillment of the award of the Degree of MASTER OF COMPUTER APPLICATIONS is carried out by her under our supervision at Hewlett Packard , Chennai, India.

Signed by the supervisor(s) with name(s) and date

Mr. Rama Sastry Kodukulla Delivery Manager, HP, Chennai

Mr. Srinivasan Pandurangan Project Manager HP, Chennai

Signed by the internal guide(s) with name(s) and date

Mr. Sumesh T.A Asst.Professor, CSED, NIT Calicut.

Place: NIT Calicut Date: Signature of Head of the Department

(Office Seal) II Mahita Adapa

NIT Calicut MCA 2011

Acknowledgement

I take this opportunity to express my sincere gratitude to all individuals, directly or indirectly, who have contributed towards the completion of this thesis.

I am grateful to Hewlett-Packard, Chennai for allowing me to do internship at their office.

I express my sincere thanks to my supervisors, Mr. Rama Sastry Kodukulla and Mr. Srinivasan Pandurangan for their guidance and valuable suggestions throughout this thesis.

I would like to express my sincere gratitude to my project guide Mr.Sumesh T.A, Asst.Professor, CSED, NITC for his guidance, support and cooperation throughout this work.

Lastly, I thank all my friends and classmates for their continuous support and encouragement. If not for the above mentioned people, this thesis would never have been completed successfully. I once again extend my sincere thanks to all of them.

III Mahita Adapa

NIT Calicut MCA 2011

ABSTRACT
The Leave Management System is designed to maintain the leave records of employee and allows the user to apply different kind of leave permissible. The user can use the module for applying leave or as approving authority or as Leave Management System administrator for sanctioning the leave. Through Leave Management System it will be also possible to cancel a leave already applied. All the notifications corresponding to application, approval, rejection of the leaves will be done by the email.

This project is aimed at developing an intranet based online Leave Management System that can be accessed throughout the organization or a specified group/Dept. It will allow the organizations to set up their own leave policies such as public holidays, leave types as well as how the system should work. This system can be used to automate the workflow of leave applications and their approvals. Automatic credit of leaves on a periodic basis & at the end of year and leave balance updating process will be automated .It will include features like email notifications, cancellation of leave, approval of leave, cancellation of leave after its approval and report generation based on weekly ,monthly and yearly basis. The system will also keep track of all employees leave records,leave balances etc.

IV Mahita Adapa

NIT Calicut MCA 2011

TABLE OF CONTENTS
1. Introduction 1.1. Problem Definition 1.2. Background 1.2.1. Capturing Leave 1.2.2. Approval Workflow 1.2.3. Notifications 1.2.4. Report Generation 1.3. Motivation 1.4. System Requirements 2. Requirement Analysis 3. Design 3.1. Flow chart design 3.2. Screen Design 3.3. Database Design 4. Implementation 4.1. Creating Web Application Project 4.2. Creating GWT Module 4.3. Remote Procedure Call 4.4. SMTP 4.5. Screen Shots 4.6. Testing 4.7. Integration 4.8. Integration Testing 4.8.1. Performance Time Testing 4.8.2. Specification Testing 5. Conclusion 6. Bibliography 1 1 1 2 2 2 2 3 3 4 5 5 6 8 11 11 12 13 14 16 33 34 34 34 34 35 36

V Mahita Adapa

NIT Calicut MCA 2011

List of Tables & Figures


Table 2.1 Requirements Fig 3.1 Lms workflow diagram Fig 3.2.1 Use Case Diagram Fig 3.2.2 ER Diagram Table 4.6.1 Test Cases 4 5 6 7 33

VI Mahita Adapa

NIT Calicut MCA 2011

Chapter 1

Introduction

1.1 Problem Definition

Problem statement: A robust web application is required for the management of the process involving applying of leaves based on the type of leave, approval of the leave(s), checking availability of the leaves, sending notifications by email, tracking and generating reports thereafter.

My Module: Capture the Leave and Notifications in Leave Management System. Definition: Capture leaves based on their types, for example Sick leave, casual leave, annual leave, travel leave, maternity leave, compensatory leave, special leave. Mailer should be sent an email at each level for status updates involving the leave applied notification, leave approval/rejection notification.

1.2 Background LMS is a web-based leave management system where an employee can apply for a leave. The system will also keep track of all employees leave records, leave balances. User is able to view their leave balance and according to that employee can apply for a leave and notification of leave approval/rejection from their manager. The function of this system is to simplify leave application through online, to improve the mechanism of receiving, approving and rejecting leave application, to generate report of employees in order to be use in evaluating the performance of an employee.

1 Mahita Adapa

NIT Calicut MCA 2011 1.2.1 Capturing leaves After logging into the system employee can check the leave balance, according to that he/she can apply for a leave. Capturing leaves will be based on their types, for example sick leave, casual leave, annual leave, maternity leave, adaption leave, compensatory leave, special leave, travel leave, paternity leave. This module is done by me(Mahita Adapa) and Avnish Singh Chouhan.

1.2.2 Approval workflow The leave applied should pass through more than one level of approvals if needed based on the type of leave applied. The leave application will be sent to his/her corresponding supervisor. Then supervisor will forward to the project manager. The approval can be from one level to two levels at max. This module is done by Avnish Singh Chouhan.

1.2.3 Notifications The leave application which is sent by an employee will be forward to corresponding manager. The approval/rejection of leave application will be sent to employee via email automatically. Through Leave Management System it will be also possible to cancel a leave already applied . All the application, approval, rejection of the leaves will be done by the email.This module is done by me(Mahita Adapa).

1.2.4 Report generation In report generation we can see various kinds of reports which can be viewed by an employee as well his manager. For example report on leave history for an employee will give him the details of all the leave taken by him since he/she joined the company. Displaying monthly leave calendar, date wise report of leaves application to be viewed by manager/admin for staffs performance, approval history etc. This module is done by Harsh Gaurav Mishra.

2 Mahita Adapa

NIT Calicut MCA 2011

1.3 Motivation
The project work has benefits to both the company and the student. They can be summarized as follows. Companys perspective: Efficiently organization can use the LMS system. Easily employee can keep track of his/her records and it will decrease the paper work. Reduction in HR intervention

Student perspective: Learn the steps which are involved in during the project . Chance to work on Eclipse. Hands-on working experience in an Enterprise portal .

1.4 System requirements

To develop Leave Management System, it must meet the following requirements.

Hardware requirements: CPU:Intel compatible 450Hz or higher Memory: 512MB or higher RAM

Software requirements: Software :Eclipse (Java IDE) Database :Oracle 10g Technology: Java/J2EE OS: Windows Xp 3 Mahita Adapa

NIT Calicut MCA 2011

Chapter 2

Requirement Analysis

Requirements analysis is critical to the success of a development project. we analyzed the requirements that are needed for the project .

Table 2.1 Requirements:

Functional Req. # Requirements


Login Requirements Check the leave balance Apply for leave 1.0

Description
An authorized employee should be able to Login to the system Change the password An employee can check how many days of leave he/she is eligible for etc. An employee can apply for a leave specifying the from and to dates and reason for taking leave. Withdraw his/her leave application which has not been approved yet. A manager can approve /reject a leave application of his subordinates. An employee can check the status of leave application whether it has been approved/rejected/pending. An employee can see the history of his/her leave taken for the maximum period of 2-3 years. After login to the system employee should be displayed their corresponding views based on his/her role. As soon as a leave application/withdrawal/approval/rejection/passwordchange is made by an employee ,an automatic confirmation should be sent to the employee and to his manager. A manager can see weekly/monthly/yearly leave details of his/her subordinates. Administrator can cancel the leave application which is approved by the manager. 4 Mahita Adapa

1.1 1.2

Approve/reject a leave Check status of leave application History Requirements Default display setting requirements Notifications

1.3 1.4 1.5 1.6

1.7

Report generation Cancellation of approved leave

1.8 1.9

NIT Calicut MCA 2011

Chapter 3

Design

3.1 Flow chart Design

A flowchart is ideal for a process that has sequential process steps. The steps will be executed in a simple order that may change as the result of some simple decisions.

Fig 3.1 LMS Workflow Diagram 5 Mahita Adapa

NIT Calicut MCA 2011 3.2 Screen design Detailed screen design follows makes clients sites efficient and easy to navigate between pages. In this phase, we need to plan how each page should appear in the system. It should be understandable by client and in this phase we have to decide what should appear in every page, what should not keep in page because software (web application) should not take too much time to load certain page. And this screen design will be given to client before we start developing a project and ask them any changes are required in the screen design. According to that the screen chart will be designed. 3.2.1 Use case diagram

Fig 3.2.1 Use Case Diagram 6 Mahita Adapa

NIT Calicut MCA 2011 3.2.2 ER Diagram

Fig 3.2.2 ER Diagram 7 Mahita Adapa

NIT Calicut MCA 2011 3.3 Database Design Login table:

Field Data Type Username(Employee Number Id) Password Security Question Answer Varchar2(10) Varchar2(50) Varchar2(30)

Null (Y/N) N

Description This field gives the username of an employee. This field gives the Password of an employee. This field is for security purpose. This field is for security purpose.

N N N

Employee Table

Field Employee Id

Data Type Number

Null (Y/N) N

Description This field identifies an employee uniquely. This field gives the first name of an employee. This field gives the middle name of an employee. This field gives the last name of an employee. It gives the gender of an employee. It gives the age of an employee. This field related to address of an employee. This field related to address of an employee. This field related to address of an employee. It gives the postal code of an employee. This field gives the email id of an employee. This field gives the contact number of an employee.

First name Middle name Last name Gender Date of birth Street City State Postal code Email Id Phone number

Char(20) Char(20) Char(20) Char(6) Date Varchar2(25) Varchar2(25) Varchar2(20) Number Varchar2(25) Number

N Y Y N N Y N N Y N Y 8

Mahita Adapa

NIT Calicut MCA 2011 Date of joining Date N This field gives when the employee joined in the organization. It gives the type of an employee(for ex :contract based, permanent etc) This field gives the designation of an employee. It shows the salary of an employee. It gives the working location of an employee. It gives the job location of an employee. This field gives how many hours the employee is working. It gives who is the manager for employee.

Resource Type

Varchar2(15)

Level Salary Current location

Varchar2(5) Number Varchar2(20)

N N N

Base location

Varchar2(20)

Working hours

Number

Manager Id

Number

Leave Applied Table:

Field Employee Id Leave Id Type of leave

Data Type Number Number Varchar2(25)

Null (Y/N) N N N

Start Date End date Duration

Date Date Number

N N N

Reason Manager Id

Varchar2(100) Number

N N

Description It gives the identification number of an employee. It gives the identification number of a leave. This field gives name of leave type (for ex: annual leave, sick leave etc). It gives when the employee will take leave. It gives upto which date an employee will take leave. It gives how many days the employee is applying for a leave. This field gives the reason for taking leave. This field tells about the corresponding manager to an employee. Mahita Adapa

NIT Calicut MCA 2011 Leave Balance Table: Field Employee Id Sick Leave Travel Leave Annual Leave Casual Leave Maternity Leave Paternity Leave Adaption Leave Compensatory Leave Special Leave Data Type Number Number Number Number Number Number Number Number Number Number Null (Y/N) N N N N N N N N N N

Leave Table: Field Leave Id Leave Type Data Type Number Varchar2(20) Null (Y/N) N N Description It gives the identification number of a leave. This field gives name of leave type (for ex: annual leave, sick leave etc). It gives how many days the employee is applying for a leave. This field determines the eligibility criteria of leave Additional information about the Leave.

Duration

Number

Employee Level Description

Varchar2(5) Varchar2(100)

N Y

10 Mahita Adapa

NIT Calicut MCA 2011

Chapter 4

Implementation

The Google Web Toolkit (GWT) is a toolkit to develop Ajax web application with Java. Once the Java code is finished, the GWT compiler translates the Java code into HTML and JavaScript. The compiler creates browser specific HTML and JavaScript to support all the major browsers correctly. GWT supports a standard set of UI widgets.

4.1 Creating web application project:

After creating web application project we need to create new GWT module for this project.

11 Mahita Adapa

NIT Calicut MCA 2011

4.2 Creating GWT Module:

GWT applications are described by modules. A module with modulename is described by a configuration file "ImageViewer.gwt.xml". Each module can define one or more Entry point classes. An entry point in GWT is the starting point for a GWT application similar to the main method in a standard Java program.

12 Mahita Adapa

NIT Calicut MCA 2011

4.3 RPC(Remote Procedure Call): In order to define RPC interface, we need to define the following classes and interfaces:

Service: It is service definition interface. It defines the methods in service and extends the RemoteService marker interface that indicates that this is a GWT RPC service. This is the synchronous definition and the server-side class must implement this Service interface.

Sample Code for Service.java:

package com.mycompany.project.client; import java.sql.ResultSet; import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; import com.mycompany.project.client.myexception;

@RemoteServiceRelativePath("ImageViewer")

public interface Service extends RemoteService { public String send_details(String username,String password) throws myexception; }

ServiceAsync: It must have the same methods as the synchronous interface i.e Service, and in this interface each method will include an AsyncCallback object as a parameter and the methods will not return anything.

13 Mahita Adapa

NIT Calicut MCA 2011

Sample Code for ServiceAsync: package com.mycompany.project.client;

import java.sql.ResultSet; import com.google.gwt.user.client.rpc.AsyncCallback; import com.mycompany.project.client.myexception;

public interface ServiceAsync { public void send_details(String username, String password, AsyncCallback<String> callback) throws myexception; }

Service

Impl:

This

is

the

server-side

implementation

of

service.

This

must

extend

RemoteServiceServlet and implement the synchronous interface i.e.Service.In this class ,all the methods should be implemented which are listed in Service interface. From this class ,objects will be returned to client side class.

4.4 SMTP SMTP is a text-based protocol, in which a mail sender communicates with a mail receiver by issuing command strings and supplying necessary data over a reliable ordered data stream channel, typically a Transmission Control Protocol (TCP) connection. An SMTP session consists of commands originated by an SMTP client (the initiating agent, sender, or transmitter) and corresponding responses from the SMTP server (the listening agent, or receiver) so that the session is opened, and session parameters are exchanged. A session may include zero or more SMTP transactions. An SMTP transaction consists of three command/reply sequences .

14 Mahita Adapa

NIT Calicut MCA 2011

They are: MAIL command :This is the address for bounce messages.

RCPT command :This is to establish a recipient of this message. This command can be issued multiple times, one for each recipient.

DATA :This is to send the message text. This is the content of the message. It consists of a message header and a message body separated by an empty line. DATA is actually a group of commands, and the server replies twice: once to the DATA command proper, to acknowledge that it is ready to receive the text, and the second time after the end-of-data sequence, to either accept or reject the entire message.

15 Mahita Adapa

NIT Calicut MCA 2011

4.5 Screen Shots

Login Page:

This screen allows all the employees to enter their username and password to enter into the main page.

16 Mahita Adapa

NIT Calicut MCA 2011

Register Page: This screen allows the employee to register for leave management system.

17 Mahita Adapa

NIT Calicut MCA 2011

Access Denied: This screen shows that employee id is invalid.

18 Mahita Adapa

NIT Calicut MCA 2011

Forgot Password:

19 Mahita Adapa

NIT Calicut MCA 2011

Main page:

This screen allows the employees to see the leave balance for each type of leave and according to that he/she can apply for a leave.

20 Mahita Adapa

NIT Calicut MCA 2011

Leave applying:

This screen allows the employee to apply for a leave and enter the leave type,the start date,end date,duration of the leave and reason for taking leave.The notification regarding the leave request will be sent to corresponding person.

21 Mahita Adapa

NIT Calicut MCA 2011 Configuring SMTP server:

22 Mahita Adapa

NIT Calicut MCA 2011 Notification regarding applying leave:

23 Mahita Adapa

NIT Calicut MCA 2011 Cancel Leave: This screen allows the employee to cancel a leave.

24 Mahita Adapa

NIT Calicut MCA 2011

Selecting for cancellation: This screen allows the employee to cancel the applied leave which is not approved by his/her manager.

25 Mahita Adapa

NIT Calicut MCA 2011

Notification regarding cancellation:

26 Mahita Adapa

NIT Calicut MCA 2011

List of leave: This screen allows the employee to see the leave requests which is applied by an employee and status of leave request.

27 Mahita Adapa

NIT Calicut MCA 2011

Change Password: This screen allows the employee to change his/her password .The notification regarding the password change will be sent to employee.

28 Mahita Adapa

NIT Calicut MCA 2011

Notification:

29 Mahita Adapa

NIT Calicut MCA 2011

Cancelling leave:

The manager can cancel the leave applied by an employee. Once it has been approved by manager then only administrator can cancel particular leave. The notification regarding the cancellation of leave request will be sent to employee.

30 Mahita Adapa

NIT Calicut MCA 2011

Approval/Rejection of leave:

31 Mahita Adapa

NIT Calicut MCA 2011

Notification regarding rejection of leave:

32 Mahita Adapa

NIT Calicut MCA 2011 4.6 Testing This is the first and the most important level of testing.In this phase ,we will write some test cases and run these test cases on web application so that we will fix all bugs in web application . P- Expected and observed behaviors are same. F - Expected and observed behavior are different. This is classified as a defect. Table 4.6.1 Test Cases: <Test Case ID>: Test Case Description S. No . Data Input Expected Behavior Observed Behavior * Run 1 Run 2 Run 3

(P/F) 1. Enter the correct Login P username and successful and password and user would be click OK navigated to the main page Enter the invalid Username and F username and password does password and not match click OK Enter characters Datatype in Employee id Mismatch field F

(P/F ) P

(P/F ) P

2.

3.

4.

Should not F Enter START accept the DATE greater value for the than END DATE particular field Should not F invalid accept the value for the particular field

5. Enter email id

33 Mahita Adapa

NIT Calicut MCA 2011 6. Enter phone field 7. Should not F text in accept the number value for the particular field F P

Should not F Enter Text in the accept the Working hours value for the field particular field

4.7 Integration Leave Management System project is done by three members. It has been divided into 3 modules and each module is done by separately .In this phase, we combined all modules.

4.8 Integration Testing

In this phase, we tested entire application. It has been done by three members. In this phase we fixed all bugs in entire application, if any bugs were found while doing testing process then we fixed that bug and again we did the testing. We did same process until all bugs are fixed in web application.

4.8.1 Performance Time Testing Performance time testing is done to determine how long it takes to accept and respond, the total time for processing when it has to handle quite a large number of records. It is essential to check the exception speed of the system that runs well with only a handful of test transactions might be slow when fully loaded. So testing is done by providing large number of data for project. 4.8.2 Specification Testing Specification testing is done to check if the program does what it should do and how it should behave under various condition or combination and submitted for processing in the system and it is checked if any overlaps occur during the processing.

34 Mahita Adapa

NIT Calicut MCA 2011

Conclusion

A web application for Leave Management System is designed to maintain the leave records of employee and allows the employee to check his/her leave balance and allows the employee to apply different kinds of leave permissible. Through Leave Management System it will be possible that employee can cancel a leave and the corresponding notification will be sent. Through this system employee can check the status of the leave application which is requested by him/her.

All the notifications corresponding to application, approval, rejection of the leaves are done by the email. The system keeps track of information about employee leave records and leave balances.

35 Mahita Adapa

NIT Calicut MCA 2011

Bibliography
The following are the references and resources used till now
Books [1] .John Hunt & Chris Loftus Guide to Java/j2ee [2]. Richard Monson-Haefel J2EE Publisher :Springer; 1st Edition, June 24, 2003.

Web Services

Publisher : Addison-Wesley ,October 30, 2003

URL links [1] http://hpedia.hp.com/wiki/Duet accessed on 22/2/2011 [2] http://code.google.com/webtoolkit/gettingstarted.html accessed on 3/3/2011

[3] www.javapassion.com/ajax/GWT.pdf accessed on 8/3/2011 [4] http://www.ajaxmatters.com/2006/05/introduction-to-gwt-remote-procedure-calls-rpc-with-exampleapplication accessed on 14/3/2011 [5] http://download.oracle.com/docs/cd/.../db.../gettingStarted.html accessed on 18/3/2011 [6]http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.datatools.connectivity.doc.user/projects /dtp/dtp/en/source/t_creating_a_database_connection_profile.html accessed on 18/3/2011 [7]http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/e4cf06f5-9a36474b-ba78-3f287a2b88f2.mspx?mfr=true accessed on 11/4/2011 [8]http://groups.google.com/group/google-web-toolkit/browse_thread/thread/a487f64d27eb7dbf accessed on 14/4/2011

36 Mahita Adapa