paper

advertisement
DESIGN AND IMPLEMENTATION OF INFORMATION SYSTEM
FOR EVIDENCE OF CHEMICALS IN LABORATORY
TOMÁŠ VÁGOVIČ
Slovak University of Technology – Faculty of Materials Science and
Technology in Trnava, Paulínska 16, Trnava, Slovakia
e-mail: vagovic.tomas@gmail.com
Abstract: The goal of this report is to provide a closer look on my diploma thesis.
This paper is divided into five chapters. After a short introduction in the first chapter I
summarize objectives of my diploma thesis in chapter two. Then in the next part I describe
methods used for development of the information system. The fourth chapter includes the
software development process. It shows samples of diagrams used in my work such as
BPMN diagram, use case diagram and finally a physical data model. Then the main
application as a result of implementing is shown. In the last chapter I summarize my
results.
Keywords: evidence, chemicals, information system, BPMN, UML, database, MS
SQL, C#
1. Introduction
The terms process informatization and automation are becoming very popular lately.
They interfere with all parts of human life. In this age of systematic process
informatization, the information systems are slowly becoming a common part of every
company. Whether we talk about accountancy systems or some evidence systems known
as Transaction Processing Systems (TPS) or Enterprise Resource Planning (ERP). In order
to success, in bigger companies it is absolutely necessary to integrate a complex ERP
system (in order to support resource planning, decisions, data mining and many other
fields).
The chemical laboratories make no exception. Based on my research, there are existing
systems which cover all the necessary functions to run chemical laboratory, including
evidence of chemicals. These solutions contain many modules, but not all of them can be
used in a university chemical laboratory environment. In addition, price for this kind of
solutions is often very high and therefore not accessible for university chemical
laboratories. On the other hand, there are also freeware solutions, most of the time in a
form of a web application. They only cover basic evidence and have limited functions.
Because of this, evidence of chemicals in laboratories is often being made manually,
without using or even considering modern information systems which can be designed
exactly to meet all the necessary requirements.
The goal of my diploma thesis is to design and implement an information system,
which will be able to cover all the necessary evidence of chemicals at the Institute of safety
and
environmental
engineering
at
the
Faculty
of
Materials
Science
and
Technology in Trnava. This software makes possible to monitor all the used chemicals
with many details, including their availability, location, usage etc. It provides possibilities
to create lists of chemicals, reports and export these lists to EXCEL or PDF file. Using this
software, users will be able to create safety labels for chemicals, which have been precisely
designed. Safety lists of each chemical are securely stored in database.
2. Objectives
The main objective of my work is to design and implement an information system for
evidence of chemicals in laboratory. The thesis is divided into five chapters which need to
be elaborated. Diploma thesis can be then decomposed as follows:

Analyze business processes using BPMN and create a user requirement
specification document.

Create a model of the system using UML. This includes using diagrams such as use
case diagrams, state machine diagrams, sequence diagrams.

Create a data model of the system. This part involves creating class diagrams and
physical data model. After choosing DBMS I have to implement this data model.

Design a GUI and implement it in chosen programming language.

Elaborate the system documentation (security policy, test protocols).
3. Used methods
In this part I will summarize all the methods used to elaborate my diploma thesis. I will
describe software process model and also used modeling languages.
3.1 Evolutionary software process model
Software products can be perceived as evolving over a time period. The evolutionary
models take the concept of “evolution” into the engineering paradigm. Therefore
evolutionary models are iterative. They are built in a manner that enables software
engineers to develop increasingly more complex versions of the software [1].
The main features of this model are:

Not all the requirements are defined in the beginning of the process

Design, implementation, testing are realized simultaneously

