Previous UML Classes Table of Contents UML Packages Next

6.3.3 The Basic Causality Model

   The causality model is a specification of how things happen at run time and is described in detail in the Common Behaviors chapter on page 437. It is briefly summarized here for convenience, using the example depicted in the communication diagram in Figure 6.2. The example shows two independent and possibly concurrent threads of causally chained interactions. The first, identified by the thread prefix ‘A’ consists of a sequence of events that commence with activeObject-1 sending signal s1 to activeObject-2. In turn, activeObject-2 responds by invoking operation op1( ) on passiveObject-1 after which it sends signal s2 to activeObject-3. The second thread, distinguished by the thread prefix ‘B,’ starts with activeObject-4 invoking operation op2( ) on passiveObject-1. The latter responds by executing the method that realizes this operation in which it sends signal s3 to activeObject-2.

   The causality model is quite straightforward: Objects respond to messages that are generated by objects executing communication actions. When these messages arrive, the receiving objects eventually respond by executing the behavior that is matched to that message. The dispatching method by which a particular behavior is associated with a given message depends on the higher-level formalism used and is not defined in the UML specification (i.e., it is a semantic variation point).


A.1: s1


A.3: s2 activeObject-1 activeObject-2 activeObject-3

   A.2: op1 ( )


B.1.1: s3


B.1: op2 ( )

   Figure 6.2 - Example illustrating the basic causality model of UML

   The causality model also subsumes behaviors invoking each other and passing information to each other through arguments to paramete rs of the invoked behavior, as enabled by CallBehaviorAction (see CallBehaviorAction (from BasicActions ) on page 255). This purely procedural or process model can be used by itself or in conjunction with the object-oriented model of the previous example.