Beruflich Dokumente
Kultur Dokumente
Antonis Meliou Supervisor: Dr Sandra Sampaio Third Year Project COMP30030 School of Computer Science University of Manchester May - 2011
Abstract
Project Title: Design and Implementation of a Web Service Application for HRM Student: Antonis Meliou Supervisor: Dr Sandra Sampaio Date: May 2011 Human Resource Management is a fast evolving discipline playing an important role in an organisations performance. Todays organizations need to adapt to the changing environment and meet their employees needs and are therefore embracing human resource management in their everyday processes. [2] The objective of this project is to create a handy web tool for the manager of a small or medium sized firm to keep control and manage the employees of the firm and provide support in carrying out the main and vital human resource practices. This report is created to provide a detailed explanation of the project life cycle, from the basic ideas of the project to the full design and implementation.
Acknowledgement
I would like to take the opportunity to thank my supervisor Dr Sandra Sampaio for all the time, support and effort she has devoted in this project and for the great communication we had throughout the year. I would also like to thank my family for all their love and support and all my friends in Manchester and Cyprus that stood beside me whenever I needed them.
Table of contents
Abstract ......................................................................................................................... 2 Acknowledgement ........................................................................................................ 2 Chapter 1: Introduction .............................................................................................. 5 1.1 Motivation & Problem statement ................................................................... 5 1.2 Project Objective ............................................................................................ 5 1.3 Project Scope ................................................................................................. 5 1.4 Report Overview ............................................................................................ 6 Chapter 2: Background and literature survey .......................................................... 7 2.1 Web Services ....................................................................................................... 7 2.1.1 Introduction to web services ......................................................................... 7 2.1.2 Web services advantages and limitations ..................................................... 7 2.1.3 Web services Technologies [3] ..................................................................... 8 2.2 JSF........................................................................................................................ 9 2.2.1 What is JSF? ................................................................................................. 9 2.2.2 JSF elements ................................................................................................. 9 2.3 Human Resource Management (HRM) ............................................................. 10 2.3.1 HRM Definition and applications ............................................................... 10 2.3.2 The need for HRM ...................................................................................... 10 2.3.3 Web services in HRM ................................................................................. 10 Chapter 3: Design ...................................................................................................... 11 3.1 Use cases ............................................................................................................ 11 3.1.1 Login/Logout Use Case Diagram ............................................................... 11 3.1.2 Manage Employees Use Case Diagram ...................................................... 12 3.1.3 Manage Projects Use case Diagram ............................................................ 13 3.1.4 Manage Training Use case Diagram ........................................................... 14 3.1.5 Manage Leaves Use case Diagram ............................................................. 15 3.2 Requirements ..................................................................................................... 16 3.2.1 Functional Requirements ............................................................................ 16 3.2.2 Non-Functional Requirements .................................................................... 17 3.3 Data Flow Diagrams .......................................................................................... 17 3.3.1 Login DFD .................................................................................................. 18 3.3.2 View Profile DFD ....................................................................................... 18 3.3.3 Add Employee DFD ................................................................................... 19 3.3.4 Find Employees DFD ................................................................................. 20 3.3.5 Edit Employee DFD .................................................................................... 20 3.3.5.1 Dismiss Employee DFD .......................................................................... 21 3.3.6 Monitor Performance DFD ......................................................................... 21 3.3.7 Create Project DFD ..................................................................................... 22 3.3.8 Add Training DFD ...................................................................................... 22 3.3.9 Add Leave/Absence DFD ........................................................................... 23 3.3.10 Cancel Leave DFD .................................................................................... 24 3.3.11 View Remaining Holidays DFD ............................................................... 25 3.4 Software Development....................................................................................... 25 3.5 Database Design................................................................................................. 26 3.5.1 Database tables/relations analysis ............................................................... 27 3.6 System Architecture ........................................................................................... 28 3.7 Website architecture design ............................................................................... 29 3.8 Website (web client) design ............................................................................... 30 3
3.9 Summary ............................................................................................................ 30 Chapter 4: Implementation ....................................................................................... 31 4.1 Tools and Technologies ..................................................................................... 31 4.1.1 Netbeans 6.9 ................................................................................................ 31 4.1.2 MySQL server ............................................................................................. 31 4.1.3 SQL Structured Query Language............................................................. 31 4.1.4 Java Server Faces (JSF) .............................................................................. 31 4.1.5 XML............................................................................................................ 32 4.1.6 Java ............................................................................................................. 32 4.1.7 JavaScript .................................................................................................... 32 4.2 Database Implementation................................................................................... 32 4.3 Web Service Implementation ............................................................................. 34 4.3.1 DBConnect .................................................................................................. 34 4.3.2 Login ........................................................................................................... 36 4.3.3 Web Service operations .............................................................................. 38 4.4 Web Client Implementation ............................................................................... 40 4.4.1 Web client and & Web Service integration and communication ................ 40 4.4.2 Create Profile .............................................................................................. 42 4.4.3 JavaScript .................................................................................................... 44 4.4.4 Web application navigation ........................................................................ 45 Chapter 5: Results...................................................................................................... 46 5.1 System Walkthrough .......................................................................................... 46 Chapter 6: Testing and Evaluation .......................................................................... 65 6.1 Validations ......................................................................................................... 65 6.2 System Testing ................................................................................................... 67 6.2.1 Code Testing ............................................................................................... 68 6.2.2 Black Box Testing....................................................................................... 68 6.2.3 White box testing ........................................................................................ 72 6.2.4 User acceptance .......................................................................................... 72 6.3 Evaluation .......................................................................................................... 73 6.3.1 Strengths ..................................................................................................... 73 6.3.2 Limitations .................................................................................................. 73 Chapter 7: Conclusions ............................................................................................. 74 7.1 Initial Requirements vs. Project Achievements ................................................. 74 7.2 Future Development........................................................................................... 75 7.3 Personal Experience ........................................................................................... 75 References ................................................................................................................... 77 Appendix A Project Plan ........................................................................................ 78
Chapter 1: Introduction
1.1 Motivation & Problem statement
Human resource management is still in the emergence and has not yet fully reached many small and medium sized firms, due to the lack of knowledge and also the great costs that such an attempt would entail. Most medium and small sizes companies usually buy ready made or web based HRM support software. The former could be very general and not firm specific and while developing specific software for a firm would be very expensive and the latter. Both standalone and web application software are not flexible and need often improvements when changes in the strategy or the HRM practices of the firm occur, or when regulations change. [1] Service orientation solutions are becoming widely spread and very popular in various business areas. The ease of reusability, the technologies involved and the interoperable characteristics of web services together with the flexibility of making changes at any point without interrupting the normal use of the software using the web service are some of the reasons that make web services popular and why this application is being implemented using a web service to provide solutions to small and medium firms when dealing with HRM practices and managing efficiently their employees. [3]
e-HRM will be offering a number of different options to its users: Data storage, where employee information will be stored together with additional information (Holiday, Training, Leaves, Projects) Data manipulation. Users can add, edit and delete information
A user will be able to query the data and apply filters to get specific reports. For example if a promotion or an empty position needs to be filled the user can search the database for the employees that have undertaken the appropriate training to be placed on the job Reports will be provided. General staff report, holidays report, performance report are some of the reports that will be supporting the manager his job. General support will be provided. For example the system will warn the user in the case of an employee asking for holiday leave when he/she has exceeded his/her holiday allowance.
UDDI (Universal Description, Discovery and Integration) The UDDI is a registry/repository where businesses can publish the web services they offer and interested users can find web services to use. Contact information of the business providing the service together with a URL of the WSDL file are registered for each service and can be used by interested users.
2.2 JSF
There is the need for the implementation of a client of the web service in order to be able to make use of the services features in the best possible way. After some research about the various technologies available for the implementation of the web client that will be using the web service it was decided that JSF (Java Server Faces) will be used. In this section the reasons for this choice are explained together with the various advantages and limitations there are when using JSF for implementing the web client.
10
Chapter 3: Design
. This chapter is intended to give a detailed explanation of the design process that was used throughout this project. The requirements of the new system, the database design, the application and website design and how the technologies will be used to create the application are the main parts that will be covered in this chapter.
e-HRM
11
e-HRM
Use cases description Use Case Name View Profile Use Case Description View the profile of an employee. The user has to enter the ID number of the employee and the profile is presented on screen Add a new employee in the system when a new employee is hired. The details entered will be validated and stored in the DB Searching for a specific employee or for more than one employees matching some specified criteria. Edit the details of an employee. The user will be able to update the details, dismiss or remove the employee. Participating Actors User
Add Employee
User
Find Employees
User
Edit/Remove Employees
User
12
View the average performance of individual employees or produce a report with the performance for all employees. View the details of employees that have left the company. Limited data will be held in the database according to UK data protection regulations.
User
User
Use cases description Use Case Name Create Project Use Case Description Create a new project. The user will enter the project details which will be validated and stored in the DB. Search for a specific project or for a list of projects matching some specified criteria. Edit the details of a project. The user will have the options to update the details or cancel a project Participating Actors User
User User
13
Use cases description Use Case Name Add Training View Training Data Edit/Remove Training Data Use Case Description Add a new training session for an employee. The user will enter the training details. Search for the training sessions that match some specified criteria the user enters. Edit the details of a training session. The user will have the options to update the details or cancel training. Participating Actors User User User
14
Use Case Description Add a new leave/absence an employee. The user will enter the leave details which will be stored in the DB. Search for the details of a specific leave/absence matching some user specified criteria. Edit the details of a leave. The user will have the options for updating or cancelling the leave.
User
User
15
3.2 Requirements
In order for a system to be fully functional there is the need for complete and up to date requirements to be gathered. The use cases presented above are one of the most important sources were requirements were extracted. The systems functional and non-functional requirements are presented and explained below.
1 2 3 4 5 6 7
8 9
10
Requirement The system must have a log-in/log-out feature The system must allow the user to add, update or delete employee details The system must allow the user to dismiss an employee and save him in a temporary location The system must allow the user to add, update or cancel a project details The system must allow the user to add, update or delete the details of a training session undertaken by employees The system must allow the user to add, update or cancel absences/leaves requested by employees and granted by the manager The system must allow the user to browse employees, projects, training sessions and leaves/absences using keywords and different search criteria and sorting requirements The system must allow the user to browse projects, employees, training details and absence/leaves using keywords, different search criteria and sorting criteria The system must automatically allocate a predefined number for holidays for each new employee according to his position and reset this number for all employees at a specified date every year. The system must to calculate and present the average performance for each employee based his/her project scores.
16
1 2 3 4 5 6 7
Process number
System Process
Process Name
Data store
External entities
17
HRM DB
HRM DB
To create the profile for an employee first the employee ID is checked. If the ID belongs to an employee in the database then the profile is created dynamically and presented to the user.
18
User
3.0
HRM DB
HRM DB
Valid details
When adding a new employee the details are validated by the system. If the ID does not exist then the rest of the details are validated and any errors are reported to the user for correction. If the details are valid then the new employee is created and stored in the DB.
19
HRM DB Valid details 4.0 Find Employee Employee Exists Show details
User
When searching for employees the user enters the search keywords and criteria which will be used by the system to perform the search.
User
HRM DB
When the user wants to edit (update, dismiss, remove) an employee the first step is to search and find that employee if he/she exists. The user can then update the details of an employee, dismiss an employee (Figure 12) when an employee is fired or left the company or remove completely an employee from the database.
20
HRM DB
When an employee is to be dismissed, the system first will save his/her details in a temporary table where limited details for all old employees are kept and then the details for that employee are removed from the main employees table.
HRM DB
HRM DB
Display performance
For the case of viewing the performance for employees the user will have two options. The first option is to view the average performance achieved in projects by an individual employee and the second is to view the average performance for all employees together in a list.
21
User
When creating a new project the user has to enter the details of the new project and after validated a new record is created in the DB.
User
When adding a new training for an employee the user has to enter the details of the new training such as the employee ID, the course name and year and the course status.
22
User
16
HRM DB HRM DB
Employee exists
Valid details
Employee Does not exist Invalid or overlapping leave details 16.4 Update Holidays left 16.3 Add leave
HRM DB
Leave is a holiday
HRM DB
23
HRM DB
User
Invalid details
18.3 Update (Increment) Holidays Left HRM DB Figure 18 - Cancel Leave DFD
24
HRM DB
HRM DB
25
The diagram above is the design of the HRM database showing the relations and the relationships between them. The tables in the next page explain the idea behind all the relations and relationships
26
Employee absence
Employee Training
HolidaysLeft
Project
Project Force
Old Employee
Promotion History
WS Users
Employee ID and absence Start Date make up the primary key as one employee can only appoint one absence on one day. This table contains information All three (EmployeeID, about the training that employees CourseName, Year) attributes make have taken or are taking at the up the primary key in the concept moment. that one employee can take a specific course only once a year This table contains the number figure that an employee is allowed throughout a year according to his position This table contains information about the projects developed by the company This table contains information about the employees working in projects. It links employees to projects This table contains limited This table is not linked to any other information about employees that table since it is only used for left the company and are no reference purposes and will holds longer working there. limited personal information according to regulations monitoring personal data and the amount of time you are allowed to keep it. This table contains information This table is not linked to any other about all the promotions, and table since it is only used for raises employees had throughout reference purposes. their job life in the company This table contains the log in credentials of the users of the web service
27
The above diagram gives an overview of how the whole system comes together and how the various technologies interact in an integrated way delivering the service functionality to the potential user. The table below gives the architecture and flow of events explanation. Description 1 2&3 4 5&6 The service provider publishes his web service (WSDL file) to the UDDI organization where potential users can find it. The service user searches for the web service and acquires the WSDL file needed to communicate with the web service The web client sends a SOAP request (i.e. Add Employee) and the appropriate data in the XML format the web service is ready to accept it. The web service interface receives the XML message, and translates it to the programming language instructions the backing end application is written to. Then the request is performed by the application and a response is prepared and sent to the web service interface The web service interface generates the appropriate XML message response (i.e. informing the user if the Employee has been added or not) and sends it back over the internet to the web service client.
28
Login (Index)
Employees Menu
Projects Menu
Leaves Menu
Training Menu
View Profiles Add Employee Edit Employee Search Employees Monitor Performance
View Profiles Add Employee Edit Employee Search Employees Monitor Performance
This diagram is a general website outline of how the page flow of the website (web client) will be implemented and the options that will be available in each page.
29
Footer
Figure 24 - Website design
3.9 Summary
This chapter was a description of the design phase of all the aspects of the new application. The next step is to implement the application based on the design chosen.
30
Chapter 4: Implementation
This chapter gives the implementation of the application. The technologies that have been used and how they have been used to create the web service, the web client and the database, and the processes that will make up the system are explained in this chapter. Too much detail will be avoided and only the most important and difficult parts of the project will be presented here. Repetitive tasks and tasks that are simple to implement will be omitted
31
4.1.5 XML
The main characteristics of XML have been discussed in the background chapter in section 2.1.2. XML is used to create the web clients configuration files, the WSDL file and the SOAP requests and responses from the client to the web service and vice versa. All these files are automatically generated by Netbeans.
4.1.6 Java
Java will be the programming language that will be used to create the main classes that will make up the web service and the back end functionality of the web application that will serve as the web client. Java can be easily used in combination with SQL to create a JDBC application in order to access and manage the data in the database.
4.1.7 JavaScript
JavaScript will be embedded in the JSF pages and will be used for validations on the user actions when using the website. It is a powerful scripting language that provides a very efficient way of carrying out many necessary validations on the client side and avoid loading the server.
32
Create Database
Create tables
33
4.3.1 DBConnect
This operation is used in order to connect to the database when it is needed. The function is called by each operation which needs to manipulate data in the database (add, edit, delete) in order to open a database connection and then the connection is closed when the operation is finished. The connection strings are declared outside the operation and are used by the DBConnect function to connect to the DB.
The above strings are used in the following code extract of the DBConnect operation.
34
Below are the SOAP request and SOAP response messages sent and received when the operation DBConnect of the web service is called. DB connect is a Boolean operation so if the connection with the database was successful the SOAP response should be true.
35
4.3.2 Login
This operation is used when the user wants to login and use the web client and have access to the data of the database. The user enters his/her username and password which are then checked upon the database. If the credentials are valid then the user is allowed to access and use the system, otherwise access is denied. The code extract below is part of the Login operation of the web service. The two important things to notice is first how the operation DBConnect is used to connect to the database first and the second is the SQL command used together with a result set in order to check the users credentials in the database.
The Login operation is a string operation. It is a string operation since there are three possible outcomes. First a database connection error might occur, secondly the login was incorrect and third the login was correct. A string is returned to the client according to each case and the client will deal with the string and will inform the user about each case.
36
The SOAP request and response provided by the web service tester when the credentials entered are wrong and therefore access will not be allowed to the user are shown below.
37
Description
Open the connection to the database Close the connection to the database Login to be able to use the system. Add a new employee record in the database
Notes
Users credentials checked upon the database The return type is a string since several outcomes are possible. (Successfully added, duplicate error, connection error The details are used in order to update the properties in the java Bean and to present the details on the website
viewEmployee
6 7
removeEmployee dismissEmployee
8 9
addAbsence getHolidaysLeft
10
updateHolidaysLeft
11
validateTraining
12 13
addTraining removeAbsence
14
findAbsence
Delete the details (record) of an employee from the database Remove the details of an employee from all the tables he is found and create a new record for that employee in the old employee relation Add a new leave/absence for an employee Get the number of holidays a specific employee is still allowed using his/her ID. Update the number of holidays after an employee takes a holiday or cancels a holiday Validate the details of a new training for an employee. If the details are invalid inform the user. Add the details of a new training to the database Cancel a leave/absence an employee has appointed and remove the record from the database. Find the details of a specific leave/absence in the database by employee ID and absence start date Browse the employees using various keywords and different search criteria (ID, name, surname, nationality, salary). The list is sorted according to the search criteria (i.e. by name ascending) All or some details (except ID) of the employee are updated and saved in the database. Same as No15 Browse training data using various keywords and different search criteria
15
searchEmployees
The details of the absence will be used in order to update the properties in the java Bean and to present the details on the website Used when the user requests a report with one or more number of employees meeting the search criteria.
16
updateEmployee
17 18
searchOldEmployees searchTraining
Same as No15 Used when the user requests a report with one or more number of training sessions meeting the search criteria
19
viewAbsences
Browse absences/leaves data using various keywords and different search criteria
38
20
getTraining
The details are used in order to update the properties in the java Bean and to present the details to the user using the special JSF tags which are linked to the Bean properties
21 22
updateTraining removeTraining
23
viewHolidaysLeft
24
checkEmployee
Update the status (complete attribute) of a training session. Delete the details of a training session from the database when a training was cancelled Return a list with the employee details and number of holidays remaining for each employee Check if an employee exists in the database
25
getNextProjectID
Find the last ID and increment it by one to give a new project its ID Create a new project and add its details in the database Add the details of the employees that will be involved in a project Check if a project exists in the database
Used when the user requests a report for the holidays for all or a single employee This operation is used by other operations (i.e. addProjectForce) to first check if the employee exists and then proceed. Used when a new project is created since the ID is automatically assigned
26 27 26
27
searchProjects
28
viewProject
This operation is used by other operations (i.e. addProjectForce) to first check if the project exists and then proceed. Used when the user requests a report with one or more number of projects meeting the search criteria Use the details in order to update the properties in the java Bean and to present the details on the website
29 30 31 32 33 34 35 36 37
getProjectForce updateProjectForce removeProjectForce updateProject cancelProject getEmployeeAverage Performance getJobType promoteEmployee updateHolidays
Get the employees that work is a specific project update employees details that work in a project (i.e. score) Remove employees from a project Update projectDetails Cancel a project and remove the record from the DB Get the average performance of a specific employee Get the position of an employee Promote an employee to a higher position and give raise Reset the number of holidays the employees are allowed to their original values at a specific date of the year.
39
4.4.1 Web client and & Web Service integration and communication
The first thing that was created was the Java Beans. Two beans were created that are the Java files that serve as the communication medium between the web pages and the web service. The first is the HRM bean which is responsible for log-in and log-out requests from the user and the second is the Employee Bean which deals all the rest requests which have to do with managing employees, projects, trainings and leaves. Both files can be found in the CD submitted in e-HRM/src/java directory. Thirty four web pages (jsp) have been used to create the User Interface. The following images show the user interface and extracts of the U I code and Bean code and explain how the beans communicate with the jsp pages. The explanation and process flow of the images is given right after the images. The login process is used as an example.
Log-in page
40
41
Images explanation
Referencing the web service In order to be able to communicate with the web service the java bean must reference the web service first by locating the WSDL file as shown by the code extract below.
Calling the web service The web service is called from the Bean function after creating a web service instance as shown below
Process walkthrough When the user enters his username and password in the text fields, the values of these fields are then passed from the jsp page to the properties of the bean. Then these properties are used by the login function of the HRM bean and passed as parameters the web service login operation which responds back to the client. The client takes the web service response and accordingly renders the appropriate message or action on the website. The JSP pages communicate with the Java Beans which in turn communicate with the web service and which in turns communicates with the database. All the rest of the web pages and bean functions work in the same way and will not be shown here in an effort to avoid excessive detail.
The web service operation searchTraining is called in order to retrieve all the training sessions for the employee (blue rectangle). The last call to the web service is to the getEmployeeAveragePerformance operation which takes the employee ID as parameter and returns the number that corresponds to the average performance of that employee according to the scores he gained from the projects he worked in (green rectangle) The createProfile function can be found in the CD in the directory eHRM/src/java/com/corejsf/EmployeeBean.java and the web service operations can be found in the directory webService2/src/java/mypackage/NewWebService.java.
43
4.4.3 JavaScript
For this project JavaScript was mainly used for validations on the user inputs and actions on the website. The description of the validations is analysed and explained in the testing chapter. In this chapter only an explanation of how JavaScript was used in order to enable the client side validations on the website. The reason JavaScript was used is to avoid loading the server with more validations. Inputs and actions are validated before submitted using JavaScript which is embedded inside the web page directly. In the next diagrams the JavaScript that was used in the login (index.jsp) page is explained. [8] Index.jsp extract
Get the values of the JSF tags from the form and pass the to the function variables
Check which details are missing specifically in order to create more accurate and specific alert message to the user
In order for the JavaScript function to be called an action on the JSP page must call it. The code extract below from the index.jsp page shows how the above JavaScript is triggered when the user clicks on the login button and the form is submitted. [6]
. 44
The faces-config.xml file is also responsible for stating the managed beans of the application in order to enable communication between the jsp pages and the managed beans (java files) as shown in the following faces-config.xml extract.
45
Chapter 5: Results
5.1 System Walkthrough
Login
The above images show the login page and the main menu. Once the user enters his/her username and password correctly the system grants access to the user and displays the main menu of the system.
46
Employee submenu When the employee navigates to the employees submenu he is presented with various options as shown in the image below.
47
Employee Profile Page The next images show the outcome when the user searches for the personal profile of an employee. The user is required to enter the employees ID and the profile page is presented to the user.
Add Employee When the user selects the option to add a new employee from the employees submenu, the new employee form appears and the user is required to enter the new employee details.
48
Find Employee When browsing employees that match some search criteria the following screen appears. When the user selects the search criteria (i.e. by ID, name, surname, salary, nationality, position) he/she is presented with the report of the employees that match the criteria and their details.
49
Edit Employee Editing an employee, either update his/her details, or dismiss, or remove completely first the user must search for the employee. Then the details of the employee are shown together with the options available.
50
Monitor Performance Choosing Monitor Performance from the employees submenu the following screen appears showing the average performance for all employees.
51
Projects submenu When the employee navigates to the projects submenu he is presented with various options as shown in the image below.
52
New Project To a new project first the screen for entering the project details appears and when the new project is created the screen for entering the details of the employees that will be involved in the project appears for the user to fill the required information.
53
Find Projects When searching for projects that match some search criteria the following screen appears. The user selects the search criteria (i.e. by project ID, project name or manager ID) and he/she is presented with the relevant report.
54
Edit Project When the user wants to edit the details of a project, either update or cancel the project completely, first the user must search for the project. Then the details of the project are presented to the user together with the options available.
55
Training submenu When the employee navigates to the training submenu he/she is presented with various options as shown in the image below.
56
New Training When the user wants to add a new training for an employee and selects the option New Training from the training submenu the screen for entering the training details appears for the user to fill the required information.
57
View Training Data Searching for training sessions that match some search criteria the following screen appears. When the user selects the search criteria (first either by employee ID or course name and secondly for course status which is either courses passed, courses failed, courses in progress or all) he/she is presented with the report containing the relevant information.
Searching by employee ID for all the courses passed and searching for employee ID 885058 gives the following outcome
58
Edit Training Data In the case when training needs to be edited the user has to provide the details of the training in order to track it. Then the user has two options. The first is to update the status of the training (i.e. change from in progress to completed successfully or not completed) and the second is to cancel and remove the training completely. The following images show the steps for changing the status of training for employee with ID 885058.
59
Leaves submenu When the employee navigates to the leaves submenu he/she is presented with various options as shown in the image below.
60
New Leave Selecting the option New Leave from the leaves submenu the screen for entering the leave details appears for the user to fill the required information.
61
View Leaves Data Searching for leaves/absences that match some search criteria the following screen appears. When the user enters the search criteria (first search for the absence type: i.e. Holiday, secondly search for a specific employee ID or for All employees and third the date criteria: i.e. starting from date or ending on date or on a specific date) he/she is presented with the report containing the relevant information.
62
Edit Leaves The user is only able to cancel a leave but not edit any details. If changes to the date or the reason have to be made then the existing leave has to be cancelled and a new one must be created.
63
Remaining Holidays When the user selects the option Remaining Holidays the user has the option to search for a specific employee or for all employees and the system will provide a report with the total days remaining for each employee as holidays. This option could be very useful for the user since he/she can monitor which employees take up all their holidays and which take very little holidays and investigate the reasons for the case.
64
6.1 Validations
Validations on the user input have been used in order to get as accurate and correct input from the user and create the most appropriate and correct response. JavaScript was used to make the website input validations and the rest are either done on the client side by the Java Beans or by the web service itself. A list of the validations used and an example is given below. No 1 2 3 4 5 6 7 8 9 10 11 12 13 Validation Description The user must not be allowed to proceed if there are blank fields for information which are required. (i.e. username and/or password) The user must not be allowed access if the login credentials are invalid The date format accepted is YYYY/MM/DD or YYYY-MM-DD which are the two formats accepted by the database. The age of a new employee must be between 18 and 65 years old Minimum and maximum wage figures are controlled according to UK regulations Employees cannot take more holidays than they are allowed without permission Employees cannot appoint two different absences on the same period Employees must not retake a training they have already passed The user must be warned before sending an employee to training if he/she has failed that course twice. An employee must exist in the DB in order to add a new training, leave or project for him/her Text fields should not accept numbers or other characters and numeric fields should not accept letters or other characters to be entered The start date of a leave must be before the end date The year of a training which is in progress must not be before the current year
These are some of the basic validations and business rules applied on the system. Below is an example of the validations performed for cases 1, 2, 3 above.
65
66
67
68
The web service tester provided by Netbeans were each operation can be tested using different inputs and the outcome is checked to make sure that each operation behaves as expected in all situations and all inputs. The example below shows a test case were the web service operation login is tested using the tester tool provider by Netbeans. The table with the test data, the tester tool and the test outcome are shown in the images below.
Login operation Testing Test Data Wrong username, correct password Correct username, wrong password Wrong username, wrong password Correct username, correct password Expected Outcome False False False True Actual Outcome False False False True
69
70
In the same way all the web service operations have been tested before they were used by the web client to make sure that each operation behaves as expected in every possible input.
71
72
6.3 Evaluation
6.3.1 Strengths
The main strength of the application is the web service nature it carries. The web service makes the application independent of operating system, software platform and programming language giving it an important advantage over simple web based applications which might face compatibility issues. The web service implemented cannot only be used by the web client implemented for the purposes of this project but can also be used by other applications implemented by anyone interested by mapping the application to the web service using the WSDL file and by making it able to manipulate XML messages. About the program itself, the combination of the web service and the web service client is a useful tool for the manager of a small or medium sized company to control and manage effectively all the aspects surrounding the job cycle of their employees and get support in carrying out the companys human resource practises.
6.3.2 Limitations
The main problem that this and every other web service based application is phasing as opposing to simple web based applications is the time delay required to communicate with the web service for each request. Some amount of time is required until the web service is called and a request is sent and the response is received which is a clear disadvantage. Also it is more complex to create web services and map clients on the web service by manipulating XML messages than to create a simple web application.
73
Chapter 7: Conclusions
This is the final chapter of the report. In this chapter the project achievements will be compared with the initial requirements and goals set at the beginning of the project, future improvements and development will be presented and an overall idea about the project, the experience and the knowledge acquired throughout this process will be given.
Functional Requirement 1 2 3 4 5 6 The system must have a log-in/log-out feature The system must allow the user to add, update or delete employee details The system must allow the user to dismiss an employee and save him in a temporary location The system must allow the user to add, update or cancel a project details The system must allow the user to add, update or delete the details of a training session undertaken by employees The system must allow the user to add, update or cancel absences/leaves requested by employees and granted by the manager The system must allow the user to browse employees, projects, training sessions and leaves/absences using keywords and different search criteria and sorting requirements The system must allow the user to browse projects, employees, training details and absence/leaves using keywords, different search criteria and sorting criteria The system must automatically allocate a predefined number for holidays for each new employee according to his position and reset this number for all employees at a specified date every year. The system must be able to process and present to the user when needed the average performance for each employee based on the individual performance in each project the employee was involved.
Fully implemented
Fully implemented Partly implemented. The system automatically allocates a number for each employee but the reset is done manually.
10
Fully implemented
74
Non-Functional Requirement The application should make a useful tool and support the manager of a company to carry out the main HRM practises of the firm effectively
2 3 4 5 6 7
The application will be implemented as a web service The client of the web service will be a web application The user interface of the client should be friendly and simple to use and navigate through the various pages The font size and colour used should be easily readable by the user. Multiple user access should be allowed The client should be able to connect to the web service quickly and effectively
Review Implemented. The main and most important HRM processes are supported. More could have also been implemented Successfully Implemented Successfully implemented Successfully implemented Clear and visible colour combinations used. Partly implemented Successfully implemented
Most of the requirements have been successfully implemented and achieved. Some of them were not fully implemented due to lack of time. The requirement 6 of the non-functional requirements has been intentionally left out as after agreement with the project supervisor it was decided that the application will be directed towards a single company model and thus only one companys managers will be able to use it. This is because each company uses a different business model and it is difficult to capture all the models in a single application. Also for each company that subscribes a new database should be created and devoted to the company and companies cannot share databases something which was not possible due to the lack of resources for the needs of this project. Multiple user access on the same data is possible but multiple company registration is not for the above reasons.
technologies and disciplines that I have never encountered before and enrich my personal knowledge base.
76
References
[1] Margaret Foot and Caroline Hook Introducing Human Resource Management, Fifth Edition, Prentice Hall Financial Times Pearson Education, 2008 [2] Beardwell, I. and L. Holden (2001) Human Resource Management: A Contemporary Approach third edition [3] Eric Newcomer Understanding Web Services XML, WSDL, SOAP, and UDDI, 2002 [4] Understanding SOA with Web Services Eric Newcomer, Greg Lomow, Addison Wesley, 2004 [5] T.Scheurer -Engineering Web Applications, part2: Core JavaServer Faces, 2010 [6] David Geary, Cay Horstmann Core JavaServer Faces, Third Edition [7] http://www.horstmann.com/corejsf/jsf-tags.html - JSF tags [8] http://bytes.com/topic/javascript/insights/738607-how-use-javascript-jsf - JavaScript in JSF [9] http://www.w3schools.com/js/default.asp - JavaScript [10] [11] http://www.roseindia.net/xml/ - XML http://www.w3schools.com/xml/default.asp - XML2
77
78