Often used when a client is unable to define his requirements clearly ( “I cannot
tell you what I want, but I will know it when I see it”)
3.2 Modeling methods
In order to design an information system I have used different modeling methods
including BPMN and UML.
3.2.1
BPMN
The primary goal of BPMN is to provide a notation that is readily understandable by all
business users, from the business analysts that create the initial drafts of the processes, to
the technical developers responsible for implementing the technology that will perform
those processes, and finally, to the business people who will manage and monitor those
processes. Thus, BPMN creates a standardized bridge for the gap between the business
process design and process implementation [2].
BPMN provides a graphical notation for specifying business processes in a Business
Process Diagram (BPD), based on a flowcharting technique very similar to activity
diagrams from Unified Modeling Language (UML) [3][4].
3.2.2
UML
The objective of UML is to provide system architects, software engineers, and software
developers with tools for analysis, design, and implementation of software based systems
as well as for modeling business and similar processes [5].
The Unified Modeling Language (UML) offers a way to visualize a system's
architectural blueprints in a diagram. It is an industry standard modeling language with a
rich graphical notation, and comprehensive set of diagrams. UML 2 defines 14 diagrams
[5].
4. Development
In this chapter I will show the development process, which is divided into more parts.
All BPMN and UML diagrams are created using software Sparx Enterprise Architect 11. I
have chosen this software mostly because of my previous experience with this SW. The
main application is developed using Microsoft Visual C# 2010 Express, .NET Framework
4.0 and C# programming language. I am using Microsoft SQL Server as a relational
database management system (DBMS).
4.1 Business process analysis
My information system is targeted for a university chemical laboratory. I had to
analyze business processes in this laboratory and describe it using BPMN diagrams. I have
elaborated several BPMN diagrams to better understand all the processes. Then I created a
user requirement specification document.
Seller
Accepting delivery
Chemical receive
Chemical delivery to
the laboratory
reception
Buyer
Business Process Chemical receiv e
Pass the chemical on
to lab technician
Yes
Accepting chemical
Transfer the chemical
to the laboratory for
instant use
Fresh
chemical
Lab technician
No
Register chemical to
the paper notebook
Check security card
Transfer the chemical
to the storeroom
No
Security
card is
available
Yes
Attach security card
to the chemical
Fig. 1 BPMN Diagram – chemical receive
This is an example of BPMN diagram used in my diploma work. The process of
accepting and registering the chemical begins with delivering the chemical to the reception
by seller. After that, a person responsible for ordering this particular chemical goes to the
reception and accepts the chemical. Then the laboratory technician registers the chemical
to the paper notebook and checks if there is an available safety card. If so, this card is
attached to the chemical. Based on the freshness of the chemical, the technician transfers
the chemical to the laboratory or to the storeroom.
4.2 Model of the system – UML
My task in this part of the diploma work was to visualize the design of the application
using UML. After identifying all actors and use cases, I have created several use case
diagrams, activity diagrams, class diagram, state machine diagrams and sequence
diagrams. For illustration purposes I will show only selected diagrams.
uc UC02 Ev idence of chemical
UC02.01 Add new
chemical
UC02.06 Add
security signs
«extend»
«extend»
(from Structured UC)
(from Structured UC)
UC02.04
Recalculate amount
«extend»
«extend»
«extend»
«include»
(from Structured UC)
UC02.02 Edit
chemical
UC02 Chemical
ev idence
UC12 Check correct
data
«include»
«extend»
(from Structured UC)
User
«include»
UC10 Check empty
package
«include»
«extend»
UC02.05 Search
chemical
UC02.03 Delete
chemical
System
(from Structured UC)
(from Structured UC)
Fig. 2 Use case diagram - evidence of chemical
In the Fig. 2 there is an example of use case diagram I used to design my
information system. Use case diagrams show user’s interaction with the system. This
diagram shows the basic evidence of chemical. User has a choice to add a new chemical,
edit or delete a chemical. System is performing background operations such as correct data
check and empty package check.
act UC09.01 Export list of chemicals
User
System
Select row s to export
Select columns to export
[No]
Select export format
Export the chemical list
Are any rows or columns selected?
[Yes]
Open a w indow to select
path to the file
Close the
window
[Yes]
[Nie]
Cancel export
Confirm the path to the
file
Generate list
Sav e the file to the driv e
Fig. 3 Activity diagram - export list of chemicals
Activity diagram describes use case diagram as a sequence of activities. It is a
graphical representation of a use case diagram. This diagram shows all activities necessary
to generate list of chemicals. That is one of most used functions in this information system.
Next in my diploma work I created class diagram and additional sequence and statemachine diagrams.
4.3 Data model of the system
At this point I was able to create a data model of the system. It begins with creating a
class diagram. Then I transformed this diagram using SW Sparx Enterprise Architect and
created a physical data model of the system. This model shows the database with all tables,
connections, attributes and data types.
class DDL
pv eta
kbu
«column»
*PK cislo: nvarchar(20)
popis: nvarchar(max)
+
«column»
extension: nvarchar(5)
kbu: varbinary(max)
kbusize: bigint
*PK kbuID: int
«PK»
PK_pveta(nvarchar)
v zorecobr
+PK_pveta
1
+
+PK_kbu
+cislo 0..*
JoinchemikaliaTopv eta
«column»
FK cislo: nvarchar(20)
FK chemikaliaID: int
+
+
«PK»
PK_kbu(int)
1
«column»
vzorecobr: varbinary(max)
vzorecsize: bigint
*PK vzorecobrID: int
(kbuID = kbuID)
+
+PK_vzorecobr
«FK»
FK_JoinchemikaliaTopveta_chemikalia(int)
FK_JoinchemikaliaTopveta_pveta(nvarchar)
+
«column»
casnumber: nvarchar(20)
cena: nvarchar(20)
cobjednavky: nvarchar(30)
datumexp: nvarchar(10)
(chemikaliaID = chemikaliaID)
dodavatel: nvarchar(100)
JoinchemikaliaTohv eta
hmbrutto: decimal(10,3)
hmnadoby: decimal(10,3)
«column»
hmnetto: decimal(10,3)
FK cislo: nvarchar(20)
hustota: decimal(10,3)
FK chemikaliaID: int
iupacname: nvarchar(45)
+PK_chemikalia
«FK»
jednotka: nvarchar(5)
+
FK_JoinchemikaliaTohveta_chemikalia(int) +FK_JoinchemikaliaTohveta_chemikalia
jednotkamn: nvarchar(5)
1
+
FK_JoinchemikaliaTohveta_hveta(nvarchar) 0..*
miestnost: nvarchar(10)
mnozstvo: decimal(10,3)
+FK_JoinchemikaliaTohveta_hveta
0..*
(chemikaliaID = chemikaliaID)
molhmotnost: decimal(10,3)
nazov: nvarchar(50)
(cislo = cislo)
objednat: nvarchar(5)
pikto1: nvarchar(5)
+PK_hveta
1
pikto2: nvarchar(5)
+PK_chemikalia 1
pikto3: nvarchar(5)
hv eta
pikto4: nvarchar(5)
pikto5: nvarchar(5)
«column»
pikto6: nvarchar(5)
*PK cislo: nvarchar(20)
pikto7: nvarchar(5)
popis: nvarchar(max)
pikto8: nvarchar(5)
+PK_chemikalia
pikto9: nvarchar(5)
«PK»
regal: nvarchar(10)
1
+
PK_hveta(nvarchar)
rezervacia: nvarchar(5)
(chemikaliaID = chemikaliaID)
skrina: nvarchar(20)
vyradenie: nvarchar(5)
vzorec: nvarchar(30)
+FK_JoinchemikaliaToeuh_chemikalia 0..*
zaradenie: nvarchar(50)
zdroj: nvarchar(100)
JoinchemikaliaToeuh
zosoba: nvarchar(45)
*PK chemikaliaID: int
«column»
*FK
vzorecobrID: int
FK cislo: nvarchar(20)
*FK kbuID: int
FK chemikaliaID: int
«FK»
+
FK_JoinchemikaliaToeuh_chemikalia(int)
+
FK_JoinchemikaliaToeuh_euh(nvarchar)
+FK_JoinchemikaliaToeuh_euh
0..*
(cislo = cislo)
1
«PK»
PK_rveta(nvarchar)
chemikalia
0..*
+
«PK»
PK_chemikalia(int)
+
+
«FK»
FK_chemikalia_vzorecobr(int)
FK_chemikalia_kbu(int)
+PK_rveta
(vzorecobrID = vzorecobrID)
1
«FK»
(cislo = cislo)
+FK_JoinchemikaliaTorveta_rveta 0..*
+FK_chemikalia_vzorecobr
JoinchemikaliaTorv eta
1..*
«column»
FK cislo: nvarchar(20)
+FK_JoinchemikaliaTorveta_chemikalia
FK chemikaliaID: int
+
0..* +
«FK»
FK_JoinchemikaliaTorveta_chemikalia(int)
FK_JoinchemikaliaTorveta_rveta(nvarchar)
(chemikaliaID = chemikaliaID)
+PK_chemikalia
1
+PK_chemikalia
(chemikaliaID = chemikaliaID)
1
0..*
+FK_JoinchemikaliaTosveta_chemikalia
JoinchemikaliaTosv eta
«column»
FK cislo: nvarchar(20)
FK chemikaliaID: int
+
+
«FK»
FK_JoinchemikaliaTosveta_chemikalia(int)
FK_JoinchemikaliaTosveta_sveta(nvarchar)
+FK_JoinchemikaliaTosveta_sveta
+PK_chemikalia
0..*
(cislo = cislo)
1
(chemikaliaID = chemikaliaID)
+PK_sveta
«FK»
1
euh
«column»
*PK cislo: nvarchar(20)
popis: nvarchar(max)
+
rv eta
«column»
*PK cislo: nvarchar(20)
popis: nvarchar(max)
+FK_chemikalia_kbu 1..*
+FK_JoinchemikaliaTopveta_chemikalia
+PK_euh
«PK»
PK_vzorecobr(int)
«FK»
«PK»
PK_euh(nvarchar)
1
sv eta
+FK_pouzitie_chemikalia
0..*
pouzitie
«column»
datum: nvarchar(10)
meno: nvarchar(45)
mnozstvo: decimal(10,3)
*PK pouzitieID: int
FK chemikaliaID: int
+
«PK»
PK_pouzitie(int)
+
«FK»
FK_pouzitie_chemikalia(int)
«column»
*PK cislo: nvarchar(20)
popis: nvarchar(max)
+
«PK»
PK_sveta(nvarchar)
Fig. 4 Physical data model
After creating a physical data model, I was able to generate a SQL script and create
a database using Microsoft SQL Server Management Studio.
4.4 Application
After database was created, I could start to work on a final phase of the development
which is creating an application. I started with the design of user interface and then I added
functions. The result of my work is shown in the Fig. 5.
Fig. 5 The main window of application (beta version)
Functions overview:
The main window of application shows the list of the chemicals with all necessary
details such as Name, Formula, Weight (brutto, netto), Location (room), Molecular weight,
date of last change and many more. There is a possibility to recalculate the amount of
chemical using its density and volume. Then user can go to another card and see more
details – such as order number, expiration date, price, etc. User can search chemical by
chosen parameter. On the other card there is a menu for attaching files to the chemical
(picture of formula, safety card), details of usage, safety information. In usage card, user
can see who used the chemical, when it was used and the amount used. If the amount of
chemical is equal to zero, the chemical is automatically marked as “to discard”. Export
menu is located on the right side. It is possible to select which rows and columns should be
exported to a file. User can choose an export format and there is also a button for
generating a label for chemical together with available sizes (formats). Rows of the table
might have different colors – based on attributes of the chemical (reserved, to order, to
discard). The application (database) also stores a list of safety warnings which can be
added to chemical. Double-click on each chemical shows a window with quick overview
of safety information – warnings, safety signs.
5. Results
I started my diploma work with describing business process models using BPMN.
Then using UML I created all necessary diagrams to support development. With creating a
physical data model it was easy to generate a SQL script and create the database in chosen
DBMS. The next step was to implement the application in chosen programming language,
which is C#. The system documentation together with security policy and testing protocols
will be elaborated, when the development and testing is complete.
The application is still being developed, but currently it is stable and functional. I am
really looking forward to finish it and see how customers (employers of chemical
laboratory) will use it. I really hope it will be helpful and makes everyday handling with
chemicals much easier. Since this application is part of my diploma work, total cost for its
using are equal to zero. This is a big advantage over similar products.
References
1. Evolutionary Software Process Model. [Internet]. [cited 2015 February 27].
Available
from:
http://it.toolbox.com/wiki/index.php/Evolutionary_Software_Process_Model
2. OMG: BUSINESS PROCESS MODELING NOTATION SPECIFICATION.
[Internet]. February 2006 [cited 2015 March 03]. Available from:
http://www.omg.org/bpmn/Documents/OMG_Final_Adopted_BPMN_10_Spec_06-02-01.pdf
3. An XML Representation for Crew Procedures, Richard C. Simpson (2004), Final
Report NASA Faculty Fellowship Program (Johnson Space Center)
4. Process Modeling Notations and Workflow Patterns, paper by Stephen A. White of
IBM Corporation (2006)
5. OMG:
UNIFIED
MODELING
LANGUAGETM
(OMG
UML),
SUPERSTRUCTURE. [Internet]. May 2010 [cited 2015 March 10]. Available
from: http://www.omg.org/spec/UML/
Download