Dynamic Modeling:

 

How to Develop a State Transition Diagram from

Sequence Diagrams

 

Note: State Transition Diagrams are developed only for those Object Classes that have nontrivial behavior.  For your CSCI 211 OOAD project, these will be the User Interface Objects, Controller Objects, or other objects with nontrivial behavior.  To develop the State Transition Diagrams for such an object:

 

1.   Pick an object from a class with nontrivial dynamic behavior (e.g., File Document interface screen)

 

2.   Select a sequence diagram depicting a normal scenario that affects that object.

 

3.   Consider only the events that affect the single object class.  The input events are the arrows entering an object.  The output events are the arrows exiting an object.  Many if not all of the arrows pointing outward from an object class are either actions or activities. Examine one event at a time and identify the next state of the object class and any actions by objects that transmit information as events.

 

4.   Draw the State Transition Diagram as a path of events.  A state is the interval between two events.  Label each arc representing an event using the sequence diagram for the object class in question.  The State Transition Diagram shows a sequence of events with interleaved states.

 

5.   Now select other sequence diagrams depicting normal scenarios that affect the class being modeled, and go through the same process.

 

6.   After including all the sequence diagrams depicting normal scenarios, go back and consider all scenarios with exceptions for the object class (e.g. File Document) in question.

 

7.   Repeat this entire process until all object classes with nontrivial dynamic behavior have been included in State Transition Diagrams.