Tutorial 6 DFDs vs. Use Case Diagrams (Textbook Chapter 7 & Appendix) Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 1 Learning Objectives Practice more DFDs Practice more Use Case Diagrams Understand commonalities and differences between the two types of diagrams Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 2 Part 1 Ch. 7 Ex. 12 and Ch. 7 App, Ex. 1 Consider the following narrative: Tutorial 6 Maximum Software is a developer and supplier of software products to individuals and businesses. As part of their operations, Maximum provides a help desk line for software purchased form Maximum. An operator enquires about the nature of incoming calls. Calls that do not require help desk functions are directed to other company units. Help desk consultants are organised by product. The operator directs the call to a consultant skilled on the software that the caller needs help with. Some calls need to be put on a queue. Once a consultant answers the call, the consultant determines if this is the first call from this customer. If so, the consultant creates a new call report to keep track of all information about the problem. If it is not the first call about a problem, the consultant asks the customer about the call report number and retrieves the open call report to determine the status of the enquiry. © 2008 Prentice Hall, Ovidiu Noran 3 Ch. 7 Ex. 14 and Ch. 7 App, Ex. 1 (cont.) If the caller does not know the call report number, the consultant collects other identifying information such as caller’s name, the software involved etc in order to conduct a search for the appropriate call report. If a resolution of the customer’s problem has been found, the consultant informs the client as to what the resolution is, indicates on the report that the customer has been notified, and closes out the report. If resolution has not been discovered, the consultant finds out if the consultant handling this problem is on duty and if so, the call is transferred to that consultant, who records any new information from the client. For new and continuing problems, the consultant tries to find the solution by using the relevant software and looking up information in reference manuals. If the consultant knows how to solve the problem, he / she tells the customer how to deal with the problem and closes the report. Else the consultant files the report for continued research and tells the customer that someone at Maximum software will get back to him / her and if the customer discovers new information he / she should call quoting the report number. Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 4 Ch. 7 Ex. 12 and Ch. 7 App, Ex. 1 (cont.) Decisions to make What is to be represented, i.e. what level of detail to show? Keep Level-0 DFD uncluttered, 7-9 processes (max). DFD can be subsequently further decomposed. Unless further information becomes available, assumptions may be necessary to further decompose. Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 5 Ch. 7 Ex. 12 and Ch. 7 App, Ex. 1 (cont.) Decisions to make (cont.) What is part of the system and what is an external entity / agent? One option is to consider the processes performed by the consultants and operators as sub-systems within the system rather than as external entities (sources/sinks). This adds detail; however, it allows bottlenecks in these processes to be corrected. So, it depends on the scope of the problem (and what the client wants to pay for) Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 6 Ch. 7 Ex. 12 and Ch. 7 App, Ex. 1 (cont.) Call Enquiry on Nature of Call 0 Non-Help Desk Call Nature of Call Client Call Report # or Other Data New Problem Data Help Desk System Other Unit Interim Problem Status Final Call Resolution Help Desk System Context Data Flow Diagram Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 7 Ch. 7 Ex. 12 and Ch. 7 App, Ex. 1 (cont.) Decisions to make (cont.) Decision logic is not shown on the DFDs. How do we cope with that? a) show the data flows in / out of processes that correspond to all possible decisions b) simulate some rudimentary decision logic on the DFDs Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 8 Option a) 1.0 ill ed U In nfil fo led Re O sp rd on er se If the Order is not filled, then the doctor is contacted. The doctor responds …etc etc Hospital Pharmacy Partial Level-0 Diagram Tutorial 6 O rd Prescription er In fo Information necessary to make the decision Pharmacy Tech Review D1 Patient File o U nf Review & Send Prescription to Station 2.0 Review Prescription Order by Station tie nt In f Prescription Pa Doctor Order Info 3.0 Fill Order © 2008 Prentice Hall, Ovidiu Noran 9 Option b) E.g.: “…the consultant determines if this is the first call from this customer. If so, the consultant creates a new call report […]. If it is not the first call about a problem, the consultant […] retrieves the open call report to determine the status of the enquiry. 3.0 5.0 Previous Call Information Determine problem status Determine if first call First Call Information Call Report 4.0 Call Report Create Call Report Tutorial 6 Information D1 Call Report File © 2008 Prentice Hall, Ovidiu Noran 10 New Problem Data Call 1 Receive Call Enquiryon onNature Natureof ofCall Call Inquiry D1 Call Queue H elp Desk Call Information Non-Help Desk Call Information Previous Call Information Determine if First Call New Information on Problem Closed Call Indication 5 3 Close Call Report Closed Call Problem Resolution Help Desk Call Information 2 9 Final Call Resolution Nature of Call Call Information Determine Direction of Call Call Report # or Other Data Client Determine Problem Status 8 Research Problem Call Report First Call Information Open Call Information D2 Call Report File 4 Other Unit Create Call Report Problem Information Call Report Information D1 Call Queue 6 Transfer Call Problem Data New Problem Data 7 Open Call Information Record New Information Interim Problem Status Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran Help Desk System Level-0 Data Flow Diagram 11 Place Call Direct the Call Operator Answer Call Customer Retrieve problem report Knowledge base lookup Consultant Refer to original consultant Update call report Close call report Tutorial 6 Help Desk System Use Diagram © 2008 Prentice Hall,Case Ovidiu Noran 12 Can this system be improved? A customer may have to explain their problem and/or question over and over to multiple people: an operator and possibly several consultants. Has this happened to you? Why not let the initial operator have access to the customer problem database so that the caller is handed off to a consultant and the customer’s already opened problem file goes along with him. Does this happen in the GU system ? Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 13 Can this system be improved? (cont.) The operator could have sufficient information and the option to direct the call to the proper consultant. Clients could call the assigned consultant directly on follow-up calls to an initial call for help. Why should clients not be called back by consultants with updates on the problem or the resolution, rather than the client having to call back to check? Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 14 Can this system be improved? (cont.) General areas of improvement for DFDs are: processes that simply collect and pass on information rather than transforming data collecting the same information into several processes placing untransformed data into data stores thus causing unknown delays in processing this data cycles or loops that have no apparent termination. Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 15 Same Observations as in previous tutorial: There is substantially less detail on the use case diagram than in the narrative The missing detail will be completed when writing the use cases at intermediate and detailed levels. Decision logic is not shown on the Use Case diagrams. It is described in the written Use Cases and/or Activity Diagrams and/or Sequence Diagrams (the latter can also show timing) Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 16 Part 2 Case Study: Pine Valley Furniture (PVF) Review the Case Study DFD and the ‘corresponding’ Use Case Diagram described in Tutorial Wk 5 Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 17 Tutorial 6 Level-0 data flow diagram for theNoran PVF WebStore © 2008 Prentice Hall, Ovidiu 18 Case Study: PVF (cont.): Model the functionality of Pine Valley Furniture Webstore Application with a use case diagram. Six high-level functions identified to be included in the use case diagram. The functions represent the “work” or “action” parts of the Website. Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 19 Case Study: PVF (cont.): Browse Catalog Maintain Account Customer Login Shipping Clerk Place Order Fill Order Check Order Tutorial 6 WebStore use case diagram © 2008 Prentice Hall, Ovidiu Noran 20 Case Study: PVF (cont.): The functionality should now be further detailed using written use cases as shown in the lecture. E.g. for the Place Order use case: Place Order Brief Description Customer connects to PVF WebStore and links to Order page. System checks customer information and creates a new order. Customer searches catalog, adds items / makes changes to the order, checks out assisted by the system. Customer requests payment screen, makes payment assisted by system. System sends e-mail confirmation and finalizes order. Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 21 Case Study: PVF (cont.): Possible Intermediate level description: PVF Tutorial 6 Source: (Satzinger al., © 2008 Prentice Hall, OvidiuetNoran 2008) 22 Case Study: PVF (cont.): Possible fully developed description – adds triggering event, actors, related use cases, stakeholders and pre- and post-conditions: PVF Tutorial 6 Source: (Satzinger al., © 2008 Prentice Hall, OvidiuetNoran 2008) 23 Case Study: PVF (cont.): Possible fully developed description (cont.): PVF Tutorial 6 Source: (Satzinger et al., 2008) © 2008 Prentice Hall, Ovidiu Noran 24 Summary In this tutorial you learned how to: Practice DFDs Practice Use case Diagrams Understand commonalities and differences between the two types of diagrams Tutorial 6 © 2008 Prentice Hall, Ovidiu Noran 25