ICT Standards and Guidelines

Segment 202

Software Applications

Modeling Systems Using the UML

(Version 2.0)

Table of Contents – Modeling Systems Using the UML

1.0 Introducing Systems Modeling 1

1.1 The Construction Industry as a Role Model 1

1.2 Clarifying the Terminology 2

1.2.1 What is a Modeling Language? 2

1.2.2 What are Methods? 2

1.2.3 What is Methodology? 3

1.3 Why Should we Model Business Systems or Processes? 3

1.4 A Brief History of Modeling 3

1.5 What are the Main Uses of a Business Modeling Language? 4

1.5.1 Reverse Engineering 4

1.5.2 Improving the Organization’s Business Processes 5

1.5.3 Designing Information Systems 5

1.6 Examples of Business Modeling “Output” 5

1.7 How Does the UML Achieve the Above Aims? 5

1.8 Design Characteristics of the UML 6

1.9 The Applications of the UML 8

1.10 The Different Perspectives or Views of the UML 9

2.0 The Diagrams of the UML 10

2.1 Why Use Use Cases 11

2.2 The Use Case Diagram 11

2.2.1 What Are the Components of a Use Case Model? 12

2.2.2 Example: Description of an ATM Withdraw Cash Use Case 16

2.2.3 Example: The Log In Use Case for the ATM 17

2.3 The Class Diagram: Business Objects 18

2.3.1 The Notation of the Class Diagram 19

2.3.2 Examples of Class Diagrams 20

2.4 The Sequence Diagram (Applies to Use Cases) 23

2.5 The Collaboration Diagram (Applies to Use Cases) 27

2.6 The State Transition Diagram (Applies to Objects) 27

2.7 The Activity Diagram (Applies to Use Cases and to Objects) 29

2.8 The Implementation Diagrams 34

2.8.1 The Component Diagram 34

2.8.2 The Deployment Diagram 34

3.0 How to Use the UML in a Typical Software Engineering Process 35

3.1 Using the UML in the Segment 35

3.2 The Cycle of Analysis and Design 36

3.3 Initiation Phase: Modeling the AS IS or Current System Model 36

3.4 Initiation Phase: Identifying the Status of the Business Processes 36

3.5 Initiation Phase: Modeling the Analysis of Requirements 37

3.6 Initiation Phase: System Deployment 37

3.7 Planning Phase: Modeling the AS IS or Current System Model 38

3.7.1 Developing the Use Case Diagram (System Functions): 38

3.7.2 Developing the Class Diagram (Business Objects): 39

3.7.3 Additional Diagrams 39

3.7.4 Implementation Diagrams 40

3.8 Planning Phase: Modeling the Functional Design 40

3.9 Planning Phase: Modeling the Technical Design 41

3.10 Planning Phase: Finalizing the Implementation Diagrams 43

3.11 Building and Transition Phases 43

4.0 Template for Use Case Description 44

5.0 Where to Learn and How to Use the UML? 45


Figures – Modeling Systems Using the UML

Figure 1: The Diagrams of the UML 10

Figure 2: Use Case Diagram for an ATM 13

Figure 3: Using Extends in a Use Case Diagram 14

Figure 4: Using Generalization in Use Case Diagrams 15

Figure 5:The Class Diagram for Orders 20

Figure 6: The Class Diagram for Consulting Activities 21

Figure 7: The Class Diagram for a School 22

Figure 10: The Sequence Diagram for Adding a New Customer 26

Figure 11: The State Diagram for Placing Orders 28

Figure 12: Activity Diagram For Orders (Showing Objects) 31

Figure 13: Activity Diagram to Model a Method 32

Figure 14: Activity Diagram Showing Swimlanes by Object 33

1.0  Introducing Systems Modeling

The main purpose of Modeling is to use a graphic/textual or diagrammatic language to express or document the workings of business systems and processes. Such documentation can be used to:

·  Produce procedures manuals

·  Develop training material

·  Analyze systems and processes when attempting to improve them

