|Sequence Diagrams [message #999073]
||Fri, 11 January 2013 04:25
| Andrea Sindico
Registered: November 2010
Consider this simple example:|
I have a model with a class ClassA containing two instances of two different classes (say bObj:ClassB and cObj:ClassC).
ClassA provides an Operation (i.e. classAOperation(int param)) related to a Behavior specified by means of a SequenceDiagram.
Now the behavior consists of invoking an Operation of bObj:ClassB (i.e. classBOperation(int param)) and an Operation of cObj:ClassC (i.e. classCOperation(int param)).
I am wondering how to model, this very simple behavior, via SD.
The question is basically related to LifeLine.
According to the OMG spec. a Lifeline can only represent (Represents attribute) a ConnectableElement, which in my case are two and correspond to the ClassA Properties realizing the composition to a ClassB and a ClassC instance (bObj and cObj). The Problem is I also need to have a reference to the container of these connectable elements, that is to say the ClassA instance which is actually performing such emergent behavior. It is that instance which sends messages (related to the operation call) o to the bObj:ClassB and cObj:ClassC lifelines.
Also as this behavior corresponds to the ClassA:classAOperation(int param) invocation I also need to represents by means of a formal gate the classAOperation(int param) message. But again, as I can't mode the container Lifeline I can't see to which attach the classAOperation(int param) message end.
Follow me on Twitter @andreasindico