0% found this document useful (0 votes)
11 views40 pages

06第6章-过程建模

Chapter 6 of 'Systems Analysis and Design' focuses on process modeling, particularly through data flow diagrams (DFDs). It explains key definitions, the structure of DFDs, and the hierarchy of diagrams from context to level 2. The chapter emphasizes the importance of accurately representing business processes and validating DFDs to ensure completeness and correctness.

Uploaded by

xjz19980901
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views40 pages

06第6章-过程建模

Chapter 6 of 'Systems Analysis and Design' focuses on process modeling, particularly through data flow diagrams (DFDs). It explains key definitions, the structure of DFDs, and the hierarchy of diagrams from context to level 2. The chapter emphasizes the importance of accurately representing business processes and validating DFDs to ensure completeness and correctness.

Uploaded by

xjz19980901
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Systems Analysis and Design

Process Modeling
过程建模

Chapter 6

参考资料来源:《Systems Analysis & Design(Third Edition)》Alan


Dennis, Barbara Haley Wixom, and Roberta Roth John Wiley & Sons,
Inc.

《软件系统分析与设计》硕士课程
6-1 Copyright 2021©软件工程系. All rights reserved.
Key Definitions
Process model 过程模型
A formal way of representing how a business
system operates(表示业务系统运行的一种形
式化方法)
Illustrates the activities that are performed and
how data moves among them(展示了系统执行
的过程或活动,以及数据在它们之间是如何
流动的)
Data flow diag ramming 数据流图DFD
A common technique for creating process models
《软件系统分析与设计》硕士课程
6-2 Copyright 2021 ©软件工程系. All rights reserved.
Key Definitions
Logical process models describe
processes without suggesting how they
are conducted (逻辑过程模型独立于
任何技术实现来描述系统)
Physical process models provide
information that is needed to build the
system (物理过程模型提供最终构建
系统所需的重要信息)
《软件系统分析与设计》硕士课程
6-3 Copyright 2021 ©软件工程系. All rights reserved.
DATA FLOW DIAGRAMS
数据流图(DFD)

《软件系统分析与设计》硕士课程
6-4 Copyright 2021©软件工程系. All rights reserved.
Reading a DFD
取消确认 期望的预约确认
病人 预约选择
潜在预约

病人
资料

病人姓名 验证病人 安排预约的


1.1 1.2 1.3 1.5
创建预约 获取病人姓名
和地址 资料 病人的姓名
检查病人状态 获取预约类型 安排预约时间
修改预约 和地址

取消预约 病人
状态
病人
姓名 取消预 有效 安排
约的病 的预 有效 安排 新的
人姓名 约请 的 预约 预约
D1 病人 求 预约 时间 时间

1.4 被取消的预约
现有的预约
D2 预约
取消预约

《软件系统分析与设计》硕士课程
6-5 Copyright 2021 ©软件工程系. All rights reserved.
Elements of a DFD
数据流图的基本元素
1.1

Process 过程 获取病人姓名
和地址

An activity or function performed for a specific business


reason 为特定业务原因而执行的活动或功能
Manual or computerized 过程可以是人工或计算机化的
Data flow 数据流
A single piece of data or a logical collection of data 单个
数据(如病人姓名)或一些信息的逻辑组合(如病人
信息)
Always starts or ends at a process 总是流出(起)或是
流入(终)一个过程
病人
资料

《软件系统分析与设计》硕士课程
6-6 Copyright 2021 ©软件工程系. All rights reserved.
DFD Elements
Data Store 数据存储 D2 预约

A collection of data that is stored in some way 以某种方式存


储的数据集合(存储方式在创建物理模型的时候决定)
Data flowing out is retrieved from the data store(从数据存
储流出的数据流显示的是从数据存储检索信息)
Data flowing in updates or is added to the data store(流入数
据存储的数据流代表的是数据存储到数据存储中或是修
改在数据存储中的数据)
External entity 外部实体
A person, organization, or system that is external to the
system but interacts with it. (位于系统范围之外,但与正
在被研究的系统交互的人、组织部门或是其他系统)
《软件系统分析与设计》硕士课程
6-7 Copyright 2021 ©软件工程系. All rights reserved.
Naming and Drawing DFD
Elements

Process

Data flow

Data store

External
entity
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
6-8 Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
Using a DFD to Define Business
Processes
Business processes are too complex to be
shown on a single DFD
Decomposition is the process of
representing the system in a hierarchy of
DFD diagrams
Child diagrams show a portion of the parent
diagram in greater detail

