CHAPTER 10

Modeling an Object's Lifecycle in UML 1.4

images

In This Chapter

  • Modeling state and events
  • Modeling events and transitions
  • Modeling time and change events
  • Modeling guard conditions
  • Specifying entry and exit action
  • Specifying internal transitions
  • Modeling send events and self-transitions
  • Modeling compound transitions and factored paths
  • Deriving a Statechart from Sequence diagrams
  • Modeling composite and concurrent states
  • Modeling split and merge of control and sync states

images

As objects participate in the behavior of a system they can be affected by the behavior. For example, when I use my car to drive to work, the tires wear out and the car accumulates miles. The condition of the car is constantly changing while it is being used. Changes in the condition of the car can affect how the car behaves. As the tires wear down the car handles less effectively in turns and while stopping than it did when the tires were new. When the gas tank is empty turning the ignition key fails to get the usual response. The same use of the object (turning the key) results in a very different result because of a change in the state of the object.

The Statechart diagram defines a notation for state machines. State machines capture the changes in an object throughout its lifecycle in response to external ...

Get UML™ Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.