Upload
amritarupini
View
225
Download
0
Embed Size (px)
Citation preview
7/30/2019 PSCPEC4 Verygood
1/44
Lecture Note 10
Describing Process Specifications
and Structured Decisions
Systems Analysis and Design
Kendall & Kendall
Sixth Edition
Part III: The Analysis Process
7/30/2019 PSCPEC4 Verygood
2/44
2
Major Topics
Process Specifications
Business Rules
Structured English
Decision Tables
Decision Trees
Horizontal Balancing
7/30/2019 PSCPEC4 Verygood
3/44
3
Process Specifications
What occurs within a process? How are the input data converted to
the output information? Since DFD are not really designed toshow the detailed logic of process.
Process specifications () are created for
processes and some higher level processes on a
DFD. They are also called minispecs. Explain :
the Decision-Making Logic,
Business Logic and
Formulas that will transform process input
data into output.
Each derived () element must have process
logic to show how it is produced from the base
elements.
1
?
7/30/2019 PSCPEC4 Verygood
4/44
4
Goal of Creating Process Specifications
1. To reduce the ambiguity () of the process. Compels () the SA to learn details about how the
process works.
Any vague () areas should be noted, writtendown, and consolidated () for all process
specifications.2. To obtain a precise () description of what is
accomplished ().
3. To validate () the system design, including data
flow diagrams and the data dictionary. Ensures () that a process has all the input data flow
necessary for producing the output.
All input and output must be represented on the DFD.
7/30/2019 PSCPEC4 Verygood
5/44
5
Process specifications are not created for:
Processes that represent physical input or
output, e.g. read, write. (Require only simplelogic).
Processes that represent simple data validation
(easy to accomplish). The edit criteria () areincluded in the data dictionary and
incorporated () into the computer source
code.
Processes that use prewritten () code(included in a system as subprograms and functions).
E.g. validating a date or a check digit.
7/30/2019 PSCPEC4 Verygood
6/44
6
Data Flow Diagram and Process Specifications
The system analyst
approaching processspecifications and
structured decisions
has many options for
documenting andanalyzing them. The
methods available for
documenting and
analyzing the logical of
decisions include
Structured English,
Decision Tables and
Decision Tree.
7/30/2019 PSCPEC4 Verygood
7/44
7
Process Specification Format
Process specifications link the process to the DFD and thedata dictionary. Each process specification should beentered on a separate form. (or into a case tool screen such as theone used for Visible Analyst)
The following information should be entered:
The process number, which must match the process IDon the DFD. This specification allows SA to work on orreview any process and easily locate the DFDcontaining the process.
Process name, the same as the name displayed withinthe process symbol on the DFD.
A briefdescription of what the process accomplishes.
7/30/2019 PSCPEC4 Verygood
8/44
8
A list of input and output data flow, using the namesfound on the DFD. Data names used in the formula orlogic should match those in the data dictionary to
ensure consistency and good communication. The Output data flows, using DFD and data dictionary
names.
An indication if the type of process: Batch (), On-line or Manual. All on-line processes require screen
designs, and all manual processes should have well-defined procedures for employees performing () the
process tasks.
If the process uses prewritten code, include the name of
the subprogram or function containing that code. Data names used in the formulae or logic should matchthe data dictionary, for consistency and goodcommunication.
7/30/2019 PSCPEC4 Verygood
9/44
9
A description of the process logic that states policy andbusiness rules, not computer language pseudocode.Common business rule formats include the following:
Definitions of business terms Business conditions and actions
Data integrity constraints
Mathematical and functional derivations
Logical inferences
Processing sequences
Relationships among facts about the business
If there is not enough room on the form for a completestructured English description or if there is a DecisionTable or Decision Tree depicting () the logic, includethe corresponding table or tree name.
List any unresolved issues(), incomplete portions oflogic or other concerns. These issues form the basis ()of the questions used for follow-up interviews.
7/30/2019 PSCPEC4 Verygood
10/44
10
Process Specification
Example 1
7/30/2019 PSCPEC4 Verygood
11/44
Structured English
It is special form of spoken English analyst use to illustrate
the logic of processes depicted in DFD. It is based on structured logic, or instructions organized into
nested and grouped procedures, sequence, conditionalstatement, repetition, and simple English statements.
It is primarily a communication technique for analysts and
user. It is an appropriate technique for analyzing the system when
structured decisions are not complex.
Sequence Structure Selection StructureIteration Structure
7/30/2019 PSCPEC4 Verygood
12/44
12
Steps to Use Structured English The following steps are needed:
Express all logic in terms of sequential structures,decision structures, case structures, or iterations.
Use and capitalize accepted keywords such as IF,THEN, ELSE, DO, and PERFORM.
Indent() blocks of statements to show theirhierarchy () (nesting) clearly.
Underline words or phrases used have been defined ina data dictionary to signify that they have a specialized,reserved meaning.
Be careful when using AND" and OR ".
Avoid confusion() when using logical comparisonssuch as "greater than" and "greater than or equal toand Like relationships. So clarify the logicalstatements now rather than waiting until the programcoding stage.
7/30/2019 PSCPEC4 Verygood
13/44
13
7/30/2019 PSCPEC4 Verygood
14/44
A Structured English Example 1:
The VERIFY ORDER process
description includes logical rulesand a structured English version
of the policy. Notice the
alignment and indentation of the
logic statements.
Structured
English
Statements
7/30/2019 PSCPEC4 Verygood
15/44
A Structured English Example 2:We process all of our claims () in thismanner().
1. First we determine () whether the
claimant () has ever sent in a claim
before; if not, we set up a new record. The
claim totals for the year are then updated.
2. Next we determine if a claimant has policy
A or policy B, which differ() in
deductibles () and co-payments (the
percentage of the claim claimants pay
themselves). For both policies, we check to
see if the deductible has been met ($100 for
plan A and $50 for plan B). If the
deductible has not been met, we apply the
claim to the deductible.
3. Another step adjusts () for the co-
payment; we subtract () the percentage the
claimant pays (40% for plan A and 60% forplan B) from the claim.
4. Then we issue () a check if there is
money coming to the claimant, print a
summary of the transaction (), and
update our accounts. We do this until all
claims for that day are processed. The example demonstrates how a spoken procedure for processingmedical claims in transformed into structured English.
7/30/2019 PSCPEC4 Verygood
16/44
16
Advantages of Structured English
Clarifying the logic and relationships found in
human languages
An effective communication tool, and easy toteach and understand.
Structured English might look familiar to
programming students because it resembles
pseudo code, which is used in program design.
7/30/2019 PSCPEC4 Verygood
17/44
17
Data Dictionary and Structured English
All computer programs may be coded using the threebasic constructs: sequence, selection and iteration.The data dictionary indicates which of theseconstructs must be included in the processspecification.
The data dictionary is a starting point for creatingstructured English: Sequenced data dictionary entries become simple
structured English statements.
Selection [] entries become IF..THEN...ELSE statements.
Iteration { } entries become DO WHILE, DO UNTIL, orPERFORM UNTIL structured English statements.
7/30/2019 PSCPEC4 Verygood
18/44
18
7/30/2019 PSCPEC4 Verygood
19/44
19
Decision Tables It is graphical methods for representing process logic.
It provide a way to examine, describe, and documentdecisions using a table.
They are used to: Describe the conditions.
Identify possible decision alternatives.
Indicate actions should be performed. Describe actions.
The standard format used for presenting a decision table.
7/30/2019 PSCPEC4 Verygood
20/44
20
Decision Table Example 1
Rule 3: saysIf N (the total sale is NOT under $50)
AND
If Y (the customer paid by check and had
two forms of ID )
AND
If N (the customer did not use a credit card)
THEN
DO X ( call the supervisor for approval)
conditions
Actions
Decision alternatives
7/30/2019 PSCPEC4 Verygood
21/44
21
Developing Decision Tables
Determine the number of conditions that may affect ()
the decision. Combine () rows that overlap (). Determine the number of actions that can be taken.
Determine the number of condition alternatives (Y, N) foreach condition.
Calculate the maximum number of columns in the decisiontable by multiplying () the number of alternatives for eachcondition.
Condition 1: 2 alternatives
Condition 2: 2 alternativesCondition 3: 2 alternatives
Condition 4: 2 alternatives
24 =16 possibilities
7/30/2019 PSCPEC4 Verygood
22/44
22
5. Fill in the condition alternatives. Start with the 1st conditionand divide the number of columns by the number ofalternatives for that condition.
6. Complete the table by inserting an X where rules suggestactions.
7. Combine rules where it is apparent () that an alternativedoes not make a difference in the outcome ().
8. Check the table for any impossible situations, contradictions (), and redundancies ().
9. Rearrange () the conditions and actions if this makes thedecision table more understandable.
Condition 1: YY
Condition 2: YNAction 1: XX
Condition 1: Y
Condition 2:
Action 1: X
Condition 1: YYYYYYYYNNNNNNNN
Condition 1: YYYYYYYYNNNNNNNN
Condition 2: YYYYNNNNYYYYNNNN
Condition 3: YYNNYYNNYYNNYYNN
Condition 4: YNYNYNYNYNYNYNYN
7/30/2019 PSCPEC4 Verygood
23/44
Creating the Decision Table Example 1
For each ORDER
IF CUSTOMER STATUS CODE = Y and IF PRODUCT DETAIL = OKOutput ACCEPTED ORDER
ELSE
Output REJECTED ORDER
Structured English Statements
1
2 3
4
1. Place the
name of the
process in a
heading at the
top left.
2. Enter the conditions under
the heading, with one
condition per line, to
represent the customer status
and available of products.
3. Enter the potential
combinations of Y/N for the
conditions. Each column
represents a numbered
possibility called a rule.
4. Place an X in the
action entries area for
each rule to indicate
whether to accept or
reject the order.
Four columns = (2 alternatives 2 alternatives)
7/30/2019 PSCPEC4 Verygood
24/44
24
Decision Table Example 2
This tables an
illustration of a decisiontable. The company is
trying to maintain a
meaningful mailing list
of customers. The
objective is to send outonly the catalogs from
which customers will
buy merchandise.
A decision table is constructed for three conditions, each having twoalternatives (Y or N). Three actions can be taken. The regular
decision table has six rows (3 conditions and 3 actions) and eight
columns (2 alternatives 2 alternatives2 alternatives).
7/30/2019 PSCPEC4 Verygood
25/44
25
Rules 2,4,6 and 8 can be combined because they all have two things in common:
1. They instruct us to send out this years Christmas catalog.
2. The alternative for Condition 3 is always N
7/30/2019 PSCPEC4 Verygood
26/44
26
Suppose the rule is:
IF the customer did not order more than $50
THEN do not send any catalogs
7/30/2019 PSCPEC4 Verygood
27/44
27
Checking for Completeness and Accuracy
Decision tables help analysts ensurecompleteness and accuracy.
Four main problems that can occur indeveloping decision tables:
Incompleteness. Impossible situations.
Contradictions ().
Redundancy.
7/30/2019 PSCPEC4 Verygood
28/44
28
Rule 1 is not feasible, because a
person cannot earn greater than
$50,000 per year and less than
$2,000 per month at the sametime.
Contradictions often occur of dashes
[--] are incorrectly inserted into the
table. Redundancy occurs when
identical sets of alternatives requirethe exact same action. The analyst has
to determine what is correct and then
resolve the contradiction or
redundancy.
7/30/2019 PSCPEC4 Verygood
29/44
29
More Advanced Decision Tables Decision tables can become very big because they grow rapidly
as the number of conditions and alternatives increases. In order to avoid a decision table to grow rapidly, we can use
Extended Entries orELSE rule.
C1: Did not order YNNN
C2: Ordered once NYNN
C3: Ordered twice NNYY
C4: Ordered more than twice NNNY
C1: Number of times customer ordered 0 1 2 >2
1. Extended entries: to reduce the possibility of redundancy
and contradiction.
Example:
The number of required columns and rows decreases and the
understandability increases. Instead of using four rows for the number of
timers a customer orders, only one row is needed.
7/30/2019 PSCPEC4 Verygood
30/44
30
An example of a structured inventory ordering policy.
7/30/2019 PSCPEC4 Verygood
31/44
31
2. ELSE Rule: to eliminate repetitive rules
requiring the exact same action.
7/30/2019 PSCPEC4 Verygood
32/44
32
Decision Trees
Decision tree is a graphical representation of a
decision situation. Decision trees are used when complex
branching occurs in a structured decisionprocess.
Trees are also useful when it is essential tokeep a string of decisions in a particularsequence.
Decision tree are most often drawn with theroot of the tree on the left side and the tree
branches out to the right. This orientationallows the analyst to write on the branches todescribe conditions and actions.
7/30/2019 PSCPEC4 Verygood
33/44
33
Drawing Decision Trees
First, identify all conditions and actions and the order and
timing of these (if they are critical). Second, begin building the tree from left to right while
making sure you are complete in listing all possible
alternatives before moving over to the right.
A square node indicates an action (THEN). A circle to represent a condition (IF).
Numbering the circles and squares sequentially.
D i i T E l 1
7/30/2019 PSCPEC4 Verygood
34/44
34
Decision Tree Example 1
A point-of-sale example was used to determine the purchase
approval () actions for a department store. Conditions
included the amount of the sale (under $50) and whether thecustomer paid by check or credit card. The four actions possible
were to ring up the sale, look up the credit card in a book, call
the supervisor for approval, or call the bank for credit card
authorization.
7/30/2019 PSCPEC4 Verygood
35/44
35
Decision Tree Advantages
Three advantages over a decision table are:
The order of checking conditions and executing
actions is immediately noticeable ().
Second, conditions and actions of decision trees are
found on some branches but not on others, which
contrasts with decision tables, in which they are all
part of the same table. Those conditions and actions
that are critical are connected directly to other
conditions and actions. The tree does not have to be
symmetrical ().
Third, compared to decision tables, decision trees are
more readily understood by others in the organization.
7/30/2019 PSCPEC4 Verygood
36/44
36
Selecting a Structured Decision Analysis Technique
Guidelines are as follows:
Use structured English when there are manyrepetitious actions or when communication toend users is important.
Use decision tables when complex combinationof conditions, actions, and rules are found oryou require a method that effectively avoidsimpossible situations, redundancies, andcontradictions.
Use decision trees when the sequence ofconditions and actions is critical or when notevery condition is relevant to every action (the
branches are different).
7/30/2019 PSCPEC4 Verygood
37/44
37
7/30/2019 PSCPEC4 Verygood
38/44
38
Using Process Specifications
All the process specifications are consolidated () for acomputer program and are included in the specificationpacket given to the computer programmer.
Process specifications may be used for generating ()computer language source code and for analyzing the
system design. Process specifications are developed on a small scale (
), one process at a time, each one may be analyzed forcomplete and correct logic. The logic is easier tounderstand.
When the SA is finished and corrections are made for allprocesses within a program, the final programspecifications should be complete and accurate.
7/30/2019 PSCPEC4 Verygood
39/44
39
Horizontal () Balancing
It is used to verify that each process has the required datadictionary entries defined and the formulas and logicnecessary to produce the output.
Process specifications may be used to analyze the DFD anddata dictionary through a method called horizontal balancing.
Horizontal balancing dictates () that all output data-flow
elements must be obtained from the input elements andprocess logic.
Base elements on an output data flow must be present () onthe input flow.
Derived elements on an output flow must be either present onan input data flow or created using the process specifications.
Unresolved areas should be summarized into a series ofinterview questions.
H St t d E li h h l l t th DFD
7/30/2019 PSCPEC4 Verygood
40/44
40
How Structured English can help us complete the DFD.
7/30/2019 PSCPEC4 Verygood
41/44
41
Shows corresponding data
dictionary entries forproducing the Supplier Sales
Receipt.
7/30/2019 PSCPEC4 Verygood
42/44
42
7/30/2019 PSCPEC4 Verygood
43/44
43
R i Q ti
7/30/2019 PSCPEC4 Verygood
44/44
44
Review Question List the three reasons for producing process specifications.
What is the advantage of using structured English to
communicate with people in the organization? What three advantages do decision trees have over decision
tables?
In which two situations should you use structured English?(when many actions are repeated and when communicating with others isimportant)
In which two situations do decision tables work best?
(When complex combinations of conditions, actions, and rules are found or yourequire a method that effectively avoids impossible situations, redundancies, andcontradictions.)
In which two situations are decision trees preferable? (when the
sequence of conditions and actions is critical or not every condition is relevant toevery action )
What four elements must be known for the systems analyst todesign systems for structured decisions?
(Conditions, Condition Alternatives, Actions, and Action Rules)