UML Tutorial for Beginners
Blog containing resources for uml like lecture notes, lecture videos, lab manual, uml diagrams, objective bits, important questions and more.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

Categories: Behavioral Modeling. No Comments on Statechart Diagrams
4.1
(19)

A statechart diagram shows a state machine, focusing on the flow of control from state to state. A state machine is a behavior that specifies the sequences of states an object goes through during its lifetime in response to events, together with its responses to those events.

 

Common Properties

 

A statechart diagram is a special kind of diagram and shares the same common properties as do all other diagrams like a name and graphical contents that are a projection into a model. What distinguishes a state chart diagram from other diagrams is its content.

 

Content

 


Subscribe to our monthly newsletter. Get notified about latest articles, offers and contests.


Statechart diagrams commonly contain:

  • Simple states and composite states
  • Transitions including events and actions

 

Common Uses

 

When we model the dynamic aspects of a system, a class or a use case, we will use statechart diagrams in one way:

  • To model reactive (event-driven) objects.

 

Common Modeling Techniques

 

Modeling Reactive Objects

 

To model a reactive object:

  • Choose the context for the state machine, whether it is a class, a use case or the system as a whole.
  • Choose the initial and final states for the object.
  • Decide on the stable states of the object. Start with the high-level states of the object and only then consider its possible substates.
  • Decide on the meaningful partial ordering of stable states over the lifetime of the object.
  • Decide on the events that may trigger a transition from state to state.
  • Attach actions to these transitions and/or to these states.
  • Consider ways to simplify your machine by using substates, branches, forks, joins and history states.
  • Check that all states are reachable under some combination of events.
  • Check that no state is a dead end.
  • Trace through the state machine, either manually or by using tools, to check it against expected sequences of events and their responses.

 

Consider the following example:

 

1-reactive-objects

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Suryateja Pericherla

Suryateja Pericherla, at present is a Research Scholar (full-time Ph.D.) in the Dept. of Computer Science & Systems Engineering at Andhra University, Visakhapatnam. Previously worked as an Associate Professor in the Dept. of CSE at Vishnu Institute of Technology, India.

He has 11+ years of teaching experience and is an individual researcher whose research interests are Cloud Computing, Internet of Things, Computer Security, Network Security and Blockchain.

He is a member of professional societies like IEEE, ACM, CSI and ISCA. He published several research papers which are indexed by SCIE, WoS, Scopus, Springer and others.

Note: Do you have a question on this article or have a suggestion to make this article better? You can ask or suggest us by filling in the below form. After commenting, your comment will be held for moderation and will be published in 24-48 hrs.

Leave a Reply

Your email address will not be published. Required fields are marked *