Presentation is loading. Please wait.

Presentation is loading. Please wait.

® IBM Software Group © 2009 IBM Corporation Module 11: Creating State Machine Diagrams Essentials of Modeling with IBM Rational Software Architect V7.5.

Similar presentations


Presentation on theme: "® IBM Software Group © 2009 IBM Corporation Module 11: Creating State Machine Diagrams Essentials of Modeling with IBM Rational Software Architect V7.5."— Presentation transcript:

1 ® IBM Software Group © 2009 IBM Corporation Module 11: Creating State Machine Diagrams Essentials of Modeling with IBM Rational Software Architect V7.5

2 2 Module overview After completing this module, you will be able to:  Describe the elements in a state machine diagram  Describe the relationships in a state machine diagram  Create a state machine diagram in Rational Software Architect

3 3  State machines are used to describe dynamic (state-driven) behavior  Operation- to system-level abstraction  Use state machines:  To model use-case scenarios in business modeling  To model event-driven objects  To show different aspects of the same state machine and its behavior State machines

4 4 A state machine diagram  State transitions: Possible paths the system may take from one state to another  Triggering events: Instantaneous events that stimulate state transitions  Actions: Work the system does in response to events

5 5 States  State: “A recognizable situation that exists over an interval of time” – Hassan Gomaa  Actions: Work the system does in response to events  States can have entry, exit, and do activities performed while in the state Entry activity Execute when entering the state Entry activity Execute when entering the state Do activity Executed after entry, before exit Do activity Executed after entry, before exit Exit activity Executed when the state is exited Exit activity Executed when the state is exited

6 6 Transitions  A transition is the path taken during a change of state from one state to the next in response to a triggering event  Guard condition: Optional condition to be evaluated; if false, the transition is not taken

7 7 Regions  Regions model concurrent orthogonal states  Like separate state machines that operate in parallel

8 8 Composite States  Composite states are states that contain other states and regions

9 9 Orthogonal States  Orthogonal states  Are composite states with two or more regions within the state.

10 10 Submachine State  A submachine state is a decomposition mechanism that allows factoring of common behaviors and their reuse  Similar in concept to the call behavior action in activity diagrams  Semantically equivalent to a composite state

11 11 Special states: pseudostates and final state  Initial State: Marks the start of the machine  Choice Point: Supports dynamic branches  Junction Point: Supports static branches  Deep History: Return to the most recent substate  Shallow History: Return to the most recent state  Join, Fork: Similar to activity diagram  Entry, Exit Point: Used to designate a default entry or exit into a composite state or state machine  Terminate: Marks the end of the state machine’s execution  Final State: Marks the completion of the region or machine Pseudostates Combine and direct transitions Pseudostates Combine and direct transitions Final State Marks execution of region complete Final State Marks execution of region complete

12 12 Choice points  Choice points realize a dynamic conditional branch  Outputs transitions, each with a guard condition, one of which must be true.

13 13 Junctions  Junctions realize a static conditional branch  Can be used to split or join multiple transitions  Guard conditions are evaluated before transitions are fired  If all guard conditions return false, then remain in the source state

14 14  History pseudo-states are used with composite states  Deep History  Represents the most recent active configuration of the composite state that directly contains this pseudostate  A composite state can have, at most, one Deep History vertex  Shallow History  Represents the most recent active substate of its containing state (but not the substates of that substate).  A composite state can have, at most, one Shallow History vertex. History

15 15 Example state machine diagram

16 16 Lab 11: Create State Machine Diagrams To begin the lab:  In the workbench, click Help > Cheat Sheets to open the Cheat Sheet Selection dialog.  Expand Essentials of Modeling Labs.  Double-click 11 Create State Machine Diagrams.  Follow the directions indicated on the Cheat Sheet.  In this lab, you will complete the following tasks:  Review state machine diagram basics  Create a new state machine diagram

17 17 Review  Which model elements can have associated state machine diagrams?  In what cases would you use state machine diagrams?  What is a choice point? What is a junction?

18 18


Download ppt "® IBM Software Group © 2009 IBM Corporation Module 11: Creating State Machine Diagrams Essentials of Modeling with IBM Rational Software Architect V7.5."

Similar presentations


Ads by Google