analysis into design. specifying business rules identifying necessary constraints in an...

13
Analysis into Design

Post on 21-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Analysis into Design

Page 2: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Specifying Business Rules

• Identifying necessary constraints in an organisation’s operations

• Can apply to structured or semi-structured decisions

• Often expressible as IF …. THEN …. ELSE statements

Page 3: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Examples of business rules

• IF customer owes money THEN no further transactions are accepted.

• IF borrower has 6 books out THEN no further loans are permitted.

• IF postgrad student has 180 credits THEN he/she has achieved an MSc degree

Page 4: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Ways of addressing business rules in a system design

• Forms and multiplicity of associations on Class Diagrams

• Separate text boxes on diagrams

• Calculated fields within database queries or validation rules.

Page 5: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Ways of specifying business rules

• Decision tables - ensure all possibilities are covered.

• Structured English - program-like expression of the rule’s logic

• Flow charts

• Object Constraint Language (OCL)

• Activity diagrams

Page 6: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Drawing Activity Diagrams

• Purpose– to model a task (for example in business

modelling)– to describe a function of a system represented

by a use case– to describe the logic of an operation– to model the activities that make up the life

cycle in the Unified Process

Page 7: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Notation of Activity Diagrams

• Activities– rectangle with rounded ends– meaningful name

• Transitions– arrows with open

arrowheads

Add a New Client

Assign StaffContact

Page 8: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Notation of Activity Diagrams

• Start state– black circle

• Decision points– diamond

• Guard conditions– in square brackets

• Final state– black circle in white circle

[campaign to add]

[no campaign to add]

Add a New Client

Assign StaffContact

Add New Campaign

Page 9: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Notation of Activity Diagrams

• Swimlanes– vertical columns – labelled with the

person, organisationor departmentresponsible for theactivities in thatcolumn

Record Completionof a campaign

Issue invoice

CampaignManager

ClientAccountant

Pay invoice

Record clientpayment

Page 10: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Patterns in Analysis and Design

• Common arrangements of objects to address similar problems in different situations (aids reuse)

• Can be applied at program or organisational level

• Issue for organisational level - what is the nature of relations between classes?

Page 11: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Example: patterns for modelling organisation structures

Operating Unit Region

1..*1

1..*1

Division

1..*1 1..*1

Sales Office

1..*11 1..*

Fowler argues this is not a very reusable pattern because it does not allow for organisational change

Page 12: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

A better pattern - more reusable

Operating Unit Region Division Sales Office

Organization

1

1..*

1

1..*

Parent

Subsidiary

Page 13: Analysis into Design. Specifying Business Rules Identifying necessary constraints in an organisation’s operations Can apply to structured or semi-structured

Other examples of patterns at organisational level

• Measurement-diagnosis pattern: applied by Fowler to clinical treatment and business finances

• Client-entitlement accumulation: similar pattern in, e.g., university student records and book clubs

• Objective - produce something that is generalisable, not specific