Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Connectors and Provided / Required Interfaces
Connectors and Provided / Required Interfaces [message #477119] Tue, 25 March 2008 10:45 Go to next message
Eclipse UserFriend
Originally posted by: jeroen.kouwer.nl.thalesgroup.com

Hello,

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?

Regareds,
Jeroen Kouwer

---8<--- model follows ---8<---
<?xml version="1.0" encoding="UTF-8" ?>
<uml:Package xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
xmi:id="_oXrmYPUFEdyapcz8wVpHig" name="System">
<packagedElement xmi:type="uml:Component" xmi:id="_VJJYwPclEdyapcz8wVpHig"
name="Main">
<ownedAttribute xmi:id="_aXrTIPclEdyapcz8wVpHig" name="client"
type="_VoHwkPchEdyapcz8wVpHig" />
<ownedAttribute xmi:id="_eU_dQPclEdyapcz8wVpHig" name="server"
type="_JuOxcPchEdyapcz8wVpHig" />
<ownedConnector xmi:id="_g9Yb0PclEdyapcz8wVpHig" name="theConnector"
kind="assembly">
<end xmi:id="_liCSwPclEdyapcz8wVpHig"
partWithPort="_aXrTIPclEdyapcz8wVpHig" role="_bOVyMPchEdyapcz8wVpHig" />
<end xmi:id="_t_F-oPclEdyapcz8wVpHig"
partWithPort="_eU_dQPclEdyapcz8wVpHig" role="_YOHicPchEdyapcz8wVpHig" />
</ownedConnector>
<nestedClassifier xmi:type="uml:Component"
xmi:id="_VoHwkPchEdyapcz8wVpHig" name="Client">
<ownedAttribute xmi:type="uml:Port" xmi:id="_bOVyMPchEdyapcz8wVpHig"
name="client" type="_lwxPIPchEdyapcz8wVpHig" aggregation="composite" />
</nestedClassifier>
<nestedClassifier xmi:type="uml:Component"
xmi:id="_JuOxcPchEdyapcz8wVpHig" name="Server">
<ownedAttribute xmi:type="uml:Port" xmi:id="_YOHicPchEdyapcz8wVpHig"
name="server" type="_i6FV4PchEdyapcz8wVpHig" aggregation="composite" />
</nestedClassifier>
<nestedClassifier xmi:type="uml:Interface"
xmi:id="_i6FV4PchEdyapcz8wVpHig" name="IServer" />
<nestedClassifier xmi:type="uml:Interface"
xmi:id="_lwxPIPchEdyapcz8wVpHig" name="IClient"
clientDependency="_Byu6sPdGEdyDIYm_lHaeAQ" />
<packagedElement xmi:type="uml:Usage" xmi:id="_Byu6sPdGEdyDIYm_lHaeAQ"
supplier="_i6FV4PchEdyapcz8wVpHig" client="_lwxPIPchEdyapcz8wVpHig" />
</packagedElement>
</uml:Package>
Re: Connectors and Provided / Required Interfaces [message #477121 is a reply to message #477119] Tue, 25 March 2008 12:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jeroen.kouwer.nl.thalesgroup.com

Ok, a little update.

Jeroen Kouwer wrote:

> I have a model with three components, one "system" component containing
> two "application" components. Both "application" components have a port.
...
> When I remove the usage dependency from the interfaces and create a usage
> dependency from the port to the required interface, the model validates.

This appeared to be incorrect. The connector in this case was a delegation
connector (I forgot to set the connector to assembly). The source was an
untyped port and the type of the destination was a typed port.

The problem now becomes: how to define an assembly connector in an eclipse
uml model (and still have a valid uml model)?

Regards,
Jeroen Kouwer
Re: Connectors and Provided / Required Interfaces [message #477204 is a reply to message #477121] Mon, 07 April 2008 21:44 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Jeroen,

My apologies for the late reply. I lost the posting in the pile.

From your original posting you mentioned that you typed the two ports in
question with interfaces. If that is the case, then you would have created
provided interfaces on the ports. I'm not certain if this is what you
intended. In such a case, an assembly connector would not satisfy constraint
[5] of connector (p154) "An assembly connector must only be defined from a
required interface or Ports to a provided interface or Ports"

Nevertheless, in order to create an assembly connector between two
connectable elements (parts or ports) you would have to create one port that
provided an interface, say I1 and another port that required that very same
interface. To create a required interface on a port you would type your
port with some class. That class would have a usage dependency on I1.
If you wanted to create an assembly connector between parts typed by
components then one of the parts would have to provide I1 and the other
would have to require I1.

I hope that helps.

Cheers,
- James.




"Jeroen Kouwer" <jeroen.kouwer@nl.thalesgroup.com> wrote in message
news:491a5eeeab436812b30c1e8c06f06374$1@www.eclipse.org...
> Ok, a little update.
>
> Jeroen Kouwer wrote:
>
>> I have a model with three components, one "system" component containing
>> two "application" components. Both "application" components have a port.
> ..
>> When I remove the usage dependency from the interfaces and create a usage
>> dependency from the port to the required interface, the model validates.
>
> This appeared to be incorrect. The connector in this case was a delegation
> connector (I forgot to set the connector to assembly). The source was an
> untyped port and the type of the destination was a typed port.
>
> The problem now becomes: how to define an assembly connector in an eclipse
> uml model (and still have a valid uml model)?
>
> Regards,
> Jeroen Kouwer
>
>
Re: Connectors and Provided / Required Interfaces [message #626256 is a reply to message #477119] Tue, 25 March 2008 12:44 Go to previous message
Eclipse UserFriend
Originally posted by: jeroen.kouwer.nl.thalesgroup.com

Ok, a little update.

Jeroen Kouwer wrote:

> I have a model with three components, one "system" component containing
> two "application" components. Both "application" components have a port.
...
> When I remove the usage dependency from the interfaces and create a usage
> dependency from the port to the required interface, the model validates.

This appeared to be incorrect. The connector in this case was a delegation
connector (I forgot to set the connector to assembly). The source was an
untyped port and the type of the destination was a typed port.

The problem now becomes: how to define an assembly connector in an eclipse
uml model (and still have a valid uml model)?

Regards,
Jeroen Kouwer
Re: Connectors and Provided / Required Interfaces [message #626361 is a reply to message #477121] Mon, 07 April 2008 21:44 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Jeroen,

My apologies for the late reply. I lost the posting in the pile.

From your original posting you mentioned that you typed the two ports in
question with interfaces. If that is the case, then you would have created
provided interfaces on the ports. I'm not certain if this is what you
intended. In such a case, an assembly connector would not satisfy constraint
[5] of connector (p154) "An assembly connector must only be defined from a
required interface or Ports to a provided interface or Ports"

Nevertheless, in order to create an assembly connector between two
connectable elements (parts or ports) you would have to create one port that
provided an interface, say I1 and another port that required that very same
interface. To create a required interface on a port you would type your
port with some class. That class would have a usage dependency on I1.
If you wanted to create an assembly connector between parts typed by
components then one of the parts would have to provide I1 and the other
would have to require I1.

I hope that helps.

Cheers,
- James.




"Jeroen Kouwer" <jeroen.kouwer@nl.thalesgroup.com> wrote in message
news:491a5eeeab436812b30c1e8c06f06374$1@www.eclipse.org...
> Ok, a little update.
>
> Jeroen Kouwer wrote:
>
>> I have a model with three components, one "system" component containing
>> two "application" components. Both "application" components have a port.
> ..
>> When I remove the usage dependency from the interfaces and create a usage
>> dependency from the port to the required interface, the model validates.
>
> This appeared to be incorrect. The connector in this case was a delegation
> connector (I forgot to set the connector to assembly). The source was an
> untyped port and the type of the destination was a typed port.
>
> The problem now becomes: how to define an assembly connector in an eclipse
> uml model (and still have a valid uml model)?
>
> Regards,
> Jeroen Kouwer
>
>
Previous Topic:Package merging
Next Topic:Resolving unqualified names
Goto Forum:
  


Current Time: Tue Apr 23 14:17:34 GMT 2024

Powered by FUDForum. Page generated in 0.03660 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top