·  Analyze systems or processes that are to be automated

·  Design workflows

·  Audit systems and procedures

·  Investigate troublesome areas in operations

Most of the above uses are of major importance to Software Engineering Processes. This includes the cases where an organization may acquire the software application off the shelf as well as when that application is to be developed, internally or externally.

1.1 The Construction Industry as a Role Model

Every business organization has the right to envy the Construction Industry which is very old. Throughout its 5000 years of experience, it developed a Modeling technique that resolved all its communications problems.

Architects and Engineers use a highly sophisticated modeling language (Technical Drawing) that expresses exactly how their new products are going to be built. On building the new Bridge or Power Station, engineers can document the product, modify it and update it. The basis of communication is the Technical Drawing, a language that has become an international industry standard. With this language, the customer, the developer (Architect), the builder (Contractor), the supplier and all stakeholders have a detailed and precise understanding of the final product. Furthermore, the Architect using the language, has a design tool in his hands that allows him to convert the requirements to a final technical design.

The Business World is very much behind. Up until the early 80’s, no significant language was found that could model a business process. Primitive flowcharts described workflow but were very far from useful because:

·  The flowcharts could not be used to build or rebuild a business process or system

·  There was no international standard to use

·  The flowcharts did not cover the whole process or business and where always short of the full description

·  The flowcharts were complex and could not be easily visualized

·  The flowcharts were too technical. Users could not understand them

·  The modeling techniques did not reflect the way the business “thought”

·  Modeling techniques, such as Data Flow Diagrams, reflected the way computers worked and not the way users saw their systems and processes.

This can lead to various disputes and misunderstandings.

1.2 Clarifying the Terminology

There are many modeling techniques that use the terms Language, Method and Methodology. There are major differences between these three terms and these should be clarified before introducing Business Modeling.

1.2.1  What is a Modeling Language?

A Language describes a Business System. It is used to communicate the Business System’s processes to the various stakeholders. Many languages can model the same system. A Language is therefore a means of expression and does not contribute to the way a business system or process works. It just describes them.

Examples of languages:

·  The construction sector uses technical drawings to define buildings and other constructs

·  The electronics industry has a special language to describe electronic circuitry. Using a circuit diagram allows the engineers to define the way an amplifier works.

·  The Unified Modeling Language (UML) to be described in later sections is a language used to express how a business or technical system works.

1.2.2  What are Methods?

Methods are the techniques used to take a System from one stage to the next. An architect produces a Drawing. The Drawing Standard is the Language he uses to communicate his designs. An architect designs a building by placing rooms together in a usable / pleasing way and making sure that the building follows engineering standards to be safe. How the architect designs the buildings is the engineering method. That is a technique. A method achieves a conversion. It takes a concept from one state to another.

Examples of methods:

·  An architect uses civil engineering principles to design a building. These principles are made up of various engineering methods.

·  An electronic engineer uses the principles of physics and electronics to design a mobile telephone. When designing such equipment, he uses engineering methods.

·  A Software Application designer uses a specific method to convert user Requirements to a Functional Design. The designer will also use other methods to convert the Functional Design to a Technical Design. Such methods as database design, interface design, etc, are all technical methods to be used when converting the required concepts to a final software product.

·  A Programmer uses a method to convert the Technical Specifications to Executable Code. This method is made up of programming principles and techniques.

·  A financial analyst uses Activity Based Costing as a method of assessing the costs of individual activities in an organization.

In software applications, how we go from requirement to code is made up of a set of methods. We need a language to communicate our interim thoughts and ideas.

Each one of these is a “Technology” or an “Engineering”. These technicians need a language to describe their systems.

1.2.3  What is Methodology?

Having identified a method, we need to describe to others. The description of the method is called a Methodology. Methodology is therefore a statement telling the stakeholders “How we plan to work” or “how or methods will be used”.

Example:

Language: we use the Entity Relationship Diagram to describe our database Structure. The ERD diagram is a language and results in a map showing all tables, their data elements and their relationships.

