I'm facing a problem about class generalization in Rhapsody 220.127.116.11
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
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
2 replies Latest Post - 2012-03-21T18:13:40Z by M2D7_Steve_Lilleyman
Pinned topic Port inheritance issue
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-03-21T18:13:40Z at 2012-03-21T18:13:40Z by M2D7_Steve_Lilleyman
SystemAdmin 110000D4XK1305 PostsACCEPTED ANSWER
Re: Port inheritance issue2011-09-18T10:23:51Z in response to SystemAdminHi,
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 PostsACCEPTED ANSWER
Re: Port inheritance issue2012-03-21T18:13:40Z in response to SystemAdminI have the same problem in Rhapsody 18.104.22.168
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.