《软件系统分析与设计》硕士课程
6-9 Copyright 2021 ©软件工程系. All rights reserved.
Key Definition
Balancing involves insuring that
information presented at one level of a
DFD is accurately represented in the next
level DFD.

《软件系统分析与设计》硕士课程
6 - 10 Copyright 2021 ©软件工程系. All rights reserved.
Relationship among Levels of
DFDs
0
Context X
Context diagram Diagram Entity A Y
Information
System
Z
Entity B

X
Level 0 DFD Entity A 1 Process T Entity B

Level 0 diagram Y
B Z
M
A
D1 Data Store N N 2 Process U 3 Process V

Level 1 DFD B J
For Process 2 2.1 Process D

Level 1 diagram M G A
D1 Data Store N 2.2 Process E 2.3 Process F
N C Y

Level 2 DFD K G
For Process 2.2 2.2.1 Process K
Q
Level 2 diagram H
2.2.2 Process L R
S
N C
D1 Data Store N M 2.2.3 Process M

《软件系统分析与设计》硕士课程
6 - 11 Copyright 2021 ©软件工程系. All rights reserved.
Context Diagram
(上下文图)
First DFD in every business process
Shows the context into which the business
process fits
Shows the overall business process as just
one process (process 0)
Shows all the external entities that receive
information from or contribute information to
the system
《软件系统分析与设计》硕士课程
6 - 12 Copyright 2021 ©软件工程系. All rights reserved.
Level 0 Diagram
Shows all the major processes that comprise
the overall system – the internal components
of process 0
Shows how the major processes are
interrelated by data flows
Shows external entities and the major
processes with which they interact
Adds data stores
《软件系统分析与设计》硕士课程
6 - 13 Copyright 2021 ©软件工程系. All rights reserved.
Level 1 Diagrams
Generally, one level 1 diagram is created for every
major process on the level 0 diagram
Shows all the internal processes that comprise a single
process on the level 0 diagram
Shows how information moves from and to each of
these processes
If a parent process is decomposed into, for example,
three child processes, these three child processes
wholly and completely make up the parent process

《软件系统分析与设计》硕士课程
6 - 14 Copyright 2021 ©软件工程系. All rights reserved.
Level 2 Diagrams
Shows all processes that comprise a single process on
the level 1 diagram
Shows how information moves from and to each of
these processes
Level 2 diagrams may not be needed for all level 1
processes
Correctly numbering each process helps the user
understand where the process fits into the overall
system

《软件系统分析与设计》硕士课程
6 - 15 Copyright 2021 ©软件工程系. All rights reserved.
Alternative Data Flows
Where a process can produce different data flows
given different conditions
We show both data flows and use the process
description to explain why they are alternatives
Tip -- alternative data flows often accompany
processes with IF statements

《软件系统分析与设计》硕士课程
6 - 16 Copyright 2021 ©软件工程系. All rights reserved.
Your Turn
At this point in the process it is easy to lose track of
the “big picture”.
Describe the difference between data flows, data
stores, and processes.
Describe in your own words the relationship between
the DFD and the ultimate new application being
developed.

《软件系统分析与设计》硕士课程
6 - 17 Copyright 2021 ©软件工程系. All rights reserved.
Process Descriptions
Text-based process descriptions provide more
information about the process than the DFD alone
If the logic underlying the process is quite complex,
more detail may be needed in the form of
Structured English
Decision trees
Decision tables

《软件系统分析与设计》硕士课程
6 - 18 Copyright 2021 ©软件工程系. All rights reserved.
CREATING DATA FLOW
DIAGRAMS

《软件系统分析与设计》硕士课程
6 - 19 Copyright 2021©软件工程系. All rights reserved.
Integrating Scenario Descriptions
DFDs start with the use cases and
requirements definition
Generally, the DFDs integrate the use cases
Names of use cases become processes
Inputs and outputs become data flows
“Small” data inputs and outputs are combined
into a single flow

《软件系统分析与设计》硕士课程
6 - 20 Copyright 2021 ©软件工程系. All rights reserved.
Steps in Building DFDs
Build the context diagram
Create DFD fragments for each use case
Organize DFD fragments into level 0 diagram
Decompose level 0 processes into level 1 diagrams as
needed; decompose level 1 processes into level 2
diagrams as needed; etc.
Validate DFDs with user to ensure completeness and
correctness

《软件系统分析与设计》硕士课程
6 - 21 Copyright 2021 ©软件工程系. All rights reserved.
Creating the Context Diagram
Draw one process representing the entire
system (process 0)
Find all inputs and outputs listed at the top of
the use cases that come from or go to external
entities; draw as data flows
Draw in external entities as the source or
destination of the data flows