Method: we use the principles of Relational Database Management to design such databases (Codd’s rules on normalization, etc)

Methodology: to explain to a reader what Language and Method we are using.

1.3 Why Should we Model Business Systems or Processes?

We resort to modeling business systems and processes for the following reasons:

·  To understand and document existing systems

·  To design and build new systems and procedures

·  To communicate more effectively with: customers, users, contractors, owners and all other stakeholders

·  To concentrate on separate views of a system

·  Because we cannot understand complex systems in their entirety

·  Because modeling is cheaper, faster and more flexible than real life implementation

·  To reuse components of the model in other systems

·  Because the Mind can visual objects more easily than text

1.4 A Brief History of Modeling

In the early 80’s, the experiences and objectives of 3 major technologies converged:

·  Business Organization and Improvements techniques

·  Software Engineering Process Methodologies and

·  Object Oriented Programming

Towards the beginning of the 90’s, the major methodologists in these areas found themselves getting very close to each other.

They were all in search of methods that can make their work efficient, standardized and easy to learn. Many methods were developed and tried. Competitive standards arose each espoused by different industries and different cliques.

By the mid 80’s, the Object Management Group, a body that is concerned with the development of standards in the ICT industry, issued a Request for Proposal for a universal modeling language.

In a major and positive development, various competitors joined hands and started working together. The result was the Unified Modeling Language or the UML which was officially accepted by the Object Management Group towards the end of 1997.

The UML is therefore not a new “craze” but the product of years of cooperation, experience, consensus and maturity.

This language became the basis of Business Modeling. The UML itself is not a method. It is just a means of expressing the processes in a business system. It is a way of expressing or modeling systems without any imposition being made on the way these systems are designed or developed.

It can be seen that the UML was a product of:

·  Consensus

·  Cooperation

·  Experience and

·  Maturity

Today, the UML is being used in ICT applications, other business systems as well as technical environments (Design of technical equipment such as mobile phones, ATMs, etc).

1.5 What are the Main Uses of a Business Modeling Language?

A “Business System” or a “Business Process” is a set of procedures that covers a global objective within an organization. Examples of processes or business systems:

·  The Leave Planning and Control System is a process.

·  Purchasing from the time a material request is placed until the time that the goods arrive at the stores is another business system or process.

·  Requesting a loan is a process

·  The Human Resources Information System is a business system

·  The billing of power bills is a business system.

An organization can model its Business Systems and Processes for 3 main purposes:

1.5.1  Reverse Engineering

This is the documentation of the current situation of a Business System or its As Is status. From such a base line, an enterprise can document is processes and business flow. These models will have the following objectives:

·  To provide an official document that presents how the business operates

·  To allow analysts to understand the systems and how they operate

·  To train new staff or refresh existing staff on the procedures

·  To familiarize outsiders with the system (Auditors, Software experts, etc)

·  To use the As Is models to modify the systems and improve them

·  To use the As Is models as the basis for automating the processes

Reverse Engineering becomes the first step in the “Communications” process expressing the Business System or Process in clear models.

Note that Reverse Engineering can be used to document a system for the purpose of providing Procedure Manuals.

1.5.2  Improving the Organization’s Business Processes

Having modeled the As Is situation, the models provide a natural way of viewing the enterprise, a way which identifies the key or core processes in the business domains of interest. The management can then decide on how to improve such processes, redesigning them or designing new processes from scratch. Such methods as Total Quality Management, Business Process Reengineering, Activity Based Costing, the Balanced Scorecard measurement scheme, etc, require the use of clear and valid models before they can be used effectively.

1.5.3  Designing Information Systems

Again, Business Modeling techniques can be used to capture users’ requirements, going through analysis, design and development.

When designing a system, models are required to view the As Is processes and to convert them into the To Be processes. The design method in use for the particular system will require a language to express all interim documents and diagrams.

1.6 Examples of Business Modeling “Output”

Business Modeling can be used to produce the following: