analysis into design. specifying business rules identifying necessary constraints in an...
Post on 21-Dec-2015
212 views
TRANSCRIPT
Analysis into Design
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
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
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.
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
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
Notation of Activity Diagrams
• Activities– rectangle with rounded ends– meaningful name
• Transitions– arrows with open
arrowheads
Add a New Client
Assign StaffContact
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
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
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?
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
A better pattern - more reusable
Operating Unit Region Division Sales Office
Organization
1
1..*
1
1..*
Parent
Subsidiary
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