|Connectors and Provided / Required Interfaces [message #626254]
||Tue, 25 March 2008 10:45
Originally posted by: jeroen.kouwer.nl.thalesgroup.com|
First, let me introduce myself: My name is Jeroen Kouwer and I am
currently employed as an architecture engineer at Thales Nederland BV. We
are working on code generation from models and in the process of defining
the transformation rules I ran into the following:
I have a model with three components, one "system" component containing
two "application" components. Both "application" components have a port.
Each port is typed by an interface, where the interface of the first
component is specified to use ("usage" dependency) the interface of the
other. The system component contains two parts, one for each component and
I have defined an assembly connector between these parts.
When I validate this model it states that it is only allowed to define a
connector from a port that requires an interface to a port that provides
this interface (which is exactly what I thought I did!).
When I remove the usage dependency from the interfaces and create a usage
dependency from the port to the required interface, the model validates.
For a pragmatic solution this could be (for now) sufficient, but for the
long run this will become problematic.
My interpretation of the UML specification on ports and provided an
required interfaces (as described in the superstructure document from last
november) says that what I did should have resulted in a valid model,
while the current eclipse implementation says it doesn't.
Appearantly eclipse defines the required interfaces by querying for all
interface that are directly used by this port, while the specification
says that this is an indirect association: the required interfaces are
those interfaces that are used by the type (and its supertypes) that
realizes the port. Personally I have no problem with the addition of those
interfaces that are defined to be used directly by the port, but for our
models it would be a bit harsh to have this as a replacement.
Before reporting an issue (or patching my current version of eclipse) I
would like to have the opinion of the community on this matter. Did I
forget something in my original model? Is in this case eclipse in conflict
with the specifications? Anything else?
---8<--- model follows ---8<---
<?xml version="1.0" encoding="UTF-8" ?>
<packagedElement xmi:type="uml:Component" xmi:id="_VJJYwPclEdyapcz8wVpHig"
<ownedAttribute xmi:id="_aXrTIPclEdyapcz8wVpHig" name="client"
<ownedAttribute xmi:id="_eU_dQPclEdyapcz8wVpHig" name="server"
<ownedConnector xmi:id="_g9Yb0PclEdyapcz8wVpHig" name="theConnector"
partWithPort="_aXrTIPclEdyapcz8wVpHig" role="_bOVyMPchEdyapcz8wVpHig" />
partWithPort="_eU_dQPclEdyapcz8wVpHig" role="_YOHicPchEdyapcz8wVpHig" />
<ownedAttribute xmi:type="uml:Port" xmi:id="_bOVyMPchEdyapcz8wVpHig"
name="client" type="_lwxPIPchEdyapcz8wVpHig" aggregation="composite" />
<ownedAttribute xmi:type="uml:Port" xmi:id="_YOHicPchEdyapcz8wVpHig"
name="server" type="_i6FV4PchEdyapcz8wVpHig" aggregation="composite" />
xmi:id="_i6FV4PchEdyapcz8wVpHig" name="IServer" />
<packagedElement xmi:type="uml:Usage" xmi:id="_Byu6sPdGEdyDIYm_lHaeAQ"
supplier="_i6FV4PchEdyapcz8wVpHig" client="_lwxPIPchEdyapcz8wVpHig" />
Powered by FUDForum
. Page generated in 0.06313 seconds