Difference between StateChart and Activity Diagram

itsaboutcode picture itsaboutcode · Apr 6, 2011 · Viewed 59.9k times · Source

I am really unable to understand the real difference between these 2 diagrams. I mean both of these deal is "states" but I am not sure what deals with what?

Answer

Gabriel Ščerbák picture Gabriel Ščerbák · Apr 7, 2011

It might seems so, but the difference is, activity diagrams describe activities and state charts describe states. So those models are orthogonal - you might imagine there is an activity between two states (something that occurs during the transition) and you might say there is a state between two activities. This is rather a simplification, but I think it might suffice to explain the difference, which is primarily focus, both diagrams are for describing behaviours.