Pinned topic Port inheritance issue
I'm facing a problem about class generalization in Rhapsody 126.96.36.199
I try to explain the situation:
Class A with PortA showing InterfaceA as required contract. InterfaceA has got an operation() method.
I draw a sequence diagram showing a client calling operation() on A.
Now I define a new class B with a generalization relation to A. B inheriths PortA from A and defines a new PortB with another interface.
When in a sequence diagram I try to call a method on B, Rhapsody lets me select operation() (in the feature window of the message) but an error popup occurs:
Formal message "operation" now define in "B".
It seems that is not allowed to call a method exposed by an inherited interface. It is correct? There is something I missed?
Thanks for the precious help.
Valerio Del Grande
SystemAdmin 110000D4XK1305 Posts
Re: Port inheritance issue2011-09-18T10:23:51ZThis is the accepted answer. This is the accepted answer.Hi,
I don't seem to follow you.
Since class A only has portA which has a required interface to interface 'I', and interface 'I' has operation 'foo', you can't call directly on class 'A' operation 'foo', since class 'A' doesn't inherit from the interface (it just has an association to it). The only way to call 'foo' is via the port (i.e. OUT_PORT(portA)->foo() ). The same for class 'B'.
Therefore, i don't understand how you were able to select the opeation in the Sequence Diagram. It seems that you have done something more than what you've described.
M2D7_Steve_Lilleyman 270003M2D72 Posts
Re: Port inheritance issue2012-03-21T18:13:40ZThis is the accepted answer. This is the accepted answer.I have the same problem in Rhapsody 188.8.131.52
I have defined a port with a contract on an actor A which represents a generic role.
I have created another more specialised actor B which inherits from the general actor A. I have done this to enable multiple inheritance of services from different actors representing different service providers/requirers.
I can see the inherited ports in the specialised actor B's Features dialog by ticking the 'Show Inherited' checkbox on the Ports tab.
When I try to realise a message for the specialized actor B on a sequence diagram, I can see the event receptions inherited from the port contract in actor A, in the 'Select Message' option in the right-click menu. However, when I select one of the inherited reception, I get the error message:
Formal message "<message name>" not declare in ""
This is I believe the exact same issue. It means I cannot inherit any port contracts, which makes reuse of the service definitions impossible.
Eraankur 310000QBA71 Post
Re: Port inheritance issue2015-07-08T18:33:50ZThis is the accepted answer. This is the accepted answer.
I have used Rhapsody with Qt, I have made Rhapsody library and I'm using it inside Qt as a library. Whenever I need to send events from Qt Ui, I can call functions from the object of a class. But I'm not able to send any events from library to UI. I tried to implement signal and slot mechanism of Qt. I tried to create signal inside Rhapsody but able to achieve the same. Can anybody help in this issue. I want to send a signal whenever I'm recieving an event from other subsytem through port and wants to perform action on Qt UI on the based on same. How can I achieve. Please help.