《软件系统分析与设计》硕士课程
6 - 22 Copyright 2021 ©软件工程系. All rights reserved.
A Context Diagram Example
Patient
Information
Changes to patient Appointment
information report

Potential
0
appointments
Patient Patient report
Patient Selected
Doctor
appointment
Information
Existing System
appointment
Financial reports
Bill
Payment
information Payment
Bill information

Insurance
Company
《软件系统分析与设计》硕士课程
6 - 23 Copyright 2021 ©软件工程系. All rights reserved.
Creating DFD Fragments
Each use case is converted into one DFD
fragment
Number the process the same as the use case number
Change process name into verb phrase
Design the processes from the viewpoint of the
organization running the system

《软件系统分析与设计》硕士课程
6 - 24 Copyright 2021 ©软件工程系. All rights reserved.
Creating DFD Fragments(Cont.)
Add data flows to show use of data stores as
sources and destinations of data
Layouts typically place
processes in the center
inputs from the left
outputs to the right
stores beneath the processes

《软件系统分析与设计》硕士课程
6 - 25 Copyright 2021 ©软件工程系. All rights reserved.
A DFD Fragment Example
Appointment Confimation

Potential Appointment

Patient Name/Address

Desired Appointment 1
Patient
Make Appointment
Selected Appointment

Appointment to
Change/Cancel

Patient Available Scheduled


Status Patient Appointment Appointment
Name

D1 Patients D2 Appointment

《软件系统分析与设计》硕士课程
6 - 26 Copyright 2021 ©软件工程系. All rights reserved.
Creating the Level 0 Diagram
Combine the set of DFD fragments into one
diagram
Generally move from top to bottom, left to
right
Minimize crossed lines
Iterate as needed
DFDs are often drawn many times before
being finished, even with very experienced
systems analysts
《软件系统分析与设计》硕士课程
6 - 27 Copyright 2021 ©软件工程系. All rights reserved.
A Level 0 DFD Example
Appointment Confirmation
Potential Appointment

Patient Name/Address
1
Desired Appointment
Patient Selected Appointment
Make Patient Patient
Bill Payment
Appointment to Appointment Information
Change/Cancel
Patient Scheduled
Available
Changes Status Patient Name Appointment
Appointment
to Patient
Patient D2
Name
Informati D1 Patient
on Appointments
Current Completed
Patient Information Appointment
Patient Appointment
Information
3
2 4 Perform Billing
Maintain Updated Prepare
Patient
Patient Info Information
Management Payment
Reports Method
Bill
Patient Insurance
detail
Report Appointment Billing Payment
Reports Information
Information Insurance
Financial Bill
Reports
Insurance
Doctor D3 Billing
Company

《软件系统分析与设计》硕士课程
6 - 28 Copyright 2021 ©软件工程系. All rights reserved.
Creating Level 1 Diagrams (and Below)

Each use case is turned into its own DFD


Take the steps listed on the use case and depict
each as a process on the level 1 DFD
Inputs and outputs listed on use case become
data flows on DFD
Include sources and destinations of data flows to
processes and stores within the DFD
May also include external entities for clarity

《软件系统分析与设计》硕士课程
6 - 29 Copyright 2021 ©软件工程系. All rights reserved.
Creating Level 1 Diagrams (and Below)
When to stop decomposing DFDs?
Ideally, a DFD has at least three processes
and no more than seven to nine.

《软件系统分析与设计》硕士课程
6 - 30 Copyright 2021 ©软件工程系. All rights reserved.
Validating the DFD
Syntax errors – diagram follows the rules
Assure correct DFD structure
For each DFD:
Check each process for:
A unique name: action verb phrase; number; description
At least one input data flow
At least one output data flow
Output data flow names usually different than
input data flow names
Between 3 and 7 processes per DFD

《软件系统分析与设计》硕士课程
6 - 31 Copyright 2021 ©软件工程系. All rights reserved.
Validating the DFD
For each DFD:
Check each data flow for:
A unique name: noun; description
Connects to at least one process
Shown in only one direction (no two-headed arrows)
A minimum number of crossed lines
Check each data store for:
A unique name: noun; description
At least one input data flow
At least one output data flow
Check each external entity for:
A unique name: noun; description
At least one input or output data flow

《软件系统分析与设计》硕士课程
6 - 32 Copyright 2021 ©软件工程系. All rights reserved.
Validating the DFD
Across DFDs:

