2

In Rhapsody I have designed an interface which consists of an interface class and a couple of non-member functions. These non-member functions I've put directly into a package which is parallel to the parent package of the interface class. I want to generate code from this interface which works fine.

But I have the problem that I'm not able to select the non-member functions for messages in sequence diagrams. This is because I cannot assign the package to the contract of a port and also I cannot make a realization relation between some class and the package.

So is there any way to bring these non-member functions into the "Select Message" menu for sequence diagrams?

J. R.
  • 43
  • 4

1 Answers1

0

But I have the problem that I'm not able to select the non-member functions for messages in sequence diagrams.

That's intended. How do you expect the sequence diagram to look like? Please provide a sketch. I am afraid that would violate the UML spec.

A Sequence Diagram focuses on the Message interchange between Lifelines. A Lifeline describes the time-line for a process. In Rhapsody, a Lifeline represents the object of a classifier.

A asynchronous Message can be seen as a call of a function on the Message receiver (where the Message receiver is a Lifeline).

Your non-member functions do not belong to any Lifeline and hence can not be shown as a Message on a sequence diagram.

What are the lifelines in your sequence diagram?

So is there any way to bring these non-member functions into the "Select Message" menu for sequence diagrams?

No, because they aren't members of a classifier.

sergej
  • 17,147
  • 6
  • 52
  • 89
  • The lifeline I want to send a message to (and for which I want to select a non-member function) represents a component which implements an interface consisting both of member functions (from an interface class) as well as non-member functions. – J. R. May 25 '16 at 07:41
  • @J.R. *"an interface consisting both of member functions as well as non-member functions"* does not make sense to me, if you are talking about UML-interfaces. – sergej May 25 '16 at 07:55
  • It's not necessarily one interface class only, I'm talking about an interface on a more high/logical level (for me an interface can also consist of multiple interface classes or - as mentioned above - of an interface class and non-member functions). At the end I want to be able to achieve two things: 1) use the methods in sequence diagrams 2) generate code out of the interface – J. R. Jun 06 '16 at 13:50