Chapter 13. Relationship Dynamics


When we formalize a relationship on a class diagram, we capture its static aspects, but we do not capture how the relationship is created or destroyed, nor how it evolves over time. These issues are properly the work of state machines, which are used also to formalize dynamics of relationships between objects.

When an association has an interesting lifecycle, we may abstract an association class and use a statechart diagram to formalize its lifecycle. Because the association class is a class, there is no difference between a state machine for an association class and a state machine for an ordinary, boring class.

Some associations, however, involve some sort of competition for objects representing resources. For each of these, we'll construct a single class-based state machine that provides the necessary single point of control for managing the contention.

Class hierarchies can have statechart diagrams at the subclass level, the superclass level, or both. Polymorphic signals can be sent to objects without regard to their subclass at run time. In addition, objects can reclassify themselves within generalization hierarchies as their role changes over time.

This chapter describes these various forms of relationship dynamics.



Executable UML. A Foundation for Model-Driven Architecture
Executable UML: A Foundation for Model-Driven Architecture
ISBN: 0201748045
EAN: 2147483647
Year: 2001
Pages: 161

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net