[Modeling] The UML 2.0 concept of Collaboration
Stephen Cranefield
scranefield@infoscience.otago.ac.nz
Tue, 3 Jun 2003 15:30:03 +1200
It's probably a bit late to be introducing more notation, but I think
it would be useful to adopt the UML 2.0 notation for a Collaboration
(see Section 3.3, page 132, in the UML 2.0 Superstructure
specification ad/2003-04-01, 10 April 2003):
"A collaboration describes a structure of collaborating elements
(roles), each performing a specialized function, which collectively
accomplish some desired functionality."
A collaboration is shown as an ellipse with (optional) compartments
separated by dashed lines. The name of the collaboration is shown in
the top compartment and the roles and the communication paths between
them can be shown in another compartment. Another compartment can
contain one or more interaction diagrams that help to specify the
collaboration. One diagram might describe all possible executions of
the collaboration while others might illustrate particular scenarios.
The nested interaction diagrams may only show the interaction name for
brevity, with the full diagram being shown elsewhere. An "alternative
notation for properties" allows the ellipse to have assocations with
roles and interactions that are outside of the ellipse. (Note that
the compartment showing interactions is not well explained in the UML
2.0 spec. but appears in Figure 8-157 on page 401, where a normal
class-like box with the stereotype <<collaboration>> is used instead
of an ellipse).
The reason I think that the collaboration notation is useful is that
in the metamodel it is a subclass of BehavioredClassifier, whereas an
interaction in UML 2.0 doesn't have the same notion of being a
classifier of behaviour. In AUML, interaction diagrams could be used
for different purposes, e.g. to define interaction protocols or just
to illustrate an example interaction between agents. It seems to me
that an interaction protocol corresponds well to a Collaboration and
that IPs should be defined as a collaboration and an associated
interaction diagram. This also provides a way to associate several IP
diagrams with one interaction protocol, which would be useful to
illustrate different scenarios.
- Stephen