scieee AI-readable full text Open interactive document viewer

CMD, Continuous Monitoring Data Base: a web application that stores the continuous monitoring data of a landfill

Vera Martinez, Paola Andrea

Abstract

This project aims to improve and extend an already existing system called CMD (Continuous Monitoring Data Base). Reverse engineering has been used to improve the system, a proof of concept has been performed in order to take technological decisions and new requirements have been developed.

Full text

CMD, Continuous Monitoring Data Base A web application that stores the continuous monitoring data of a landfill. Student: Paola Andrea Vera Director: Dolors Costal Master Ingeniería Informática Facultad ingeniería Informática de Barcelona (FIB) Universidad Politécnica de Catalunya. 1 Contents 1 Introduction .......................................................................................................................................... 3 1.1 Context .......................................................................................................................................... 3 1.2 Starting Point ................................................................................................................................ 5 1.3 Thesis Goals................................................................................................................................... 6 1.4 Glossary ......................................................................................................................................... 8 1.5 Development Methodology .......................................................................................................... 9 1.6 Document structure .................................................................................................................... 10 2 Requirements Specification ................................................................................................................ 11 2.1 Functional Requirements ............................................................................................................ 11 2.1.1 List of use cases ................................................................................................................... 11 2.1.2 Actors .................................................................................................................................. 14 2.1.3 Use cases specification........................................................................................................ 14 2.2 Data conceptual scheme ............................................................................................................. 70 2.3 Non-functional requirements ..................................................................................................... 72 2.3.1 Look and feel requirements ................................................................................................ 72 2.3.2 Usability and humanity requirements ................................................................................ 72 2.3.3 Performance requirements ................................................................................................. 72 2.3.4 Maintainability and support requirements ......................................................................... 74 2.3.5 Security requirements ......................................................................................................... 74 3 System Architecture ............................................................................................................................ 76 3.1 Description .................................................................................................................................. 76 3.2 Used Technologies ...................................................................................................................... 76 3.3 Use case view .............................................................................................................................. 79 3.4 Package view ............................................................................................................................... 80 3.5 Deployment view ........................................................................................................................ 82 3.6 Analysis and Design ..................................................................................................................... 84 3.6.1 Class diagram ...................................................................................................................... 84 3.6.2 Data base diagram .............................................................................................................. 86 3.6.3 Analysis after reverse engineering ...................................................................................... 87 3.6.4 Proof of concept .................................................................................................................. 90 3.6.5 Evaluation of the proof of concept ..................................................................................... 91 2 3.6.6 Sequence Diagram .............................................................................................................. 91 4 Testing ............................................................................................................................................... 107 5 Project planning and costs ................................................................................................................ 108 5.1 Planning..................................................................................................................................... 108 5.2 Actual planning ......................................................................................................................... 109 5.3 Planning conclusions ................................................................................................................. 109 5.4 Costs .......................................................................................................................................... 110 6 Future Work ...................................................................................................................................... 112 7 Conclusions ....................................................................................................................................... 113 8 References ........................................................................................................................................ 115 9 APPENDIX .......................................................................................................................................... 116 3 1 Introduction 1.1 Context Americans generate trash at rate of 4.6 pounds (2.1 kilograms) per day per person, which is 251 million tons (228 million metric tons) per year. Some of this trash gets recycled or recovered and some is burned, but the majority is buried in landfills. A landfill is a carefully designed structure built into or on top of the ground in which trash is isolated from the surrounding environment. A landfill has a several environmental impacts; that is why it is important to monitor air, surface water and groundwater. Environmental Information Logistics (EIL) [1] is an environmental consulting, engineering, and information management firm, located in the United States, which provides economical solutions to the diverse environmental, engineering, and data management challenges that their clients confront. Its team includes licensed civil, geotechnical, geological and environmental engineers, professional project managers, environmental scientists, biologists, chemists, hydrogeologists and technicians. EIL helps a number of clients, which are waste disposal companies that own and run landfills, to manage the special compliance and operations of them. One of those 4 operations consists of data management, ordered by the EPA (US Environmental Protection Agency), which requires monitoring, recordkeeping and reporting of large amounts of data, generated by several devices (data loggers) located in the landfills or sites. It came about that as a company they wanted to serve their client by providing air pollution compliance through the design of something very flexible in order to accommodate changing regulations by the EPA. They decided to meet these requirements by the creation of a web application for this and other future uses, such as applications that require manipulation of continuous data. They choose to organize the data by the creation of the concept of the reportable unit, which is any physical device for which records are kept, such as gas flares, well pressures, water levels, etc. They can be elements of a landfill or other industrial process that have to be measured. Reportable Units generate data and it is recorded by data loggers in csv (comma separate values) files, where each column is a type of data (temperature, gas, pressure, flow rates, etc.) and every row is the value of the data according to a timestamp. Usually data is recorded every 1 minute to 15 minutes, every day and every year. Besides storing the data, it is necessary to generate different kinds of reports from it, because the EPA demands it. The algorithms used to create the reports are largely based on regulatory requirements, helping clients to maintain regulatory compliance. 5 1.2 Starting Point A few years ago, EIL had few sites to manage and was receiving its data in files each month. Using this data they would manually build their reports using excel. However, sometimes a site’s data was messy: multiple data loggers were used or data were provided in different formats. One person could spend a lot of time figuring out how to handle it. On occasions, the client would ask for a calculation of the data for a particular time frame and the person who had figured it out the first time was out of the office. Someone else would then go through the data again, or the first person’s calculations and figure it out. Often the second person would get a different number than the person doing the original calculations. Five years ago EIL saw the need to create an informatics system (Web application) that could manage data from their landfills and generate reports. This project was called "Continuous Management Data base". It began with few requirements, one programmer and one project manager. The IT of the company decided to use .net as the programming language, Sql server 2008 as the data base and IIS as the server application. The web application consisted of uploading text files, which contain minute-by-minute data of the different variables that can be measured at a landfill (for example temperature) and then populating the database with the aim of generating reports to analyze these data to be delivered to the sites owners. 6 Over time, the requirements of the EPA were increasing and the type of reports that customers demanded of EIL and its web application, too. In addition, EIL realized that the database could be used for purposes different from what it was originally designed, which why the project requirements were changing and growing. However, during the implementation of the system, the phases of the software development were done incorrectly, because of poor documentation of requirements gathering, analysis, system design and testing. By becoming larger, the application EIL came to the conclusion that it was necessary to have good documentation of all phases. Besides this issue new, interesting and complex requirements appeared. Some sites store the text files where the data is in ftp servers every day and EIL employees download the data and then upload them into the web application. It is necessary to automatize this step and give the data base charge of it, speeding up the downloading –uploading time and reducing the amount of people doing it. 1.3 Thesis Goals The thesis is divided into three parts: 1. The first consists in documenting the reverse engineering of requirements, analysis and design of all use cases of the application. 7 2. During the reverse engineering of system many mistakes were found in the implementation phase, so it was realized that the application code could be improved. That is why the second part consists of correcting and improving the application to make it more flexible and understandable. However, EIL didn’t approve the improvement of all the reverse engineering use cases, due to costs in time and money. So, it came to the conclusion to improve the most important and critical use cases 3. New requirements have emerged, which will make a major change in the application. The third part consists of implementing those requirements following all of the software development phases. For implementing these requirements a proof of concept was built for making decisions about the tools to be used to implement this part of the application. 8 1.4 Glossary Client: the owner or the administrator of the site. Every site has an owner and an administrator. In most of the cases the owner is the same administrator. Continuous data: is data recorded at a high frequency during a time frame. Daylight saving time: (DST) or summer time is the practice of advancing clocks during the summer months that have more daylight so that people get up earlier in the morning and experience more daylight in the evening. Data Logger: is a device used to record data of a reportable unit stored electronically in a file. Data Format: is a file format or template that describes the structure of a data file. Document: the pdf documents of the company. File: file generated by a data logger, contains data of the reportable unit by date. Ftp download: some of the client’s data, which is recorded by data loggers, and is located in ftp servers. This data has to be downloaded in order to be manipulated and reported. Fuel type: is the type of fuel that the reportable unit burns. Measurement type: is a physical measurement such as temperatures, gas flow rates, gas flow volume of the reportable unit. Measurement Unit: is the unit of a physical measurement value. 15 Name Log out ID UC64 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to log out Main success scenario 1. User logs out 2. System logs out the user Extension 16 2.1.3.1 Facility set up uc Facility set up Site (add,delete,modify) Client (add, modify, delete) Data Logger(add,delete, modify) Manage data format Items EIL generic user EIL Admin Reportable Unit (add,delete, modify) Manage reportable units Manage Dataloggers Manage Data formats Manage Clients Manage sites Data Format (add,modify,delete) Manual DST dates (add, modify, delete) Data Format Items (add,modify,delete) Ftp server configuration (add,modify,delete) folder path configuration(add,edit,delete) Manage ftp servers «include» «include» «include» «include» «include» «include» «include» «include» «include» «include» 17 Name Manage clients ID UC01 Primary actor EIL Administrator Preconditions Actor must be logged in Activation User wants to manage all clients Main success scenario 1. System displays all the clients. 2. If the user wants to add a client Add Client 3. If the user wants to modify a client Modify Client. 4. If the user wants to delete a client Delete client. Extension 1a.There are not clients. 1. System displays an error message. Name Add Client ID UC02 Primary actor EIL Administrator Preconditions Actor must be logged in Activation User wants to add a client Main success scenario 1. User enters client name, client contact name, contact phone number. 2. System saves the information and displays a success message. Extension 1a.User entered incomplete information. 1. System displays an error message. Name Modify Client ID UC03 Primary actor EIL Administrator Preconditions Actor must be logged in Activation User wants to modify a client Main success scenario 1. User enters the client he wants to modify 2. System displays client name, client contact name, and contact phone number of the client. 3. User modifies the information. 4. System updates the information and displays a success message. Extension 2a. User enters incomplete information. 1. System displays an error message. 18 Name Delete Client ID UC04 Primary actor EIL Administrator Preconditions Actor must be logged in Activation User wants delete a client Main success scenario 1. User enters the client he wants to delete. 2. System deletes the client and displays a success message. Extension Name Manage sites ID UC05 Primary actor EIL Administrator Preconditions Actor must be logged in Activation User wants to manage all sites he has permissions to. Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. If the user wants to add a site Add site 4. If the user wants to modify a site Modify site. 5. If the user wants to delete a site Delete site. Extension 1a.There are not clients. 1. System displays an error message. Name Add site ID UC06 Primary actor EIL Administrator Preconditions Actor must be logged in Activation User wants to add a site Main success scenario 1. User enters the site name, fuel type, state, city, address, zip code, state Id, Owner issued id, Owner issued region, owner corporate name, owner name, client name, open and close date of the site. 2. System saves the information, for every EIL administrator user, adds a new permission over the site, creates a new path for document sites, inserts a new landfill total reportable unit and displays a success message. Extension 1a User didn’t enter an open and close date. 19 1. System stores the dates as unknown. 1b User enters incomplete information. 1. System displays an error message Go back to step 1 of 2a. 1c. Site open date is > than the close date, or they aren’t a valid date 1. System displays an error message Name Modify site ID UC07 Primary actor EIL Administrator Preconditions Actor must be logged in Activation User wants to modify a site Main success scenario 1. User enters a site 2. System, displays the site information. Site name, fuel type, state, city, address, zip code, state ID, Owner issued id, Owner issued region, owner corporate name, owner name, client name, open and close date of the site 3. User edits the information. 4. System updates the information and displays a success message. Extension 3a User didn’t enter an open and close date. 1. System stores the dates as unknown. 3b User enters incomplete information. 1. System displays an error message 3c. Site open date is > than the close date, or they aren’t a valid date 1. System displays an error message Name Delete site ID UC08 Primary actor EIL Administrator Preconditions Actor must be logged in Activation User wants to delete a site Main success scenario 1. User enters the site he wants to delete 2. System deletes the site, its reportable units, permissions over it, its documents and data loggers and displays a success message. Extension 20 Name Manage reportable units ID UC09 Primary actor EIL Administrator Preconditions Actor must be logged in Activation User wants to manage reportable units Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site. 4. System presents the reportable units of the site, which the user has permissions to. 5. If the user wants to add a reportable unit Add reportable unit. 6. If the user wants to modify a reportable unit Modify reportable unit. 7. If the user wants to delete a reportable unit Delete reportable unit. Extension 1a. There are no clients 1. System displays a message that there are no clients. 2a. There are no sites. 1. System displays a message that there are no sites for the entered client. 2. The use case ends 2b. User does not have permissions to any site 1. System displays a message that there aren’t permitted sites for the entered client. 2. The use case ends 4a. There are no reportable units. 1. System displays a message that there are no reportable units for the entered client. 2. The use case ends 4b. User doesn’t have permissions to reportable unit 1. System displays a message that there aren’t permitted reportable units for the entered site. 2. The use case ends Name Add reportable unit ID UC10 Primary actor Generic EIL user 21 Preconditions Actor must be logged in Activation User wants to add a reportable unit Main success scenario 1. User enters the reportable unit name, type, fuel type, latitude, longitude, state Id, Backup (“yes” or “no”) and statec, open and close date. 2. System saves the reportable unit, adds this reportable units as permitted for EIL admin users, creates the calibration data paths and displays a success message. Extension 1a. Reportable unit open date is > than the close date, or they aren’t a valid date 1. System displays an error message 1b. The latitude and longitude are not numeric values. 1. System displays an error message Name Modify reportable unit ID UC11 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to modify a reportable unit Main success scenario 1. User enters a reportable unit 2. System displays information of the reportable unit. Reportable unit name, type, fuel type, latitude, longitude, state Id, Backup, statec, open and close date. 3. User edits the information. 4. System saves it and displays a success message. Extension 3a. Reportable unit open date is > than the close date, or they aren’t a valid date 1. System displays an error message 3b. The latitude and longitude are not numeric values. 1. System displays an error message 3a User didn’t enter the information. 1. System displays an error message 3b User didn’t enter an open and close date. 1. System stores the dates as unknown. Name Delete reportable unit ID UC12 22 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to delete a reportable unit Main success scenario 1. User enters the reportable unit he wants to delete. 2. System deletes the reportable unit, its records, data format, documents, data loggers relation, ftp download schedules and displays a success message. Extension Name Manage data loggers ID UC13 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to manage data loggers Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site. 4. System presents the data loggers of the site 5. If the user wants to add a data loggers, Add data logger. 6. If the user wants to modify a data loggers, Modify data logger. 7. If the user wants to delete a data loggers, Delete data logger. Extension 1a. There are no clients 1. System displays a message that there are no clients. 2a. There are no sites. 1. System displays a message that there are no sites for the entered client. 2. The use case ends 2b. User doesn’t have permissions to any site 1. System displays a message that there aren’t permitted sites for the entered client. 2. The use case ends 4a. There are no data loggers for the entered site 1. System displays a message. Name Add Data logger ID UC14 23 Primary actor Generic EIL user Preconditions User must be logged in Activation User wants to add data logger Main success scenario 1. User enters the site owner of the data logger, the data logger name, serial number, number of channels, status, and time zone, start service and stop service date. 2. System presents the reportable units of the site, which the data logger keeps track of and has permissions to. 3. User enters one or more reportable units and the daylight saving time configuration: No, automatic, manual or unknown. 4. System saves the information and displays a success message. Extension 1a. Number of channels is not a numeric value. 1. System displays an error message. 1b. Data logger start service dates is > than the stop service date or they are not valid dates. 1. System displays an error message. 3a. User enters a manual daylight saving time configuration 1. User enters the spring date, fall date and year of the shift. This step is repeated until the user doesn’t want to add more dates. Name Modify Data logger ID UC15 Primary actor Generic EIL user Preconditions User must be logged in Activation User wants to modify data logger Main success scenario 1. User enters the data logger he wants to modify. 2. System presents the data logger information. Site name, serial number, number of channels, status, time zone, start service and stop service date, daylight saving time configuration, reportable units of the site, which the data logger keeps track of and has permissions to. 3. User modify the information of the data logger. 4. System saves the information and displays a success message. Extension 3a. User modifies a manual daylight saving time configuration 1. User modifies the spring date, fall date and year of the shift. 2. System updates the information. 3b. User deletes a manual daylight saving time configuration 1. System updates the information. 24 3c. Number of channels is not a numeric value. 1. System displays an error message. 3d. Data logger start service dates is > that the stop service date or they are not valid dates. 1. System displays an error message. Name Delete Data logger ID UC16 Primary actor Generic EIL user Preconditions User must be logged in Activation User wants to delete data logger Main success scenario 1. User enters the data logger he wants to delete. 2. System deletes the data logger. Extension 2a Data logger adjust manually to daylight saving time 1. System also deletes the manual dates. 2b There is a Ftp download schedule related to the data logger. 1. System displays a message that there is a schedule related to the data logger, please delete or edit it first in order to delete the data logger. Name Manage data formats ID UC17 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to manage data formats Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site. 4. System presents the reportable units of the site, which the user has permissions to. 5. User enters a reportable unit. 6. System presents the data formats of the reportable unit. 7. If the user wants to add a data format Add data format. 8. If the user wants to modify a data format Modify data format. 9. If the user wants to delete a data format Delete data format. 10. If user wants to list the data format item List items Extension 1a. There are no clients 1. System displays a message that there are no clients. 2a. There are no sites. 31 Name Modify a folder path of a FTP Server configuration ID UC34 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to modify a folder path of a ftp server configuration Main success scenario 1. User enters a ftp server configuration 2. System presents the folder paths of the ftp server configuration User enters a path and edits it. 3. System updates the folder path and test it if it exists. Extension 2a There are no folder paths. 1. System presents a message, that there are no folder paths. 3a. User enters incomplete information. 1. System displays an error message. 3b. The new path doesn’t exists 1. System displays an error message. Name Delete a folder path of a FTP Server configuration ID UC35 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to delete a folder path of a ftp server configuration Main success scenario 1. User enters a ftp server configuration 2. System presents the ftp server configuration information and folder paths 3. User enters the folder path he wants to delete 4. System deletes the selected path. Extension 2a. There are no ftp server configuration 1. System presents a message, that there are no ftp server configurations. 2. Use case ends. 4a There are no folder paths. 1. System presents a message, that there are no folder paths. 2. Use case ends. 32 2.1.3.2 Data Entry Name Manage FTP download schedule ID UC36 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to manage ftp download schedules Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site. 4. System presents Ftp download schedules of the entered site 5. If user wants to add a schedule Add FTP download schedule. 6. If user wants to modify a schedule Modify FTP download schedule. 7. If user wants to delete a schedule Delete FTP download schedule uc Data Entry Manual Entry (add, delete, modify) Scheduling ftp download (add,edit,delete) Upload data from a single file EIL generic user Manual ftp download Clock Download FTP files Upload file Manage FTP download schedule «include» «extend» «extend» «extend» 33 Extension 2a. There are no sites. 3. System displays a message that there are no sites for the selected client. 4. The use case ends 2b. User doesn’t have permissions to any site 3. System displays a message that there aren’t permitted sites for the selected client. 4. The use case ends. Name Add FTP download schedule ID UC37 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to add a ftp download schedule Main success scenario 1. System presents the reportable units of the site, which the user has permissions to. 2. User enters a reportable unit 3. System presents the file templates and data loggers of the reportable unit. 4. User enters a file templates, data logger, Ftp server configuration and a folder path, file note10, time shift11, time frame12: start time and end date, recurrence pattern (Daily, Weekly and Monthly). 5. System saves the schedule, displays a success message. Extension 1a. There are no reportable units. 1. System displays a message that there are no reportable units for the selected client. 2. The use case ends 1b. User doesn’t have permissions to reportable unit 1. System displays a message that there aren’t permitted reportable units for the selected site. 2. The use case ends 4a.There are no file templates 1. System displays a message that there are no file templates for the selected reportable unit. 2. The use case ends 4a.There are no data loggers 10 A file can have an explanation of its content. 11 A user can add or subtract hours to the time stamp of the data, in order to change its time zone. 12 The time frame is the date range, where the files where created (one by day). 34 1. System displays a message that there are no data loggers for the selected reportable unit. 2. The use case ends 6a. There are no ftp servers 1. System displays a message that there are no ftp servers configured. The system suggest the user to add a new configuration. 2. User case ends. 6b. User entered a weekly recurrence pattern 1. System presents the days of the week 6c. User entered a monthly recurrence patter. 1. System presents the days of a month 6d. User enters incomplete information. 1. System displays an error message. 2. Go back to step 1 of the main scenario. 6e. Start date is > end date or they are invalid. 1. System displays an error message. 2. Go back to step 14 of the main scenario. Name Modify FTP download schedule ID UC38 Primary actor Generic EIL user Preconditions User must be logged in Activation User wants to modify a ftp download schedule Main success scenario 1. User enters the schedule he wants to modify. 2. System presents the information of the selected schedule: data format, data logger, ftp server, ftp files path, start and end date, recurrence patter, file note and time shift. 3. User edits the information. 4. System saves the information. Extension 3a. User entered a weekly recurrence pattern 1. System presents the days of the week 3b. User entered a monthly recurrence patter. 1. System presents the days of a month 3c. User enters incomplete information. 1. System displays an error message. 2. Go back to step 1 of the main scenario. 3d. Start date is > end date or they are invalid. 1. System displays an error message. 2. Go back to step 14 of the main scenario. 35 Name Delete FTP download schedule ID UC39 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to delete a ftp download schedule Main success scenario 1. User enters the schedule he wants to delete. 2. System deletes the selected schedule. Extension 1a There are no schedules. 1. System presents a message that there are no schedules 2. User case ends Name Download ftp files ID UC40 Primary actor Clock Preconditions The time on the clock is correct. There is a ftp download schedule for the current timestamp. Activation Clock indicates it’s time to download files from a ftp server. Main success scenario 1. System connects to the selected ftp server and downloads the files according to the dates and recurrence pattern indicated. Then those files are uploaded to the data base. 2. User receives a confirmation email of every file transferred indicating success of the transfer Extension 1a. There is an error downloading the files 1. System sends an email to the user explaining the error. Name Manual FTP download ID UC41 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to schedule a ftp download of files to be uploaded in the flare data base. Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site. 4. System presents the reportable units of the site, which the user has permissions to. 5. User enters a reportable unit. 36 6. System presents the file templates and data loggers of the reportable unit. 7. User enters a file templates, data logger, Ftp server configuration and a folder path, file note13, time shift14, time frame15: start and end. 8. System validates the information, connects to the selected ftp server and downloads the files to the dates indicated. Then those files are uploaded to the data base. 9. User receives a confirmation email of every file transferred indicating success of the transfer. Extension 2a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends 2b. User doesn’t have permissions to any site 1. System displays a message that there aren’t permitted sites for the selected client. 2. The use case ends 2a. There are no reportable units. 1. System displays a message that there are no reportable units for the selected client. 2. The use case ends 2b. User doesn’t have permissions to reportable unit 1. System displays a message that there aren’t permitted reportable units for the selected site. 2. The use case ends 6a.There are no file templates 1. System displays a message that there are no file templates for the selected reportable unit. 2. The use case ends 6a.There are no data loggers 1. System displays a message that there are no data loggers for the selected reportable unit. 2. The use case ends 9a. User enters incomplete information. 3. System displays an error message. 4. Go back to step 1 of the main scenario. 9b. Start and end dates are invalid or start date > end date. 1. System displays an error message. 2. Go back to step 14 of the main scenario. 10a. There is a failure in the download and transfer 13 A file can have an explanation of its content. 14 A user can add or subtract hours to the time stamp of the data, in order to change its time zone. 15 The time frame is the range where the files where created (one by day). 37 1. System sends an email to the user explaining the error. Name Upload data from a single file ID UC42 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to upload a data file. Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site. 4. System presents the reportable units of the site, which the user has permissions to. 5. User enters a reportable unit. 6. System presents the file templates and data loggers of the reportable unit. 7. User enters a file template, data logger, time shift, file note and the file. 8. System validates the data, uploads it and sends a confirmation email attaching a copy of the file and a report of the process indicating success. Extension 2a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends 2b. User doesn’t have permissions to any site 1. System displays a message that there aren’t permitted sites for the selected client. 2. The use case ends 2a. There are no reportable units. 1. System displays a message that there are no reportable units for the selected client. 2. The use case ends 2b. User doesn’t have permissions to reportable unit 1. System displays a message that there aren’t permitted reportable units for the selected site. 2. The use case ends 6a.There are no file templates 1. System displays a message that there are no file templates for the selected reportable unit. 2. The use case ends 38 6a.There are no data loggers 1. System displays a message that there are no data loggers for the selected reportable unit. 2. The use case ends 7a. User enters incomplete information. 1. System displays an error message. 2. Go back to step 1 of the main scenario. Name Upload file ID UC43 Primary actor Preconditions Activation Main success scenario 1. System validates the data. 2. System upload the data and sends a confirmation email attaching a copy of the file and a report of the process indicating success. Extension 1a. There is Duplicated data in the file 1. System writes the duplicated data on the file report as “duplicated data” and sends an email attaching the report, the file and indicating failure. 2. User case ends 1b. The data in the file is already in the data base 1. System writes the duplicated data on the file report as “rejected lines”16. 2. Go to step 2 in the main scenario 1c. A column specified in the data format, doesn’t exist on the file. 1. System writes on the file report as “error” what column doesn’t exist and sends an email indicating failure. 2. User case ends. 1d. The timestamp format in the lines of the file doesn’t match the data format’s date format. 1. System writes on the file report as “errors” what timestamps doesn’t match the date format and sends an email, attaching the report and the file indicating failure. 16 The uploading file process report, shows the rejected lines of the file. These rejected lines are the duplicated data found between the data base and the file. 39 2. Use case ends 1e. A data value in the file is not a number. 1. System checks for illegal expression specified for that reportable unit. 1e.1 The value is an illegal expression a. It is written in the report file as “rejected lines”. b. Go to step 2 in the main scenario 1e.2 The value is not an illegal expression a. It’s written on the file report as “errors” and an email is sent indicating failure. b. User case ends 1f. There is a line in the file without timestamp 1. System writes the line on the file report as “errors” and send an email, attaching the report and the file indicating failure. 2. Use case ends. Name List manual entries ID UC44 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to list manual data entries. Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site. 4. System presents the reportable units of the site, which the user has permissions to. 5. User enters a reportable unit and the time frame. 6. System presents the manual data entries. 7. If the user wants to add a data entry Add data entry. 8. If the user wants to modify a data entry Modify data entry. 9. If the user wants to delete a data entry Delete data entry. Extension 1a. There are no clients 1. System displays a message that there are no clients. 2a. There are no sites. 1. System displays a message that there are no sites for the entered client. 2. The use case ends 2b. User doesn’t have permissions to any site 1. System displays a message that there aren’t permitted sites for the entered client. 40 2. The use case ends 4a. There are no reportable units. 1. System displays a message that there are no reportable units for the entered client. 2. The use case ends 4b. User doesn’t have permissions to reportable unit 3. System displays a message that there aren’t permitted reportable units for the entered site. 4. The use case ends 6a. There are no manual data entries 2. System displays a message that there are no data entries. Name Add manual entry ID UC45 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to add a manual entry Main success scenario 1. User enters a date, data value, measurement unit, measurement type and a data logger. 2. System saves the information and displays a success message Extension 1a. User enters incomplete information 1. System displays an error message. 1b. Data Value is not a numeric value. 1. System displays an error message. 1c. The entered date is not a valid date 1. System displays an error message. Name Modify manual entry ID UC46 Primary actor Generic EIL user Preconditions Actor must be logged in Activation User wants to modify a manual entry Main success scenario 1. User enters a data entry 2. System show the information of the entered data entry. 3. User edits the information. 4. System updated the information and displays a success message. 47 Activation User wants to manage a user Main success scenario 1. System displays all the users of the application 2. If the user wants to add a user Add User 3. If the user wants to modify a user Modify user. 4. If the user wants to delete a user Delete user. Extension 1a. There are no users 1. System displays a message that there are no users. Name Add user ID UC66 Primary actor EIL admin user Preconditions Actor must be logged in Activation User wants to add a user Main success scenario 5. User enters username, password, email, user type (Client, EIL, EIL admin) 6. System saves the information, creates the new user and displays a success message. Extension 1a. User entered incomplete information 2. System displays an error message. Name Modify user ID UC67 Primary actor EIL admin user Preconditions Actor must be logged in Activation User wants to modify a user Main success scenario 1. User enters the user he wants to modify 2. System displays username, password, email, user type (Client, EIL, EIL admin). 3. User modifies the information 4. System updates the information and displays a success message. Extension 3a. User entered incomplete information System displays an error message. Name Delete user ID UC68 Primary actor EIL admin user Preconditions Actor must be logged in Activation User wants to delete a user Main success scenario 1. User enters the user he wants to delete 2. System deletes the user entered. 48 Name Manage permissions ID UC69 Primary actor EIL admin user Preconditions Actor must be logged in Activation User wants to manage a permission Main success scenario 1. User enters the user he wants to see his permissions 2. System displays all the users of the application 3. If the user wants to add a permission Add permission 4. If the user wants to delete a permission Delete permission. Extension 2a. There are no permissions 1. System displays a message that there are no permissions for the selected user. Name Add user permission ID UC7 Primary actor EIL admin user Preconditions Actor must be logged in Activation User wants to add a permission to a user Main success scenario 1. System presents all the sites. 2. User enters a site. 3. System presents all the reportable units of the site. 4. User enters one or more reportable units Steps 2 to 4 are repeated until the user doesn’t want to add more sites. Extension 2a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends 4a. There are no reportable units. 1. System displays a message that there are no reportable units for the selected site. Name Delete user permission ID UC71 Primary actor EIL admin user Preconditions Actor must be logged in Activation User wants to add a permission to a user Main success scenario 1. System presents all the permission of a user. 2. User enters the permission he wants to delete. 49 3. System deletes the permission. Extension 1a. User doesn’t have permissions 1. System displays a message that there are no permissions for the entered user. Name Add illegal expression ID UC72 Primary actor EIL Admin user Preconditions Actor must be logged in Activation User wants to see the add an illegal expression file Main success scenario 1. User enters a new illegal expression 2. System saves the new illegal expression 3. User enters the site, which its files can contain the expression. 4. System saves the site. Steps 3 to 4 are repeated until the user doesn’t want to add more sites. Extension Name Modify Illegal expression ID UC73 Primary actor EIL Admin user Preconditions Actor must be logged in Activation User wants to see the add an illegal expression file Main success scenario 1. User enters the illegal expression he wants to modify 2. System presents the illegal expression and its sites 3. User modifies it. 4. System saves the information Extension 3a User enters incomplete information 1. System displays an error message. Name Delete illegal expression ID UC74 Primary actor EIL Admin user Preconditions Actor must be logged in Activation User wants to see the add an illegal expression file Main success scenario 1. User enters the illegal expression he wants to delete 2. System deletes the illegal expression Extension Name Illegal expression add site 50 ID UC75 Primary actor EIL Admin user Preconditions Actor must be logged in Activation User wants to see the add a site to an illegal expression Main success scenario 1. System presents all the sites 2. User enters a site 3. System saves the new site Steps 1 to 3 are repeated until the user doesn’t want to add more sites. Extension 1a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends Name Illegal expression delete site ID UC76 Primary actor EIL Admin user Preconditions Actor must be logged in Activation User wants to see the delete a site from an illegal expression Main success scenario 1. System presents all the sites of the illegal expression 2. User enters the site he wants to delete 3. System deletes the user Extension 1a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends Name See log file ID UC77 Primary actor EIL generic user, client Preconditions Actor must be logged in Activation User wants to see the log file Main success scenario 1. System presents the log file in txt. Extension Name Change password 51 ID UC78 Primary actor EIL generic user, client Preconditions Actor must be logged in Activation User wants to change his password Main success scenario 1. User enters the old password, new password, confirmation of the new password 2. System updates the password. Extension 1a The old and new passwords are equal 1. System displays an error message 1a. new password and its confirmation are equal 1. System displays an error message Name Data base statistics report ID UC79 Primary actor EIL admin user Preconditions Actor must be logged in Activation User wants to add a permission to a user Main success scenario 1. User wants to run a data base statistics report. 2. System presents a pdf file with the report. Extension 2.1.3.5 Flow reports uc Flow Report Average Max Min Flow reports (Daily, weekly, monthly, yearly) Flow Reports (Daily,weekly,monthly,yearly) Daily Back Weighted Flow Report Generic user 52 Name Average max, min flow report (daily, monthly, weekly, yearly) ID UC51 Primary actor Generic user Preconditions Actor must be logged in Activation User wants to run a daily, weekly, monthly or yearly average max, min flow report Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site and the time frame of the report. 4. System presents the reportable units of the site, which the user has permissions to and have data for the time frame. 5. User enters a reportable unit. 6. System presents the flow types the reportable unit keeps track of and its measurement units. 7. User enters a flow type, the output unit of the average and .pdf as the type of file. 8. System calculates the report and shows it as a .pdf document. Extension 2a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends 2b. User doesn’t have permissions to any site 1. System displays a message that there aren’t permitted sites for the selected client. 2. The use case ends 4a. There are no reportable units. 1. System displays a message that there are no reportable units for the selected client. 2. The use case ends 4b. User doesn’t have permissions to reportable unit 1. System displays a message that there aren’t permitted reportable units for the selected site. 2. The use case ends 7a User enters Excel as the report’s file type 1. System calculates the report and shows it as an excel document 7b User enters Excel Data only as the report’s file type 1. System calculates the report and shows it as an excel document 7c User enters Excel Formulas as the report’s file type 53 1. System calculates the report and shows it as an excel document with embedded formulas. Explanation This report takes all the data of the entered reportable unit and flow type, calculating the average, maximum and minimum value in the time frame or every day, week, month or year in the time period. It shows the client, site and the name of the reportable unit, average, maximum and minimum value and its timestamp for every day, week, month or year in the time frame. Name Flow reports (daily, monthly, weekly, yearly) ID UC50 Primary actor Generic user Preconditions Actor must be logged in Activation User wants to run a daily, weekly, monthly or yearly Flow report Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site and the time frame of the report. 4. System presents the reportable units of the site, which the user has permissions to and have data for the time frame. 5. User enters a reportable unit. 6. System presents the flow types the reportable unit keeps track of and its measurement units. 7. User enters a flow type, the output unit of the flow volume and flow rate, time between records, low flow threshold, runtime (days, hours or minutes), the max and min values is inactive and PDF as the type of file. The user doesn’t want to save the current setting. 8. System calculates the report and shows it as a pdf document. Extension 2a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends 2b. User doesn’t have permissions to any site 1. System displays a message that there aren’t permitted sites for the selected client. 2. The use case ends 4a. There are no reportable units. 1. System displays a message that there are no reportable units for the selected client. 2. The use case ends 54 4b. User doesn’t have permissions to reportable unit 1. System displays a message that there aren’t permitted reportable units for the selected site. 2. The use case ends 7a User enters Excel as the report’s file type 1. System calculates the report and shows it as an excel document 7b User enters Excel Data only as the report’s file type 1. System calculates the report and shows it as an excel document 7c the max and min values is activated 1. The data taken to calculate the report is the average of the max and min values of the entered flow type. 7c .1a.There is not data for either the max or the min flow type. i) System displays a message, that there is no data. ii) User case ends 7d User wants to save the current setting. 1. System saves the setting of the report (output unit of the flow volume and flow rate, time between records, low flow threshold, runtime and type of file) for the next time the user wants to run a report. 7e There is data in CFM or m3/min units. 1. System ask for reference information 2. User enters reference pressure and its units, temperature standard (20,25 Celsius degrees) and reference temperature and its units, 3. System converts the data from CFM to SCFM. Explanation The Daily, Weekly, Monthly and Yearly flow reports calculates the total flow, the average flow rate and the runtime for the selected time period. The way that the flow report calculates the total flow volume consists on summing (per day or week or month or year) the average of every two consecutive flow data points times the time that separates them. In order to calculate, this must be neither missing data nor flow less that the threshold value. For example, we have 700 SCFM at 15:10, 755 SCFM at 15:20 and 760 SCFM at 15:30 in a day, so the total flow of the day is ((700+755)/2 * 10 minutes) + ((755+760)/2 * 10 minutes) =15,150 SFC. Finally, the runtime value is equal to the time the flow is present and the flow rate is equals to the flow volume divided by the flow rate. Following the last example the runtime in that day is 20 minutes and the flow rate is 757.5 SCFM. Name Daily back weighed flow report ID UC52 Primary actor Generic user Preconditions Actor must be logged in 55 Activation User wants to run a Daily back weighed flow report Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site and the time frame of the report. 4. System presents the reportable units of the site, which the user has permissions to and have data for the time frame. 5. User enters a reportable unit. 6. System presents the flow types the reportable unit keeps track of and its measurement units. 9. User enters a flow type, the output unit of the flow volume and flow rate, time between records (days, hours, minutes), low flow threshold, the max and min values is inactive, runtime (days, hours or minutes) and PDF as the type of file. The user doesn’t want to save the current setting. 7. System calculates the report and shows it as a pdf document. Extension 2a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends 2b. User doesn’t have permissions to any site 1. System displays a message that there aren’t permitted sites for the selected client. 2. The use case ends 4a. There are no reportable units. 1. System displays a message that there are no reportable units for the selected client. 2. The use case ends 4b. User doesn’t have permissions to reportable unit 1. System displays a message that there aren’t permitted reportable units for the selected site. 2. The use case ends 7a User enters Excel as the report’s file type 1. System calculates the report and shows it as an excel document 7b User enters Excel Data only as the report’s file type 1. System calculates the report and shows it as an excel document 7c the max and min values is activated 1. The data taken to calculate the report is the average of the max and min values of the entered flow type. 7c .1a.There is not data for either the max or the min flow type. 56 i) System displays a message, that there is no data. ii) User case ends 7d User wants to save the current setting. 1. System saves the setting of the report (output unit of the flow volume and flow rate, time between records, low flow threshold, runtime and type of file) for the next time the user wants to run a report. Explanation This report takes all the data of the entered reportable unit and flow type, calculating the flow volume, runtime and flow rate of every day, week, month or year in the time frame. The data is presented in the entered output units. 2.1.3.6 Operating reports Name Uptime down time report (daily, monthly, weekly, yearly) ID UC53 Primary actor Generic user Preconditions Actor must be logged in Activation User wants to run a daily, weekly, monthly or yearly uptime downtime report Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site and the time frame of the report. 4. System presents the reportable units of the site, which the user has permissions to and have data for the time frame. 5. User enters a reportable unit. 6. System presents the flow and temperature types, which the reportable unit keeps track of and its measurement units 10. User enters a flow or temperature type and its output unit, time between records (days, hours, minutes), low flow uc Operating Reports Uptime Downtime Reports (Daily,weekly,monthly,yearly) Venting report Generic user 63 6. System presents the temperature types the reportable unit keeps track of and its measurement units. 7. User enters a temperature type, the output unit of the average, minimum and maximum values and PDF as the type of file. The user doesn’t want to save the current setting. 8. System calculates the report and shows it as a pdf document. Extension 2a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends 2b. User doesn’t have permissions to any site 1. System displays a message that there aren’t permitted sites for the selected client. 2. The use case ends 4a. There are no reportable units. 1. System displays a message that there are no reportable units for the selected client. 2. The use case ends 4b. User doesn’t have permissions to reportable unit 1. System displays a message that there aren’t permitted reportable units for the selected site. 2. The use case ends 7a User enters Excel as the file type of the report 1. System calculates the report and shows it as an excel document 7b User enters Excel Data only as the file type of the report 1. System calculates the report and shows it as an excel document. 7c User wants to save the current setting. 1. System saves the setting of the report (output unit of the flow volume and flow rate, time between records, low flow threshold, runtime and type of file) for the next time the user wants to run a report. This report takes all the data of the entered reportable unit, temperature type and time frame, calculating the flow volume, runtime and flow rate in the time frame or every day, week, month or year in the time period. The data is presented in the entered output units. Name Temperature report (Monthly) ID UC58 Primary actor Generic user Preconditions Actor must be logged in Activation User wants to run a monthly temperature report 64 Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site and the time frame of the report. 4. System presents the reportable units of the site, which the user has permissions to and have data for the time frame. 5. User enters a reportable unit. 6. System presents the temperature types the reportable unit keeps track of and its measurement units. 7. User enters a temperature type, the output unit of the time weighted average, time between records, threshold temperature, the max and min values is inactive, runtime (days, hours or minutes) and PDF as the type of file. The user doesn’t want to save the current setting. 8. System calculates the report and shows it as a pdf document. Extension 2a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends 2b. User doesn’t have permissions to any site 1. System displays a message that there aren’t permitted sites for the selected client. 2. The use case ends 4a. There are no reportable units. 1. System displays a message that there are no reportable units for the selected client. 2. The use case ends 4b. User doesn’t have permissions to reportable unit 1. System displays a message that there aren’t permitted reportable units for the selected site. 2. The use case ends. 8a User enters Excel as the file type of the report 1. System calculates the report and shows it as an excel document. 8b User enters Excel Data only as the file type of the report 1. System calculates the report and shows it as an excel document. 8c the max and min values is activated 1. The data taken to calculate the report is the average of the max and min values of the entered flow type. 7c .1a.There is not data for either the max or the min flow type. i) System displays a message, that there is no data. 65 ii) User case ends. 7c User wants to save the current setting. 1. System saves the setting of the report (output unit of the flow volume and flow rate, time between records, low flow threshold, runtime and type of file) for the next time the user wants to run a report. This report takes all the data of the entered reportable unit, temperature type and time frame, calculating the runtime, time weighted, maximum and minimum temperature in the time frame or every month in the time period. The data is presented in the entered output units. -The minimum and maximum temperature is the lowest and highest temperature above the threshold temperature set by the user. -The average temperature is the time weighted average. -The runtime is the time the flare is operating above the threshold temperature. 2.1.3.9 Missing data reports Name Missing data reports (daily, weekly, monthly, yearly) ID UC48 Primary actor Generic user Preconditions Actor must be logged in Activation User wants to run a daily, weekly, monthly or yearly missing data report Main success scenario 1. User enters a client uc Missing data reports Missing data Reports (Daily,weekly,monthly,yearly) Missing data report Generic user 66 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site and the time frame of the report. 4. System presents the reportable units of the site, which the user has permissions to and has data for the time frame. 5. User enters a reportable unit. 6. System presents the temperature and flow types the reportable unit keeps track of. 7. User enters a temperature or flow type, time between records, time output units (minutes, hours, days) and PDF as the type of file. The user doesn’t want to save the current setting. 8. System calculates the report and shows it as a pdf document Extension 2a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends 2b. User doesn’t have permissions to any site 1. System displays a message that there aren’t permitted sites for the selected client. 2. The use case ends 4a. There are no reportable units. 1. System displays a message that there are no reportable units for the selected client. 2. The use case ends 4b. User doesn’t have permissions to reportable unit 1. System displays a message that there aren’t permitted reportable units for the selected site. 2. The use case ends. 7a User enters Excel as the file type of the report 1. System calculates the report and shows it as an excel document. 7b User enters Excel Data only as the file type of the report 1. System calculates the report and shows it as an excel document. 7c User wants to save the current setting. 1. System saves the setting of the report (output unit of the flow volume and flow rate, time between records, low flow threshold, runtime and type of file) for the next time the user wants to run a report. Explanation This report calculates the missing data of a flare during a time frame. There is missing data between two data points or records when the time between them is more that the time entered by the user. The first column is the dates of the day, or week or month or year, the 67 second is the time present, the third is the time missing, the last one is the number of weeks in the year (just for the daily and weekly report). Name Missing data report ID UC49 Primary actor Generic user Preconditions Actor must be logged in Activation User wants to run a missing data report Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site and the time frame of the report. 4. System presents the reportable units of the site, which the user has permissions to and have data for the time frame. 5. User enters a reportable unit. 6. System presents the temperature and flow types the reportable unit keeps track of. 7. User enters a temperature or flow type, time between records and PDF as the type of file. The user doesn’t want to save the current setting. 8. System calculates the report and shows it as a pdf document. Extensions 2a. There are no sites. 1. System displays a message that there are no sites for the selected client. 2. The use case ends 2b. User doesn’t have permissions to any site 1. System displays a message that there aren’t permitted sites for the selected client. 2. The use case ends 4a. There are no reportable units. 3. System displays a message that there are no reportable units for the selected client. 4. The use case ends 4b. User doesn’t have permissions to reportable unit 1. System displays a message that there aren’t permitted reportable units for the selected site. 2. The use case ends. 7a User enters Excel as the file type pf the report 1. System calculates the report and shows it as an excel document. 7b User enters Excel Data only as the file type of the report 68 1. System calculates the report and shows it as an excel document. 7c User wants to save the current setting. 1. System saves the setting of the report (output unit of the flow volume and flow rate, time between records, low flow threshold, runtime and type of file) for the next time the user wants to run a report. Explanation This report calculates the missing data of a flare during a time frame. There is missing data between two data points or records when the time between them is more that the time entered by the user. The first and second columns are from date and to date of the event (missing or present data), the second column is the data present in hh:mm and the last one is the missing data in hh:mm. 2.1.3.10 Site report Name Site summary report ID UC62 Primary actor EIL generic user Preconditions Actor must be logged in Activation User wants to run a site summary report Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site 4. System generates the report and shows it as a pdf document. Extension This report shows the name of the site, fuel type, state, city, address, zip code, state Id, Owner issued id, Owner issued region, owner corporate name, owner name, client name, open and close date of the site and all its reportable units. For each reportable unit, this reports shows the unit name, type, fuel type, latitude, longitude, state Id, Backup (“yes” or “no”), statec, the uc Site Report Site summary report EIL generic user 69 start and stops date of the service and calculates the number of records. 2.1.3.11 Time shifted report Name Time shifted 2-5 minutes report ID UC60- UC601 Primary actor EIL generic user Preconditions Actor must be logged in Activation User wants to run a Time shifted 2 minutes report Main success scenario 1. User enters a client 2. System presents the sites of the selected client, which the user has permissions to. 3. User enters a site and the time frame of the report. 4. System presents the reportable units of the site, which the user has permissions to and have data for the time frame. 5. User enters a reportable unit. 6. System presents the pressure and temperature (barotroll and ruggetroll) data types the reportable unit keeps tracks of. 7. User enters a data type. 8. System calculates the report and shows it as an excel document. Extension This reports uses linear interpolation to interpolate temperature and pressure data every 2 or 5 minutes, in order to compare those parameters of different wells at the same time. uc Special reports Time Shifted 5 minutes report Time Shifted 2 minutes report EIL generic user 70 2.2 Data conceptual scheme An UML conceptual model is a diagram, which relates objects in the system domain to each other, defining concepts and terms. 71 Textual integrity constraints - If the Site open and close dates are known the open date is <= than the close date. - In a Reportable Unit, the start service date is <= that the stop service date. - In a Data Logger, the start service date is <= that the stop service date. - There can’t be a file with state “Rejected” or “Registered” and with records. External keys: - Year (year), for the rest of the classes (ID). Definitions: Illegal expression: string that contains a file on some rows and it is illegal because it’s not data. Item: column of the file to be uploaded, describes the physically measurement value and the unit. Record: it’s a line in the file. Automatic DST dates: they have to be the Daylight saving time dates of every year in the U.S territory. 72 2.3 Non-functional requirements 2.3.1 Look and feel requirements ID RNF01 Stakeholder Client, EIL employee. Description The application must be attractive to EIL employees and their clients. Rationale Could be a marketing strategy for potential clients. EIL employees will accept the application if it is attractive. Fit criterion User satisfaction 3 User dissatisfaction 4 ID RNF02 Stakeholder Client, EIL employee. Description The application must have the new EIL web site colors. Rationale It is important that the web site, the application and the company image have homogeneity. Fit criterion User satisfaction 4 User dissatisfaction 4 2.3.2 Usability and humanity requirements ID RNF03 Stakeholder Client, EIL employee. Description The application must be easy to understand and learn Rationale The application may not have complicated or not intuitive screens Fit criterion User satisfaction 4 User dissatisfaction 4 2.3.3 Performance requirements ID RNF04 Stakeholder EIL employee. 79 3.3 Use case view This view represents the most significant stages of the functionality that should cover the solution and also those that have architectural scope. uc Use Case Model Facility set up + EIL Admin + EIL generic user + Data Format Items (add,modify,delete) + Client (add, modify, delete) + Data Format (add,modify,delete) + Data Logger(add,delete, modify) + Delete ftp server configuration + folder path configuration(add,edit,delete) + Ftp server configuration (add,modify,delete) + Manage Clients + Manage data format Items + Manage Data formats + Manage Dataloggers + Manage ftp servers + Manage reportable units + Manage sites + Manual daylight saving time dates (add,modify,delete) + Manual DST dates (add, modify, delete) + Modify ftp server configuration + Reportable Unit (add,delete, modify) + Site (add,delete,modify) Data Entry + Clock + EIL generic user + EIL user + Download FTP files + List ftp servers + Manage FTP download schedule + Manual Entry (add, delete, modify) + Manual ftp download + Modify ftp server configuration + Scheduling ftp download (add,edit,delete) + Upload data from a single file + Upload file Data Deletion + EIL Admin + Data deleletion by file + Data deletion by time frame + Delete Duplicated Data + Large Block Data Deletion + Use Case1 Reporting + Flow Reports + Missing data reports + Operating Reports + Query reports + Site Report + Special reports + Temperature reports + Average Max Min Flow reports (Daily, weekly, monthly, yearly) + Avg, Max, Min Temp reports (Daily, weekly, monthly, yearly) + Daily Back Weighted Flow Report + Data chart + Data report + Flow Reports (Daily,weekly,monthly,yearly) + Missing data Reports (Daily,weekly,monthly,yearly) + Monthly temperature report + Multiple reportable Units data report (1-10 reportable units) + Site Summary Report + Temperature report + Time Shifted 2 minutes report + Time Shifted 5 minutes report + Uptime Downtime Reports (Daily,weekly,monthly,yearly) Administration + Client + EIL Admin + Eil generic user + Add permissions + Change password + Data Base Statistics Report + Ilegal Expressions (add) + Ilegal Expressions (delete) + Ilegal Expressions (modify) + Ilegal Expressions site (add, delete) + Manage permissions + Manage users + See log file + User (add, modify,delete) + User permissions (add, delete) Documents + EIL Admin + EIL user + Documents (add, modify,delete, view) 80 - Facility set up Functionality in which all the variables involved in the process of importing a file are configured. - Data Entry Feature that allows data input into the system either through files or manually. - Data Deletion Functionality that allows deletion of data from the system. - Reporting Functionality that allows analysis of data using specific algorithms and generate user-friendly reports. - Administration Functionality that allows the user to configured other users and manage the system. - Documents Feature in which EIL documents for the EPA are saved in order to facilitate tracking. 3.4 Package view This diagram shows the architecture of the application seen as layers where each layer provides specific functionality for a section of the system. The layers are organized to provide support and basic functionality to other layers and will help the user to understand how the information is organized. 81 Presentation tier: This tier uses a MVC (Model View Controller) framework provided by ASP.NET (winforms). The aspx file (View) is the file that contains all the code that the user sees on the browser. In addition, it receives user requests. The aspx.cs file (Controller) processes the actions of the aspx file and connects the presentation tier with the business tier (facades). pkg PackageDiagram Presentation Site Client DataFormat DataFromFile AutomaticData Business Web Services Queue Facades BLL Reports Data DAOS ADO.net ReportableUnit DataLogger Reporting DataDeletion DataManually Documents IllegalExpressions User «use» «use» 82 Business Tier: In this layer there are all the BLL (Business logic layer) classes. There is a BLL for each table in the data base. Each BLL will have methods for inserting, updating, deleting etc. from the respective table, and for applying the business rules. Besides, there is a web service and a queue class, which help the upload file process to be done. Data Tier: The Ado.net can be found in the Data Tier in an xsd type file called DataSet. In this file Table Adapters are created, which are objects that interact with the tables in the data base. Each table possesses a Table Adapter which contains the queries to access the table. Besides table adapters this tier has the DAOs (Data Access object), that interact with the tables in ways the table adapters. 3.5 Deployment view A diagram representing the implementation of logic and physical level conceptual architecture is presented that includes all physical and software and hardware components involved in the solution. 83 To understand the technologies that were used, please go to section 3.2 deployment Deployment Diagram «device» Rackspace cloud Server Daba Base SQL server 2008R2 Reporting services 2008R2 Aplication Server IIS .Net framework ADO.net «device» Client workstation Browser WCF ASP .net MSMQ (Microsoft Message Queuing) «use» «use» «use» «use» «use» «use» «use» https «use» 84 3.6 Analysis and Design 3.6.1 Class diagram In UML, class diagrams are one of six types of structural diagram. Class diagrams are fundamental to the object modeling process and model the static structure of a system. You can use several class diagrams to model the components of a system. [9] This diagram is the result of refining the data conceptual scheme. 85 Note:Due to the number of records contained in the t_Record table and queries to be made, it was decided that the table has a foreign key to t_MeasurementType, t_MeasurementUnit and t_DataLogger. 86 3.6.2 Data base diagram This diagram is the result of refining the data conceptual scheme and it has been adapted to a relational data base. 87 3.6.2.1 Physical design of the data base Table Partitions: The largest table in the data base is the t_Record table. Every time a user uploads a file it grows larger, and in time, it becomes more difficult to manage and query it. That is why it was decided to partition it. The Horizontal partition method was used, because the amount of rows grows continuously and it grows depending on one column (the reportable unit id column). The table is divided into 3 tables and each one of them contains the data of different reportable units. Indexes: The three t_Record tables have the following indexes: 1. IX_t_Main_DataLogger: datalloger Id 2. IX_t_Main_Deletion: Date, reportable unit and data type field. 3. IX_t_Main_FileId: File Id field 4. IX_t_Main_Group: Reportable unit and Date, including the data value, data units, data type and time zone of the date. 5. IX_t_Main_RecordNum: over the primary key record number. 6. IX_t_MainDate: date field. 3.6.3 Analysis after reverse engineering After analyzing and designing the use cases of the old code some bad designs were found. 88 Issue/Use Case Layer Note Decision UC 70, UC71 User permissions Data Base Bad design in the table t_Permission NO UC48-UC59 Reports Data Base Bad design in the table where the settings of the report are storage. t_OperatingReportsConfig, t_DataReportsConfig, NO UC09-UC12 Reportable Unit Data Base Bad design in the table t_MasterSiteRepUnit_TMainTableNa me NO Table Name Data base The name of the business concepts have change with the time and the name of the tables don’t explain what they are any more. Yes Table Partition Data Base/Busi ness layer T_Record table has to be divided into 3 tables due to the amount of data. The code has a lot of queries with the name of the table. The business layer has to find which table to use to insert, update, select or delete data. There was found one partition that was done incorrectly, then the code has to be corrected with a new flexible an understanding code. Yes A lot of business logic on the view Presentati on Most of the functionality has too much logic in the view classes. They can be moved to the business layer. Yes, but just in critical use cases Some old code is not being use and it is not working. All layers Some functionality is not being used, so a decision has to be made whether to delete it or fix it. NO Some patterns can be added to improve the functionality. Business layer Cache pattern, Service Locator. Yes, just the service locator pattern Façade patter is not been implemented very well Business layer There are too many facades. It can be grouped by functionality. Yes 95 3.6.6.3 New use cases to be implemented 3.6.6.3.1 UC43 Upload file Before, uploading a file was simple. The user selected the information including the file and then there was a method which was in charge of reading the file and generating a report with the errors, rejected data or a success message. The user waited, watching the screen for the report. Prior to the new requirements, this use case was used only by use case UC42. Afterwards it had to change in order to comply with the new requirements. uc Data Entry Upload data from a single file EIL generic user Manual ftp download Clock Download FTP files Upload file «extend» «extend» «extend» 96 Windows Service: It was decided to create a windows service and a message queue to receive the message for the different sources or ways to upload a file. Web Service It was decided to create a web service which is called by the windows service to upload a file into the data base. After validating and reading the file, the system sends an email to the user with the report of the process. sd UC43-UploadFileWindowsService Upload File Queue :FlareDB_QueueService UploadFileWebService message= unqueue() :String messageProcessing() uploadFile(fileId, dataFId, dataLogId, hourF, hourB, userId) 97 sd UC43-UploadFileWebService UploadFileWebServiceUploadFileQueue :FileBLL:DataEntryFacade :DataRecordDAO :EmailFileDAODataRecordBLL RepUnitxTRecordTableAdapter loop [for each line in the file] alt [If validate==True] [validate==False] loop [for each line in the file] alt [duplicatedDataFile==False] [dupliactedDataFile==true] alt [DupDataBase==false] [DupDataBase==true] uploadFile() validateFile() validate= validateFile() : Boolean validate= validateLine() :Boolean readFile() createTemporaryTable() insertTemporaryTable() duplicatedDataFile= thereIsDuplicatedDataIntheFile() : Booelan DupDataBase= thereIsDuplicatedDataIntheDataBase() insertTRecord_FromTemporaryTable(rec_unit, UserID) tableName= getTableByRec_Unit(rep_unit) :String insertTRecord_FromTemporaryTable(tableName, userId) updateStateFile("Loaded") sendEmail(user, sucess) updateStateFile("Rejected") updateStateFile("Rejected") deleteTemporaryTable() sendEmail(user, failure) 98 3.6.6.3.2 UC40 Download FTP Files New requirements were recently added to this project. The Files to be uploaded are in a remote ftp server that belongs to EIL’s clients. These files are generated every day with the data of the day. In order to reduce the amount of time that a user needs to upload a file every day, EIL wanted to automate this process. When a ftp download schedule is created a sql server job is created, too. The job will be executed depending on the time it was planned. It sends a message to the download ftp queue. Windows Service: Once the message arrives to the queue. It is processed, a windows service is in charge of download the files of the given time frame, registers them to the data base, saves them into the hard disk of the server and sends a message to the upload file queue to be uploaded. sd UC40-DownloadFTPFiles Clock SQLServerAgent StoreProcedureSendMSMQMessage DownloadFTPFilesQueue Sql job execute() execute() uspMSMQSend(message) 99 3.6.6.3.3 UC29-UC32 FTP Server Configuration In order to create a download schedule it is necessary to add and store the ftp servers and its paths. sd UC40-DownloadFTPFilesWindowsService DownloadFTPFilesQueue :Console Aplication UploadFileQueue :EmailService FtpService QueueService Ftp Sever WebService loop [for each file in the ftp server and time frame] alt [Not Exception] [Exception] loop [for each file downloaded] unqueue(message) downloadFiles() readFiles() OpenRead(path) sendSuccesfulMail() registerFile() renameFile() queue(message) queue(message) sendEmail(user, admin, failure) 100 sd UC29-ListFTPServerConfiguration Generic EIL user List Ftp server configuration :FacilitySetUpFacade FtpServerBLL FtpServerTableAdapter getAllClients() getSitesbyUser(clientId, userId) getFtpServerBySite(siteId) getFtpServerBySite(siteId) getFtpServerBySite(siteId) sd UC30-AddFTPServerConfig Generic EIL user Add Ftp server configuration :FacilitySetUpFacade FtpServerBLL FtpServerTableAdapter Ftp Server alt [connection== true] [connection== false] Connection Failed. Please be sure that the server exits addServerConfig(...) addServerConfig(...) connection= Connect(serverName, Password) :Boolean insert(...) 101 sd UC31-ModifyFTPServerConfig Generic EIL user Modify Ftp server configuration :FacilitySetUpFacade FtpServerBLL FtpServerTableAdapter Ftp Server alt [connection == true] [connection == false] Connection Failed. Please be sure that the server exits modifyServerConfig(serverId, ...) modifyServerConfig(serverId, ...) connection= Connect(serverName, Password) :Boolean update(serverId, ...) 102 3.6.6.3.4 UC33-UC35 FTP Server Path sd UC33-AddPathFTPServer Generic EIL user Add a folder path Screen FacilitySetUpScreen FTPServerBLL FTPFolderpathTableAdapter FtpServer alt [exists=true] [existsServer=true && !exists] [false] The path: ----- already exists The path doesn't exists in the server exists= exitsPath(path) :Boolean exists= exitsPath(path) :Boolean exitsts(path) existsSever= existsPathInServer(serverId, path) :Boolean existsPathInServer(serverid, path) connects(serverName, password, path) addPath(path, serverId) addPath(path, serverId) insert(path, serverId) 103 3.6.6.3.5 UC41 Manual FTP download This functionality will allow the user to manually download files from a ftp server without creating a schedule. sd UC34-ModifyPathFTPServer Generic EIL user Add a folder path Screen FacilitySetUpScreen FTPServerBLL FTPFolderpathTableAdapter FTPServer exists= exitsPathinServer(path) :Boolean exists= exitsPathinServer(path) :Boolean getServer(idServer) connect(serverName, password, path) ModifyPath(path, serverId) addPath(path, serverId) insert(path, serverId) sd UC35-DeletePathFTPServer Generic EIL user Delete a folder path Screen FacilitySetUpScreen FTPServerBLL FTPFolderpathTableAdapter delete(pathId) delete(pathId) delete(pathId) 104 sd UC41-ManualFTPdownload EIL generic user Manual FTP download :FacilitySetUpFacade :DataEntryFacade Ftp Download Queue getAllClients() getpermitedSites(clientId, userId) getPermitedRepUnits(siteid, userid) getDataFormats(rec_unitId) getDataLoggers(rec_unitId) getFtpServersBySite(siteId) getPathsByServer(serverId) download(....) queue(message) 111 because the worker works at home. TOTAL $21,280 Notes:  The server was already rented, so it doesn’t appear on the costs table.  The programmer doesn’t have the access to the information of the bill.  There is not an office because the programmer works at home. 112 6 Future Work This project doesn’t end with this thesis. The programmer (Paola Vera) will continue working for EIL. Since more work has to be done. This is a list of the things EIL wants to work on.  Stress testing over the T_Records tables, which are the most important tables.  Unit tests testing. Create unit test for every functionality on the application.  EIL wants to be able to automatize the manual uploading file process. The download ftp file module and how it works can fit this requirement because instead of having people uploading files, they can be saved in a ftp server and be downloaded automatically. This module has to be improved and extended.  Correcting all the defects that were found in the reverse engineering process.  Create a user manual for the new features.  Create a document with all the software documentation. 113 7 Conclusions Many companies do not understand the importance of each stage in the software development cycle, which is why many of these are sacrificed to reduce costs and delivery times. EIL did not see the need to comply with the requirements analysis, application design and unit testing, so many mistakes were made. The reverse engineering process allowed them to realize those mistakes, but the correction of them is much more difficult when the application is in production. It would have been easier and cheaper to fix if they had been found in earlier phases of software development, but these early stages were not made. Furthermore, the time for the correction of these defects was not fully contemplated therefore other tasks had to be postponed. On other hand, the reverse engineering of all use cases which are the specification, analysis and design, could be made. Also, the main defects could be corrected, allowing the application to be more flexible and adaptable to new requirements that may arise in the future. In addition, the new requirements were all documented and implemented and they are in production already. EIL is very satisfied with this new feature (download files from a ftp server and upload them into the data base). It saves time, effort and money. 114 Personally, it was very rewarding to help automate some processes of the company and make life easier for its employees. On the other hand, I was able to learn new technologies and ways to solve complex programming problems. 115 8 References [1] ] "EIL," [Online]. Available: http://www.eilllc.com/. [Accessed May 2015]. [2] IBM, "Rational Unified Process," [Online]. Available: https://www.ibm.com/developerworks/rational/library/content/03July/1000/1251/1251_bestpractices_TP026B.pdf. [Accessed May 2015]. [3] "Enterprise Architect," [Online]. Available: http://www.sparxsystems.com/products/ea/. [Accessed May 2015]. [4] "Application Server IIS," [Online]. Available. http://technet.microsoft.com/enus/library/cc725986.aspx. [Accessed May 2015]. [5] "WCF," [Online]. Available: http://msdn.microsoft.com/en-us/library/ms731082(v=vs.110).aspx. [Accessed May 2015]. [6] ".Net," [Online]. Available: http://en.wikipedia.org/wiki/.NET_Framework. [Accessed May 2015]. [7] "Asp.net," [Online]. Available: http://www.asp.net/. [Accessed May 2015]. [8] "Ado.net," [Online]. Available: http://msdn.microsoft.com/en-us/library/e80y5yhx(v=vs.110).aspx. [Accessed May 2015]. [9] "UML," [Online]. Available: http://pic.dhe.ibm.com/infocenter/rsarthlp/v9/index.jsp?topic=%2Fcom.ibm.xtools.modeler.doc%2Ftopics%2Fcclassd.html. [Accessed May 2015]. 116 9 APPENDIX 1. Back Weighted Flow Reports 1.1 Parameters Field Name Requir ed Type Restrictions Units Description Missing data time criteria x Numeri c Must be greater than 0. Minutes, hours or days based on user selection. It is maximum time between data points Flow data types x Text Flow data types. Records may or may not be present in the selected time period. None Flow data types of the selected reportable unit. Flow Volume Output Units x Text M3 stp MMSCF MSCF SCF The calculated flow volume will be shown in the user selected unit. Use the Min and Max Values x Text The user may check it when the selected flow data type is min or max. If it is unchecked won’t be averaging. None When the user checks it the flow values will be equal to the average of the min and max values. Low Flow Threshold Value x Numeri c Must be a numeric value SCFM It’s the minimum flow rate for which the flare is operational Flow Rate Output Units x Text M3 stp/day M3 stp/ hour M3 stp/minute SCFM The calculated flow rate will be shown in the user selected unit. Runtime x Text Minutes, Elapsed time of present data will 117 Hours or days based on user selection. be shown in the user selected unit. Generate Reports as x Text Excel file looks like the pdf report, but has unusual formatting. Excel Data just shows the data without odd formatting. -PDF -Excel -Excel Data -Excel Formulas* (* Back Weighted report) Provides the user with a choice of export file types. 1.2 Specification This is the algorithm specification. It tells us how the report works. For One Value Flow Rate Data Beginning of Period End of Period Time T0 T1 T2 T3 T4 T5 T6 T7 T8 Tn Data FR0 FR1 FR2 FR3 FR4 FR5 FR6 FR7 FR8 FRn Calculate T1 T2 T3 T4 T5 T6 T7 T8 Tn Calculate F1 F2 F3 F4 F5 F6 F7 F8 Fn Notes: n >= 1 Threshold = user select value below which the flow rate is not reliable FRn = FRn if FRn >= Threshold = 0 if FRn < Threshold = 0 if FRn does not exist T default = user select, typical 15 minutes Non exisitng Data/Time = exist if Tn - Tn-1 <= T default = not exist if Tn - Tn-1 > T default 118 = variable if Tn - Tn-1 > T default then Missing Data from Tn-default to Tn-1 Tn = Tn - Tn-1 if Tn and Tn-1 exist = T (default) if Tn-1 does not exist = 0 if Tn does not exist Period beginning = user select if the beginning of the reporting period does not fall on a recorded data point set T0 to be equal to the beginning of the reporting period. Period end = user select if the end of the reporting period does not fall on a recorded data point set Tn to be equal to the end of the period and extrapolate the flow rate from the closest flow data Fn = FRn * Tn Flow Volume = Sum of Fn Run Time = Sum of Tn Average Flow Rate = Flow / Run Time Period Time = Tend - T0 Average Period Flow Rate = Flow / Period Time