Unformatted text preview:

Information Systems Analysis and Design CSC340 X Sequence and Collaboration Diagrams Sequence and Collaboration Diagrams 1 Information Systems Analysis and Design CSC340 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 Employee Assign d Dept Employer Company Modeling the real world Assign development Employee IBM Company Modeling the system Assign development 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 IBM Company Employee 2004 John Mylopoulos Sequence and Collaboration Diagrams 3 Information Systems Analysis and Design CSC340 2004 John Mylopoulos Staff Person iteration Scheduler Person Getting back to the use case Add a new campaign Participant Person Add new campaign Respond participating StaffContact Time Inform timetable Prompt timetables Show schedule decision OK ScheduleOK ed Inform mtg 2004 John Mylopoulos CSC340 Example Add a New Campaign What s up actor Inform mtgDetails Inform mtgDetails Acknowledge Remind mtg condition Sequence and Collaboration Diagrams 4 Information Systems Analysis and Design The Basic Idea Initiator Person Call CSC340 Sequence Diagrams 1 Sequence and Collaboration Diagrams 2 Information Systems Analysis and Design The Nature of an Interaction Employee CSC340 Interaction Diagrams Interaction Diagrams Sequence Diagrams Examples Collaboration Diagrams 2004 John Mylopoulos Information Systems Analysis and Design Sequence and Collaboration Diagrams 5 Operations Messages Contact Creative Client Campaign Add new campaign Staff Staff Select nmC Find client by name New Create new campaign Select nmCS Find creative staff member by AssignManager name Assign campaign manager 2004 John Mylopoulos When is an object active Objects Sequence and Collaboration Diagrams 6 Information Systems Analysis and Design CSC340 Information Systems Analysis and Design Add New Campaign CSC340 A More Realistic Example This describes a business process no system involved 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 New object Staff Contact Client Find client by name Select nm New nm Create new campaign c Select c Assign creative staff Creative Staff Add new campaign Add new campaign member to c Assign campaign manager Inform the creative staff person Sequence and Collaboration Diagrams 7 Information Systems Analysis and Design CSC340 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 Another Example Print Shop An Even More Realistic Example External objects CustomerE New object Staff Contact Client Select nm New nm Creative Staff Creative StaffE Lifeline Printer PrinterE PrintFile file Queue Inactive GetStatus c Campaign Ready Print Select c AssignManager c CampaignE Active Busy PutInQueue file Branching Inform c OutOfService CallRepair End of lifeline Ready file Ready file GetNext Asynchronous 2004 John Mylopoulos Sequence and Collaboration Diagrams 9 Information Systems Analysis and Design CSC340 objB B doit These return arrows are optional in a procedural flow of control 2004 John Mylopoulos Information Systems Analysis and Design This procedure call operation is creating an instance of class A objA A Sequence and Collaboration Diagrams 10 CSC340 Iteration Flow of Control createObj 2004 John Mylopoulos Sequence and Collaboration Diagrams 11 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 Select CalculateBonus Calculate Staff Bonuses 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 Information Systems Analysis and Design Drawing Sequence Diagrams CSC340 Campaign and Advert 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 Campaign 1 Class diagram showing aggregation contains Advert 2004 John Mylopoulos Sequence and Collaboration Diagrams 13 Information Systems Analysis and Design CSC340 2004 John Mylopoulos Information Systems Analysis and Design The Campaign Class Advert Title String Type String TargetDate Date CompletedDate Date EstimatedCost Money Completed CompletionDate Date ActualCost Money SetFinishDate FinishDate Date RecordPayment DatePaid Date CostDifference Money GetCampaignContribution Money CheckBudget Money SetCompleted CompletedDate Date Today GetTitle String GetType String GetTargetDate Date GetCompletedDate Date GetCost Money Sequence and Collaboration Diagrams 15 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 CSC340 The Advert Class Campaign Title String CampaignStartDate Date CampaignFinishDate Date EstimatedCost Money ActualCost Money CompletionDate Date DatePaid Date StaffCount Integer 0 2004 John Mylopoulos Sequence and Collaboration Diagrams 14 Sequence and Collaboration Diagrams 17 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?