[Modeling] RE: Comments on interaction diagram modeling doc

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

Jim Odell wrote:
> Stephen, quick question.  When you say "It might be necessary to restrict
> this usage, e.g. maybe Role2 should be a sub-role of Role 1", do you mean
> Role2 is a subtype of Role1, or that Role2 consists of several roles where
> Role1 is one of them?

I have't done much reading on role modelling, so my comment comes from a
fairly naive viewpoint, but it seemed to me that it might be odd (referring
to the picture below) to have Role2 having no connection at all with Role1,
other than them both being roles that agent b can play.  Therefore, there
might be grounds for restricting my proposed notation to cases where Role2
somehow encompasses a smaller set of capabilities, behaviours, obligations,
etc. than Role1, i.e. it represents a way of saying that the sender is
regarding the recipient in a more specialised way than usual.  I leave it
to others more expert than me to suggest what notion of "more specialised"
might be appropriate (assuming that any such restriction is considered

On the other hand, without such a restriction, the notation could be used
to temporarily override the role represented by the lifeline to be any
arbitrary role.  This would be a notational convenience to avoid showing
a separate lifeline for a single message.  It would have the advantage
of compactness and convenience for the author of the diagram, but might
also be a source of confusion and error if people reading the diagram don't
notice the ": Role2" annotation.  I don't have a strong opinion either way.

- Stephen

> On 3/19/03 5:09 PM, "Stephen Cranefield" indited:
>> 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