Unformatted text preview:

Information Systems Analysis and Design CSC340 X Sequence and Collaboration Diagrams Interaction Diagrams Sequence Diagrams Examples Collaboration Diagrams 2004 John Mylopoulos Sequence and Collaboration Diagrams 1 Information Systems Analysis and Design CSC340 Interaction Diagrams Interactions among actors people objects are modeled by interaction diagrams An interaction involve the exchange of messages between two or more actors There are two types of interaction diagrams Sequence diagrams Collaboration diagrams 2004 John Mylopoulos Sequence and Collaboration Diagrams 2 Information Systems Analysis and Design CSC340 The Nature of an Interaction Employee Assign d Dept 1 Employee Modeling the real world Company Employer Assign development Employee IBM Company Modeling the system Assign development Employee 2004 John Mylopoulos IBM Company Sequence and Collaboration Diagrams 3 Information Systems Analysis and Design CSC340 Sequence Diagrams Sequence diagrams describe in detail how actors use use cases they can also model external business processes Interactions consist of one or more messages Interactions may be synchronous or asynchronous Sequence diagrams defined during requirements analysis should not include design objects specify message signatures in any detail 2004 John Mylopoulos Sequence and Collaboration Diagrams 4 Information Systems Analysis and Design CSC340 The Basic Idea Initiator Person Call Staff Person iteration Scheduler Person Participant Person Respond participating Time What s up actor Inform mtgDetails Inform mtgDetails Acknowledge Remind mtg condition Inform timetable Prompt timetables Show schedule decision OK ScheduleOK ed Inform mtg 2004 John Mylopoulos Sequence and Collaboration Diagrams 5 Information Systems Analysis and Design CSC340 Example Add a New Campaign Getting back to the use case Add a new campaign Add new campaign StaffContact Operations Messages Contact Client Campaign Add new campaign Staff Select nmC Find client by name New Create new campaign Select nmCS Find creative staff member by AssignManager name Assign campaign manager When is an object active 2004 John Mylopoulos Creative Staff Objects Sequence and Collaboration Diagrams 6 Information Systems Analysis and Design CSC340 Add New Campaign This describes a business process no system involved Add new campaign StaffContact Contact Client Campaign Creative Staff Staff Add new campaign GetInfo Get client details New Create new campaign Select Select staff members AssignManager Assign campaign manager 2004 John Mylopoulos Sequence and Collaboration Diagrams 7 Information Systems Analysis and Design CSC340 A More Realistic Example New object Staff Add new campaign Contact Client Find client by name Select nm New nm Create new campaign c Select c Assign creative staff member to c Assign campaign manager Inform the creative staff person Creative Staff Creative StaffE c Campaign AssignManager Inform c This describes a business process involving two people and three system objects 2004 John Mylopoulos Sequence and Collaboration Diagrams 8 Information Systems Analysis and Design CSC340 An Even More Realistic Example External objects New object Staff Contact Client Select nm New nm Creative Staff Creative StaffE c Campaign Select c AssignManager c CampaignE Inform c 2004 John Mylopoulos Sequence and Collaboration Diagrams 9 Information Systems Analysis and Design CSC340 Another Example Print Shop CustomerE Lifeline Printer PrinterE PrintFile file Queue Inactive GetStatus Ready Print Active Busy PutInQueue file Branching OutOfService CallRepair End of lifeline Ready file Ready file GetNext Asynchronous 2004 John Mylopoulos Sequence and Collaboration Diagrams 10 Information Systems Analysis and Design CSC340 Flow of Control This procedure call operation is creating an instance of class A createObj objA A objB B doit These return arrows are optional in a procedural flow of control 2004 John Mylopoulos Sequence and Collaboration Diagrams 11 Information Systems Analysis and Design CSC340 Iteration Iteration shown with an asterisk Each StaffMember will be selected in turn Once selected the CalculateBonus message will be sent to the one currently selected StaffMember There is only one loop Iteration Calculate Staff Bonuses Select CalculateBonus Description Start or StaffMember For Each StaffMember Select next Staff Member Calculate Bonus for Staff Member For each StaffMember CalculateBonus 2004 John Mylopoulos Sequence and Collaboration Diagrams 12 Information Systems Analysis and Design CSC340 Drawing Sequence Diagrams For a use case identify participating actors Imagine that there is a use case required by Agate called Check Campaign Budget Campaign has an EstimatedCost attribute and Advert has an EstimatedCost attribute The purpose of the use case is to check that the total estimated cost of all the adverts is less than that for the campaign as a whole Which objects are involved here 2004 John Mylopoulos Sequence and Collaboration Diagrams 13 Information Systems Analysis and Design CSC340 Campaign and Advert Campaign 1 Class diagram showing aggregation contains Advert 2004 John Mylopoulos Sequence and Collaboration Diagrams 14 Information Systems Analysis and Design CSC340 The Campaign Class Campaign Title String CampaignStartDate Date CampaignFinishDate Date EstimatedCost Money ActualCost Money CompletionDate Date DatePaid Date StaffCount Integer 0 Completed CompletionDate Date ActualCost Money SetFinishDate FinishDate Date RecordPayment DatePaid Date CostDifference Money GetCampaignContribution Money CheckBudget Money 2004 John Mylopoulos Sequence and Collaboration Diagrams 15 Information Systems Analysis and Design CSC340 The Advert Class Advert Title String Type String TargetDate Date CompletedDate Date EstimatedCost Money SetCompleted CompletedDate Date Today GetTitle String GetType String GetTargetDate Date GetCompletedDate Date GetCost Money 2004 John Mylopoulos Sequence and Collaboration Diagrams 16 Information Systems Analysis and Design CSC340 Drawing a Sequence Diagram Where do we start Select the relevant Campaign probably using its name How we select it is something we leave for the design phase it could be from a list box it could involve a separate window on the screen it could involve some kind of index These are design issues which we shall leave for now although we should document them if the customer expressed a preference at this stage 2004 John Mylopoulos Sequence and


View Full Document

Toronto CSC 340 - Sequence and Collaboration Diagrams

Documents in this Course
Scoping

Scoping

10 pages

Load more
Loading Unlocking...
Login

Join to view Sequence and Collaboration Diagrams and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Sequence and Collaboration Diagrams and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?