[Modeling] RE: Comments on interaction diagram modeling doc

Stephen Cranefield scranefield@infoscience.otago.ac.nz
Thu, 20 Mar 2003 10:09:13 +1200


Marc-Philippe Huget wrote:
> and what about what I propose in the document: the ability to 
> distinguish an
> agent for a specific message, is it too stupid?

It would be useful to be able to indicate *for individual messages*
what role the sender is considering the recipient to be playing.
This would be useful when it would be too cumbersome to use a separate
lifeline to represent the recipient playing that role (e.g. when the
separate lifeline would only be needed for a single message in the
interaction).

UML associations allow an association end to be annotated with an
"interface specifier" using the format ": ClassifierName".  This
"indicates the behavior expected of an associated object by the
related instance".  Perhaps we could allow this notation to be used
on interaction diagrams as well, i.e. a message could look like
this:

+-----+      +-----------+
|  a  |      |  b: Role1 |
+-----+      +-----------+
   |        :Role2 |
   |-------------->|
   |               |

It might be necesary to restrict this usage, e.g. maybe Role2 should
be a sub-role of Role 1.

- Stephen