University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 1 state machine for the class GradeRate. Movement from one.

Slides:



Advertisements
Similar presentations
State Charts Mehran Najafi. Reactive Systems A reactive, event-driven, object is one whose behavior is best characterized by its response to events dispatched.
Advertisements

UML State chart/machine diagram State machine diagram is a behavior diagram which shows discrete behavior of a part of designed system through finite state.
Synchronization and Deadlocks
Programming with Microsoft Visual Basic th Edition
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 04. Other.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
03/12/2001 © Bennett, McRobb and Farmer Specifying Control Based on Chapter 11 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
State Diagram. What is State Diagram?  State diagram is used to show the state space of a given class, the events that cause a transition from one state.
State Machine Diagrams (State Chart in UML 1) Specifying Control (ref: Chapter 11 Bennett, Mc Robb and Farmer)
03/12/2001 © Bennett, McRobb and Farmer Object Interaction Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
Requirements Analysis
1 CS/CPE 426 Senior Projects Chapter 21: State Machines Chapter 22:Advanced State Machines [Arlow and Neustadt 2005] March 24, 2009.
03/12/2001 © Bennett, McRobb and Farmer Activity Diagrams Based on Chapter 5 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
State Change Modelling. Aim: To introduce the concept and techniques for describing the changes in state that may occur to an object in its lifetime.
WXGC6102: Object-Oriented Techniques Object Interaction – Sequence Diagrams References: Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems.
Advanced Behavioral Modeling
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
Design in IS Development. IS Design in general The satisfaction of new information requirements. Considering the interaction between humans and the new.
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
SYSC 3100 System Analysis and Design1 UML State Machines.
State Machine Diagram Chapter 10. State Machine Diagram Used to describe system behavior.
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Chapter 10 State Machine Diagrams
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 1 Use CasesUse Case Model Campaign Management PackageModelSub-system.
Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna,
Software Engineering 1 Object-oriented Analysis and Design Chap 29 UML State Machine Diagrams and Modeling.
Object-Oriented Systems Analysis and Design Using UML
03/12/2001 © Bennett, McRobb and Farmer Object Interaction Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
Session 22 Modeling the Extended Features of the Statechart Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 27, 2011 Presented.
10/27/20151 WXGC6102: Object-Oriented Techniques Requirements Analysis References: Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
© Bennett, McRobb and Farmer Requirements Analysis Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 state charts 1 object states an object state is a condition or situation during the life.
Information System Design IT60105
© 2010 Bennett, McRobb and Farmer1 Object Interaction – Interaction Overview Diagrams Timing Diagrams Based on Chapter 09 Bennett, McRobb and Farmer Object.
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams : listCampaigns *[For.
WXGC6102: Object-Oriented Techniques Object Interaction – Interaction Overview Diagrams Timing Diagrams References: Chapter 9 of Bennett, McRobb and Farmer:
WXGC6102: Object-Oriented Techniques Specifying Control References: Chapter 10 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design.
1 Kyung Hee University Statecharts Spring Kyung Hee University Specifying Objects’ Behaviour  Interaction diagrams show message-passing behaviour.
Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part VI: Design Continuous Activity Diagams State Diagrams.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML State Diagrams.
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
© Bennett, McRobb and Farmer Object Interaction – Sequence Diagrams Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
Modeling Object Lifecycles and State-Dependent Behavior ©SoftMoore ConsultingSlide 1.
® IBM Software Group © 2009 IBM Corporation Module 11: Creating State Machine Diagrams Essentials of Modeling with IBM Rational Software Architect V7.5.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Advanced UML State Diagrams.
State transition modeling
Object Interaction – Interaction Overview Diagrams Timing Diagrams
WXGC6102: Object-Oriented Techniques
Building System Models for RE
State Machine Diagrams
States.
CS/CPE 426 Senior Projects
Advanced State Chart diagrams
Object Interaction – Sequence Diagrams
CS/CPE 426 Senior Projects
States.
Systems Analysis and Design I
Systems Analysis and Design I
CS 791Z State Machines & Advanced State Machines
Behavioral Diagrams P. P. Mahale
Copyright © 2015, 2012, 2009 Elsevier Inc. All rights reserved.
Presentation transcript:

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 1 state machine for the class GradeRate. Movement from one state to another is dependent upon events that occur with the passage of time. Pending Active Lapsed Transition between states [rateStartDate <= currentDate] [rateFinishDate <= currentDate] after [1 year] Final psuedostate Initial pseudostate Change trigger GradeRate Relative time trigger State Change trigger state machine GradeRate

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 2 Commissioned Active authorized(authorizationCode) [contractSigned] / setCampaignActive This trigger must correspond to an operation in the Campaign class events

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 3 State Name entry /activity-expression exit /activity-expression do /activity Name compartment Internal activities compartment Internal activities

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 4 Menu Visible state for a DropDownMenu object. Menu Visible itemSelected / highlightItem entry/ displayMenu do / playSoundClip exit / hideMenu Name compartment Internal activities compartment Internal transitions compartment event itemSelected() triggers the action highlightItem() While the object remains in the Menu Visible state, the activity causes a sound clip to be played. Exiting the state triggers hideMenu() entry action causes the menu to be displayed

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 5 state machine for the class Campaign. Commissioned Authorized(authorizationCode) [contractSigned] /setCampaignActive /assignManager; assignStaff Active Completed Paid campaignCompleted /prepareFinalStatement paymentReceived(payment) [paymentDue - payment > zero] paymentReceived(payment) [paymentDue - payment <= zero] archiveCampaign /unassignStaff; unassignManager Recursive transition models any payment event that does not reduce the amount due to zero or beyond. Action-expression assigning manager and staff on object creation Guard condition ensuring complete payment before entering Paid

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 6 A revised state machine for the class Campaign Commissioned Authorized(authorizationCode) [contract signed] /setCampaignActive /assignManager; assignStaff Active Completed Paid campaignCompleted /prepareFinalStatement paymentReceived(payment) [paymentDue - payment > zero] paymentReceived(payment) [paymentDue - payment = zero] archiveCampaign /unassignStaff; unassignManager paymentReceived(payment) [paymentDue - payment < zero] /generateRefund If the user requirements were to change, so that an overpayment is now to result in the automatic generation of a refund, a new transition is added.

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 7 Advert Preparation campaignCompleted /prepareFinalStatement Running AdvertsScheduling confirmSchedule extendCampaign /modify Budget advertsApproved /authorize Active Decomposition compartment The Active state of Campaign showing nested substates. The transition from the initial pseudostate symbol should not be labelled with an event but may be labelled with an action, though it is not required in this example

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 8 The Active state of Campaign with the detail hidden. Active : Running The submachine Running is referenced using the include statement. Hidden decomposition indicator icon

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 9 Advert Preparation Running AdvertsScheduling confirmSchedule extendCampaign /modify Budget advertsApproved /authorize Active Survey Evaluation surveyComplete runSurvey Running Monitoring campaignCompleted /prepareFinalStatement Active state with concurrent substates

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 10 State 1 Transition caused by the event someTrigger Transition fired by completion event State 2 someTrigger

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 11 Synchronized Concurrent Threads. Explicitly showing how an event triggering a transition to a state with nested concurrent states causes specific concurrent substates to be entered. Shows that the composite state is not exited until both concurrent nested state machines are exited. Fork Join

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 12 StoryBoard AdvertPrep: AdvertPrepSM AdvertRunning abort sm AdvertPrepSM abort Advert Aborted Advert Reworked Advert Reworked Advert Aborted sm Advert Exit pseudostate Entry pseudostate

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 13 x [condition1] [condition2] Junction pseudostate Choice pseudostate [<15] [=15] [>15] StateA StateCStateB StateD

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 14 Advert Preparation Running AdvertsScheduling confirmSchedule extendCampaign /modify Budget advertsApproved /authorize Active Survey Evaluation surveyComplete runSurvey Running Monitoring campaignCompleted /prepareFinalStatement Suspended H suspendCampaign /stopAdverts resume Campaign H Shallow history psuedostates with transition to the default shallow history substates.

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 15 :Client :Campaign listCampaigns :CampaignManager sd Record completion of a campaign loop :CompleteCampaignUI :CompleteCampaign getClient selectClient loop getCampaignDetails() startInterface [For all clients] showClientCampaigns completeCampaign [For all client’s campaigns] completeCampaign Active state Completed state Active Completed Sequence Diagram with States Shown

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 16 Initial state machine for the Campaign class—a behavioural approach. Commissioned authorized(authorizationCode) [contract signed] /setCampaignActive /assignManager; assignStaff Advert Preparation Completed Paid campaignCompleted /prepareFinalStatement paymentReceived(payment) [paymentDue - payment > zero] paymentReceived(payment) [paymentDue - payment = zero] archiveCampaign /unassignStaff; unassignManager paymentReceived(payment) [paymentDue - payment < zero] /generateRefund Running AdvertsScheduling confirmSchedule extendCampaign /modify Budget advertsApproved /authorize sm Campaign Version 1

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 17 Commissioned Authorized (authorizationCode) [contract signed] /setCampaignActive /assignManager; assignStaff Advert Preparation Completed Paid campaignCompleted /prepareFinalStatement paymentReceived (payment) [paymentDue - payment > zero] paymentReceived (payment) [paymentDue - payment = zero] archiveCampaign /unassignStaff; unassignManager paymentReceived (payment) [paymentDue - payment < zero] /generateRefund Running AdvertsScheduling confirmSchedule extendCampaign /modifyBudget advertsApproved /authorize Active sm Campaign Version 2 Revised state machine for the Campaign class.

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 18 Advert Preparation Running AdvertsScheduling confirmSchedule extendCampaign /modify Budget advertsApproved /authorize Running Survey Evaluation surveyComplete runSurvey Monitoring authorized(authorizationCode) [contract signed] /setCampaignActive /assignManager; assignStaff Paid paymentReceived(payment) [paymentDue - payment > zero] paymentReceived(payment) [paymentDue - payment = zero] archiveCampaign /unassignStaff; unassignManager Active campaignCompleted /prepareFinalStatement Commissioned Completed campaignCancelled /cancelSchedule calculateCosts; prepareFinalStatement Suspended H suspendCampaign /stopAdverts resumeCampaign H campaignCancelled /calculateCosts; prepareFinalStatement sm Campaign Version 3 paymentReceived(payment) [paymentDue - payment < zero] /generateRefund Final version of Campaign state machine.

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 19 :TicketMachine :Barrier after:WeightSensor sd Car enters car park raiseBarrier lowerBarrier before:WeightSensor activate Raised Lowered Active deactivate Blocked barrierLowered Inactive ticketRequested

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 20 [barrierState = Raised and barrierRaisedTime > 20s] lowerBarrier/ [barrierState = Lowered] Lowered Raised [barrierState = Lowered] raiseBarrier/ [barrierState = Raised] sm Barrier {Protocol}