Context Diagram:
Every set of DFDs must have one Context Diagram

Viewpoint:
There is a consistent viewpoint for the entire set of DFDs
Decomposition:
Every process is wholly and complete described by the
processes on its children DFDs
Balance:
Every data flow, data store, and external entity on a higher level
DFD is shown on the lower level DFD that decomposes it
No data stores or data flows appear on lower-lever DFDs that do
not appear on their parent DFD

《软件系统分析与设计》硕士课程
6 - 33 Copyright 2021 ©软件工程系. All rights reserved.
Validating the DFD
Semantics errors – diagram conveys correct meaning
Assure accuracy of DFD relative to actual/desired
business processes
To verify correct representation, use
User walkthroughs(用户走查)
Role-play processes(基于角色的过程)
Examine lowest level DFDs to ensure consistent
decomposition
Examine names carefully to ensure consistent use of
terms
《软件系统分析与设计》硕士课程
6 - 34 Copyright 2021 ©软件工程系. All rights reserved.
A Quick Review of Decomposition for
CD Selections

《软件系统分析与设计》硕士课程
6 - 35 Copyright 2021 ©软件工程系. All rights reserved.
Context Diagram for CD Selections
Internet Sales System
Vendor

Vendor
Vendor
Search Request Marketing
Information
Material
CDs Matching Search
CD Inform action Request
CD Information
Approved Marketing
Marketing Material 0 Material
Zip Code Marketing
Customer Internet
CDs to Request Manager
System Reports
Customer Information
CDs Requested Hold Request Alert

In-store Hold Confirmation


Special
Special Order Confirm action Hold Label
Order

Hold Confirmation

Special Order
System In-Store Staff

《软件系统分析与设计》硕士课程
6 - 36 Copyright 2021 ©软件工程系. All rights reserved.
Level 0 DFD for CD Selections
Internet System
D2 Inventory D2 Inventory
Vendor Marketing Approved Marketing Marketing
Vendor Information Material Material Reports
Special Order
Search Request
System
Summary CD Information

CDs Matching Search D2 Inventory


CD Inform action Request CD
CD Information Marketing
CD Information
Material
Marketing Material 0 Marketing Material
Zip Code
Customer Internet D3 Marketing
CDs to Request
System
Customer Information
CDs Requested CD Inventory
In-Store Hold
In-store Hold Confirmation Special
Order
Special Order Confirm action In-Store Staff
D2 Inventory
Special Order Hold Hold Status
System Request Confirmation
3 Inventory
Process Adjustment

Hold Request
In-Store
Alert Holds
Hold Label
In-Store Staff Hold Confirmation

《软件系统分析与设计》硕士课程
6 - 37 Copyright 2021 ©软件工程系. All rights reserved.
Level 1 DFD for CD Selections Process
1: Take Requests
Search Request

CDs Matching Search


1.1 Basic CD Information
Find CDs
D1 CD Information
CD Information Request
Detailed CD Information
1.2
Detailed CD Information
Provide CD Marketing Material
D3 Marketing
Marketing Material
Information

Zip Code
1.3
Customer Find Stores
CD Inventory
D2 Inventory
CD Availability by
Store

CDs to Request 1.4


CDs to Requested Place CD in
Shopping Cart
In-Store Hold
D4 In-Store Hold
CDs Requested Summary
Customer Information 1.5
In-Store Hold Confirmation
Special Order Confirmation Check Out
Special Order
Special Order System

《软件系统分析与设计》硕士课程
6 - 38 Copyright 2021 ©软件工程系. All rights reserved.
Summary
The Data Flow Diagram (DFD) is an essential
tool for creating formal descriptions of business
processes.
Use cases record the input, transformation, and
output of business processes and are the basis for
process models.
Eliciting use cases and modeling business
processes are critically important skills for the
systems analyst to master.
《软件系统分析与设计》硕士课程
6 - 39 Copyright 2021 ©软件工程系. All rights reserved.
作业
以美团外卖订餐为例,给出:
(1)需求定义报告(功能需求、非功能需求);
(2)在(1)的基础上给出订餐的用例模型(用例图
和用例规约);
(3)在(2)的基础上给出订餐数据流图。
说明:
美团外卖订餐平台可选网页版或手机版;
建模工具可选Visio;
用例规约可按照教材给出的用例模板或RUP用例规约模板进
行编写。

《软件系统分析与设计》硕士课程
6 - 40 Copyright 2021 ©软件工程系. All rights reserved.

You might also like