Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » can't see connector
can't see connector [message #475153] Tue, 21 August 2007 15:48 Go to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

hi,

I'm looking for connector in the uml diagram but I can't find it. Someone
know why? I see it in javadoc of uml2 so it should be there right?

thx for any help

Nick
Re: can't see connector [message #475156 is a reply to message #475153] Tue, 21 August 2007 17:13 Go to previous messageGo to next message
Bogdan Pistol is currently offline Bogdan PistolFriend
Messages: 29
Registered: July 2009
Junior Member
Hi Nick,

> I'm looking for connector in the uml diagram but I can't find it. Someone
> know why? I see it in javadoc of uml2 so it should be there right?

If you will create a Class then you'll find an option to create an owned
connector.

Bogdan

>
> thx for any help
>
> Nick
Re: can't see connector [message #475163 is a reply to message #475156] Wed, 22 August 2007 09:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

hi,

thx for your reply.

I see the connector (i added a component and then it showed). I want to
connect two components with each other. But an owned connector is only for
one component isn't it? How I connect two components via a connector?

regards,

Nick
Re: can't see connector [message #475167 is a reply to message #475163] Wed, 22 August 2007 12:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Nick,

Connectors are owned by structured classifiers, so you must have a
structured classifier context in which to create your connector.

If you're looking to connect two components together, then you will need a
component (the context) that has two parts or roles (i.e., properties of
some flavour) that are typed by your respective components. Then, you can
connect these two parts and the context component will own the connector.

On either of your component parts, you can also choose to attach the
connector to a port on the part. In this case, the ConnectorEnd will
reference as its "role" the port owned by the component that is the type of
the part, and the ConnectorEnd should reference the part as its
"partWithPort".

HTH,

Christian


Nick Kirtley wrote:

> hi,
>
> thx for your reply.
>
> I see the connector (i added a component and then it showed). I want to
> connect two components with each other. But an owned connector is only for
> one component isn't it? How I connect two components via a connector?
>
> regards,
>
> Nick
Re: can't see connector [message #475181 is a reply to message #475167] Wed, 22 August 2007 13:20 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
.... also, additional (similar) information was added to a post in the
uml2tools newsgroup entitled using "uml2tools" on June 11.

- James.


"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:fah8sb$6pr$1@build.eclipse.org...
> Hi, Nick,
>
> Connectors are owned by structured classifiers, so you must have a
> structured classifier context in which to create your connector.
>
> If you're looking to connect two components together, then you will need a
> component (the context) that has two parts or roles (i.e., properties of
> some flavour) that are typed by your respective components. Then, you can
> connect these two parts and the context component will own the connector.
>
> On either of your component parts, you can also choose to attach the
> connector to a port on the part. In this case, the ConnectorEnd will
> reference as its "role" the port owned by the component that is the type
of
> the part, and the ConnectorEnd should reference the part as its
> "partWithPort".
>
> HTH,
>
> Christian
>
>
> Nick Kirtley wrote:
>
> > hi,
> >
> > thx for your reply.
> >
> > I see the connector (i added a component and then it showed). I want to
> > connect two components with each other. But an owned connector is only
for
> > one component isn't it? How I connect two components via a connector?
> >
> > regards,
> >
> > Nick
>
Re: can't see connector [message #475241 is a reply to message #475181] Mon, 27 August 2007 09:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi James and Christian,

This is what I want:

from the omg uml2 spec.

An assembly connector is a connector between two components that defines
that one component provides the services that
another component requires. An assembly connector is a connector that is
defined from a required interface or port to a
provided interface or port.

I want the connectors to be connected through the ports. As is described
above. So how do you mean that it can't be done James?

regards,
Nick
Re: can't see connector [message #475244 is a reply to message #475241] Mon, 27 August 2007 14:17 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nick,

That exact passage is a bit misleading in the spec.

Connectors connect "ConnectableElements". A component is not a connectable
element.
You can create connectors between parts/roles typed by components in the
context of some other structured classifier.
(That is also what Christian mentioned in his posting.)

All that I was getting at is that you cannot create connectors on component
diagrams between components. There would be no context and the connectors
would be between things that are not connectable elements.

The sentence from the spec "Assembly connector is a connector between two
components ... " is not entirely accurrate, however, all the diagrams in the
discussion ( fig 8.16 etc) show connectors between parts/roles within a
context.


- James.


"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:18b9e1f88853b1ea4f338161b36e625c$1@www.eclipse.org...
> Hi James and Christian,
>
> This is what I want:
>
> from the omg uml2 spec.
>
> An assembly connector is a connector between two components that defines
> that one component provides the services that
> another component requires. An assembly connector is a connector that is
> defined from a required interface or port to a
> provided interface or port.
>
> I want the connectors to be connected through the ports. As is described
> above. So how do you mean that it can't be done James?
>
> regards,
> Nick
>
Re: can't see connector [message #475246 is a reply to message #475244] Mon, 27 August 2007 14:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

ok,

It was slightly inaccurate of me to say connector between two components.
I meant between ports/interfaces.

nick
Re: can't see connector [message #475247 is a reply to message #475246] Mon, 27 August 2007 19:21 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nick,

Just one small clarification, connectors only go between ports or
parts/roles, not interfaces ( including required/provided interfaces on
ports ). Connectors have this alternative ball/socket notation which might
lead you to believe that the end points are required/provided interfaces but
the endpoints are ports or roles.
And connectors should not be drawn between ports on components on a
component diagram, just composite structure diagram ( because of the lack of
context ). Say you were able to draw a connector between ports on a
component diagram... who then owns the connector? It would be ambiguous.
Connectors really convey the notion that "In some particular context, these
roles are connected in this way", in some other context, the roles/ports
could be connected in some completly different way.

I don't mean to flog this point but just want to make sure that we are all
in agreement.

- James.


"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:4525e0fec639d3829086c856ec22090f$1@www.eclipse.org...
> ok,
>
> It was slightly inaccurate of me to say connector between two components.
> I meant between ports/interfaces.
>
> nick
>
Re: can't see connector [message #475257 is a reply to message #475247] Tue, 28 August 2007 13:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi james, thx for that last post, I understand the connector/component
relationship a little better, but I don't think I understand it 100%

It's important I understand this correctly because it's an essential part
of my project.

Let me confirm this:

If I have two components in a component diagram I cannot connect them with
a connector because they have no context?

So even if I have two components: lets say user and billing.

A user uses services, lets say some digital services like renting movies
online. Billing keeps track of billing info. I want to connect these two
because obviously they have a relationship. Can I connect them in a
component diagram (with for ex. connectors that each have a port) or can I
NOT connect them and have to define some sort of context in a context
diagram?

If this example is no good then another example is welcome.

regards,
Nick
Re: can't see connector [message #475259 is a reply to message #475257] Tue, 28 August 2007 15:19 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nick,

Lets take a really silly example just to illustrate a point.

Say you have 3 classes ( or components ). Say, "Hero", "Villain" and
"Sidekick". In a class diagram ( or component diagram ) you could model
these classes (components).
In one context say "Action Movie" you could have some connection between
Hero and Villain, and another connection between Hero and Sidekick.
In another context, say "Romantic Comedy" you could have a connection
between "Hero" and "Sidekick", there would be no connection between "Hero"
and "Villain".

Imagine that you drew connectors between "Hero" and "Villain" in your class
( or component ) diagram. In effect you would be saying that regardless of
context you always have some connection between "Hero" and "Villain", but
this is not the case.

You would need to create some other structured classifier called "Action
Movie" and in that structured classifier, create a composite structure
diagram and show some role typed by hero, a role typed by villain and a role
typed by Sidekick with the connections between them.

For example, say you want to model the movie "Shrek" and assume it is of
type "Action Movie".

Shrek would be playing the role of Hero, donkey would be playing the role
of Sidekick and evil fairy godmother would be plaing the role of Villain and
since the movie Shrek is of type "Action Movie" there would be some
connection between the hero and villain and between hero and sidekick.

In the context of a particular "Romantic Comedy" shrek could be playing the
role of "Sidekick" and donkey could be playing the role of "Hero" and there
would be a relationship between them ( maybey the hero falls in love with
the sidekick ... kinda weird ).

The point here is that in your class/component diagram you model general
components that can be used in different contexts. You wouldn't want to
create connectors between Hero and Villain on your component diagram because
you have no idea what context's Hero and Villain will be used... they may or
may not be "connected".


Keep in mind that you can use Collaborations as context.

( There is no such thing as "context diagram" but rather "composite
structure diagram" )

Does that help?

- James.




"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:0676bd910f2a09d4c960d350761df970$1@www.eclipse.org...
> Hi james, thx for that last post, I understand the connector/component
> relationship a little better, but I don't think I understand it 100%
>
> It's important I understand this correctly because it's an essential part
> of my project.
>
> Let me confirm this:
>
> If I have two components in a component diagram I cannot connect them with
> a connector because they have no context?
>
> So even if I have two components: lets say user and billing.
>
> A user uses services, lets say some digital services like renting movies
> online. Billing keeps track of billing info. I want to connect these two
> because obviously they have a relationship. Can I connect them in a
> component diagram (with for ex. connectors that each have a port) or can I
> NOT connect them and have to define some sort of context in a context
> diagram?
>
> If this example is no good then another example is welcome.
>
> regards,
> Nick
>
Re: can't see connector [message #475355 is a reply to message #475259] Wed, 29 August 2007 11:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi james,

I understand the concept now. But i'm having trouble implementing the
concept into uml2.
Could you explain step by step how to model the shrek example in the uml2
diagram?

thx
Re: can't see connector [message #475359 is a reply to message #475355] Wed, 29 August 2007 15:32 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
In general ....

- Create a component call it C1 ( on a component diagram ).
- Create ports or required/provided interfaces on C1 or the ports as
required. ( there have been previous postings explaining this in detail ).
- Create another Component/Class/Collaboration call it C2.
- Create a property in C2 call it "foo" and set its type to C1.
- Create a composite structure diagram whose context is C2. you should see
foo:C1 with ports/required provided interfaces etc.
- Create connectors on the composite structure diagram between parts/roles.

I'm not sure if UML2Tools project supports composite structure diagrams at
this stage? You can create all of this using the opensource UML2
(tree-like) editor.

- James

"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:a27247de9cdaab5c9ef38ea8d3dfc512$1@www.eclipse.org...
> Hi james,
>
> I understand the concept now. But i'm having trouble implementing the
> concept into uml2.
> Could you explain step by step how to model the shrek example in the uml2
> diagram?
>
> thx
>
Re: can't see connector [message #475365 is a reply to message #475359] Thu, 30 August 2007 12:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Ok got it working up until creating the composite structure diagram.
You're right that it's not working in uml2 tools. How do I do it in the
uml2 diagram editor?

thx
Nick
Re: can't see connector [message #475366 is a reply to message #475365] Thu, 30 August 2007 12:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

One more thing. Is this explained anywhere in the mdt uml2 documentation?
I haven't found it but if it does exist then it would save having to ask
you ;)

nick
Re: can't see connector [message #475367 is a reply to message #475366] Thu, 30 August 2007 13:26 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
General explanations of UML, how it works, the various diagrams and
everything you ever wanted to know ( and more ) is explained in the
Superstructure specification for UML at omg.org. This document keeps
changing as changes are made to UML. MDT UML2 documentation focuses on the
API that is provided but not about how to use UML.

- James.


"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:a804d6a73cff55a908cfac89302421c1$1@www.eclipse.org...
> One more thing. Is this explained anywhere in the mdt uml2 documentation?
> I haven't found it but if it does exist then it would save having to ask
> you ;)
>
> nick
>
Re: can't see connector [message #475369 is a reply to message #475365] Thu, 30 August 2007 13:32 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
UML2 project doesn't have a diagram editor, just a tree-like default EMF
editor.
You can create all the items mentioned by using context menus to create
various child items.
It's a pretty rough way to model UML and is intended to be an example editor
only. I would recommend using UML2Tools diagram editor or extending it
yourself to support Composite Structures or to use another commercial ( or
freebie ) product that does support composite structures.

- James.

"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:fff3c4362540d4197d8e3722fa06fce9$1@www.eclipse.org...
> Ok got it working up until creating the composite structure diagram.
> You're right that it's not working in uml2 tools. How do I do it in the
> uml2 diagram editor?
>
> thx
> Nick
>
Re: can't see connector [message #475371 is a reply to message #475367] Thu, 30 August 2007 13:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

ok and how do I do this in the uml2 diagram editor?

-Create a composite structure diagram whose context is C2. you should see
foo:C1 with ports/required provided interfaces etc.

nick
Re: can't see connector [message #475372 is a reply to message #475369] Thu, 30 August 2007 13:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi james,

yeah but I only need it for very simple situations ( and later on more
complicated ones. but that can wait ), more proof of concept at the
moment. You said that it was possible in the uml2 tree editor(which is
what i meant when i said uml2 diagram editor) to create a composite
structure, yet I haven't found that option.

nick
Re: can't see connector [message #475376 is a reply to message #475372] Thu, 30 August 2007 14:20 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
The suggestion of creating a composite structure diagram was if you were
using UML2Tools or a tool other than the default UML2 tree editor ( since
there are no diagrams in this perspective ). I was talking about how to do
such a thing in general terms.

You just...

Create a component C1.
Create a component C2
Create a property of C2 called foo.
type foo with C1.


- James.


"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:a7d3d9f8941f745e6d14bf07eb5f29fa$1@www.eclipse.org...
> Hi james,
>
> yeah but I only need it for very simple situations ( and later on more
> complicated ones. but that can wait ), more proof of concept at the
> moment. You said that it was possible in the uml2 tree editor(which is
> what i meant when i said uml2 diagram editor) to create a composite
> structure, yet I haven't found that option.
>
> nick
>
Re: can't see connector [message #475574 is a reply to message #475376] Fri, 31 August 2007 08:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi,

Yes but now I haven't created a connector between c1 and c2. This should
be done in a composite structure right? How do I do this in the uml editor?

nick
Re: can't see connector [message #475583 is a reply to message #475574] Fri, 31 August 2007 16:51 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
The connector would be created under the component C2 (i.e. in the context
of C2 ) between foo and another part typed by some other classifier in the
same way that every other relationship (or element) is created.
( Not directly between C1 and C2 as mentioned previously )

A composite structure diagram visually depicts the internal structure of
some structured classifier.
The uml editor lets you define semantically what that internal structure is.

The internal structure of C2 could have 2 parts ( ie. "foo" as mentioned
previously and some other part ) and the connector that you would create as
you would any other element.

- James.



"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:7c922f789a069bdc8eb506251d854903$1@www.eclipse.org...
> Hi,
>
> Yes but now I haven't created a connector between c1 and c2. This should
> be done in a composite structure right? How do I do this in the uml
> editor?
>
> nick
>
Re: can't see connector [message #475849 is a reply to message #475583] Mon, 10 September 2007 11:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

hi,

this is what I've done:

created a component c1
created port named e
stereotyped e with a stereotype

created a component c2
created a port named c
stereotyped c with a stereotype

created a property (selected c2, New child->OwnedAttribute->Property)
called the property foo, typed it with c1
created a property
called the property bar, typed it with c2

created a connector
created 2 connector ends
added foo to one of the roles and bar as the other.

is this how I should correctly connect two components within a context?

I get an error when I validate the model:

Assembly connector 'connector' must only be defined from a role end
requiring an interface to a role end providing that interface.

what am I doing wrong?

thx
Nick
Re: can't see connector [message #475851 is a reply to message #475849] Mon, 10 September 2007 20:13 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
To get rid of that warning, one of the parts at the end of the connector
should "provide" an interface and the part at the other end should "require"
that same interface.
Creating required and provided interfaces was already mentioned in previous
threads.

However, that particular constraint makes "sketcthing" composite structure
diagrams very difficult and leads to other issues with communication
diagrams so in my humble opinion you could almost place lesser importance on
this particular constraint .

An issue has been raised with this constraint at the OMG. But for the time
being, if you want to be "by the book" then you should create
required\provided interfaces as mentioned.

- James.

"nick kirtley" <nickkirtley@gmail.com> wrote in message
news:bd81ef459322fb066c333999cd1e633a$1@www.eclipse.org...
> hi,
>
> this is what I've done:
>
> created a component c1
> created port named e
> stereotyped e with a stereotype
>
> created a component c2
> created a port named c
> stereotyped c with a stereotype
>
> created a property (selected c2, New child->OwnedAttribute->Property)
> called the property foo, typed it with c1
> created a property
> called the property bar, typed it with c2
>
> created a connector
> created 2 connector ends
> added foo to one of the roles and bar as the other.
>
> is this how I should correctly connect two components within a context?
>
> I get an error when I validate the model:
>
> Assembly connector 'connector' must only be defined from a role end
> requiring an interface to a role end providing that interface.
>
> what am I doing wrong?
>
> thx
> Nick
>
Re: can't see connector [message #476440 is a reply to message #475851] Tue, 30 October 2007 10:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

sorry to bring this up again ;)

From this thread I learnt how to make a connector between two components.

This works fine and validates properly.

One of the components owns the connector with the connector ends role set
as properties typed by the two components. However, in this case the
'receiving' component, or c2, doesn't contain any information about the
connector. If I have two components and a connector in between then surely
the 'receiving/other' end should have a reference to the connector as well?

regards,
nick
Re: can't see connector [message #476446 is a reply to message #476440] Wed, 31 October 2007 17:56 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nick,

A connector can be "typed" by an association which is a way of providing
information about how the components typing the role's being connected are
associated. However, connectors do not have to specify a type.

The ConnectableElement::getEnds() might also be of some use in determining
'other' ends given a particular role or part that is connected.

Cheers,

- James.

"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:1a3766f6d9d7b8c804b4d6e000f02028$1@www.eclipse.org...
> sorry to bring this up again ;)
>
> From this thread I learnt how to make a connector between two components.
>
> This works fine and validates properly.
>
> One of the components owns the connector with the connector ends role set
> as properties typed by the two components. However, in this case the
> 'receiving' component, or c2, doesn't contain any information about the
> connector. If I have two components and a connector in between then surely
> the 'receiving/other' end should have a reference to the connector as
> well?
>
> regards,
> nick
>
Re: can't see connector [message #476447 is a reply to message #476446] Thu, 01 November 2007 09:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

A connector can be "typed" by an association which is a way of providing
information about how the components typing the role's being connected are
associated. However, connectors do not have to specify a type.

The ConnectableElement::getEnds() might also be of some use in determining
'other' ends given a particular role or part that is connected.

Hi

Could you explain what you mean by typing an association using an example
with uml tree editor.

Also , my point was that the calling side of the connector contains all of
the information regarding the connector. So if I can only view the
information contained within the receiving component, how then can I tell
if it has been connected. The ConnectableElement::getEnds() only works if
you have access to the connector itself, thus the calling end.

regards,
Nick
Re: can't see connector [message #476448 is a reply to message #476447] Thu, 01 November 2007 13:39 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
1. Not sure what you mean about "calling side of connector".
2. Also not sure what you mean by "The ConnectableElement::getEnds() only
works if
you have access to the connector itself, thus the calling end." . A
role or part is a connectable element ( not a connector ). You can call
this method if you have anything the connector is connected to (connectors
are connected to connectable elements ), and not the connector itself.
3. Typing the connector with an association involves simply setting the
connectors type.

- James.


"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:69251a5827fa183519ac04b214c9ad23$1@www.eclipse.org...
>A connector can be "typed" by an association which is a way of providing
>information about how the components typing the role's being connected are
>associated. However, connectors do not have to specify a type.
>
> The ConnectableElement::getEnds() might also be of some use in determining
> 'other' ends given a particular role or part that is connected.
>
> Hi
>
> Could you explain what you mean by typing an association using an example
> with uml tree editor.
>
> Also , my point was that the calling side of the connector contains all of
> the information regarding the connector. So if I can only view the
> information contained within the receiving component, how then can I tell
> if it has been connected. The ConnectableElement::getEnds() only works if
> you have access to the connector itself, thus the calling end.
>
> regards,
> Nick
>
Re: can't see connector [message #624455 is a reply to message #475153] Tue, 21 August 2007 17:13 Go to previous message
Bogdan Pistol is currently offline Bogdan PistolFriend
Messages: 29
Registered: July 2009
Junior Member
Hi Nick,

> I'm looking for connector in the uml diagram but I can't find it. Someone
> know why? I see it in javadoc of uml2 so it should be there right?

If you will create a Class then you'll find an option to create an owned
connector.

Bogdan

>
> thx for any help
>
> Nick
Re: can't see connector [message #624457 is a reply to message #475156] Wed, 22 August 2007 09:59 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

hi,

thx for your reply.

I see the connector (i added a component and then it showed). I want to
connect two components with each other. But an owned connector is only for
one component isn't it? How I connect two components via a connector?

regards,

Nick
Re: can't see connector [message #624458 is a reply to message #475163] Wed, 22 August 2007 12:06 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Nick,

Connectors are owned by structured classifiers, so you must have a
structured classifier context in which to create your connector.

If you're looking to connect two components together, then you will need a
component (the context) that has two parts or roles (i.e., properties of
some flavour) that are typed by your respective components. Then, you can
connect these two parts and the context component will own the connector.

On either of your component parts, you can also choose to attach the
connector to a port on the part. In this case, the ConnectorEnd will
reference as its "role" the port owned by the component that is the type of
the part, and the ConnectorEnd should reference the part as its
"partWithPort".

HTH,

Christian


Nick Kirtley wrote:

> hi,
>
> thx for your reply.
>
> I see the connector (i added a component and then it showed). I want to
> connect two components with each other. But an owned connector is only for
> one component isn't it? How I connect two components via a connector?
>
> regards,
>
> Nick
Re: can't see connector [message #624463 is a reply to message #475167] Wed, 22 August 2007 13:20 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
.... also, additional (similar) information was added to a post in the
uml2tools newsgroup entitled using "uml2tools" on June 11.

- James.


"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:fah8sb$6pr$1@build.eclipse.org...
> Hi, Nick,
>
> Connectors are owned by structured classifiers, so you must have a
> structured classifier context in which to create your connector.
>
> If you're looking to connect two components together, then you will need a
> component (the context) that has two parts or roles (i.e., properties of
> some flavour) that are typed by your respective components. Then, you can
> connect these two parts and the context component will own the connector.
>
> On either of your component parts, you can also choose to attach the
> connector to a port on the part. In this case, the ConnectorEnd will
> reference as its "role" the port owned by the component that is the type
of
> the part, and the ConnectorEnd should reference the part as its
> "partWithPort".
>
> HTH,
>
> Christian
>
>
> Nick Kirtley wrote:
>
> > hi,
> >
> > thx for your reply.
> >
> > I see the connector (i added a component and then it showed). I want to
> > connect two components with each other. But an owned connector is only
for
> > one component isn't it? How I connect two components via a connector?
> >
> > regards,
> >
> > Nick
>
Re: can't see connector [message #624542 is a reply to message #475181] Mon, 27 August 2007 09:05 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi James and Christian,

This is what I want:

from the omg uml2 spec.

An assembly connector is a connector between two components that defines
that one component provides the services that
another component requires. An assembly connector is a connector that is
defined from a required interface or port to a
provided interface or port.

I want the connectors to be connected through the ports. As is described
above. So how do you mean that it can't be done James?

regards,
Nick
Re: can't see connector [message #624544 is a reply to message #475241] Mon, 27 August 2007 14:17 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nick,

That exact passage is a bit misleading in the spec.

Connectors connect "ConnectableElements". A component is not a connectable
element.
You can create connectors between parts/roles typed by components in the
context of some other structured classifier.
(That is also what Christian mentioned in his posting.)

All that I was getting at is that you cannot create connectors on component
diagrams between components. There would be no context and the connectors
would be between things that are not connectable elements.

The sentence from the spec "Assembly connector is a connector between two
components ... " is not entirely accurrate, however, all the diagrams in the
discussion ( fig 8.16 etc) show connectors between parts/roles within a
context.


- James.


"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:18b9e1f88853b1ea4f338161b36e625c$1@www.eclipse.org...
> Hi James and Christian,
>
> This is what I want:
>
> from the omg uml2 spec.
>
> An assembly connector is a connector between two components that defines
> that one component provides the services that
> another component requires. An assembly connector is a connector that is
> defined from a required interface or port to a
> provided interface or port.
>
> I want the connectors to be connected through the ports. As is described
> above. So how do you mean that it can't be done James?
>
> regards,
> Nick
>
Re: can't see connector [message #624545 is a reply to message #475244] Mon, 27 August 2007 14:58 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

ok,

It was slightly inaccurate of me to say connector between two components.
I meant between ports/interfaces.

nick
Re: can't see connector [message #624546 is a reply to message #475246] Mon, 27 August 2007 19:21 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nick,

Just one small clarification, connectors only go between ports or
parts/roles, not interfaces ( including required/provided interfaces on
ports ). Connectors have this alternative ball/socket notation which might
lead you to believe that the end points are required/provided interfaces but
the endpoints are ports or roles.
And connectors should not be drawn between ports on components on a
component diagram, just composite structure diagram ( because of the lack of
context ). Say you were able to draw a connector between ports on a
component diagram... who then owns the connector? It would be ambiguous.
Connectors really convey the notion that "In some particular context, these
roles are connected in this way", in some other context, the roles/ports
could be connected in some completly different way.

I don't mean to flog this point but just want to make sure that we are all
in agreement.

- James.


"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:4525e0fec639d3829086c856ec22090f$1@www.eclipse.org...
> ok,
>
> It was slightly inaccurate of me to say connector between two components.
> I meant between ports/interfaces.
>
> nick
>
Re: can't see connector [message #624550 is a reply to message #475247] Tue, 28 August 2007 13:55 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi james, thx for that last post, I understand the connector/component
relationship a little better, but I don't think I understand it 100%

It's important I understand this correctly because it's an essential part
of my project.

Let me confirm this:

If I have two components in a component diagram I cannot connect them with
a connector because they have no context?

So even if I have two components: lets say user and billing.

A user uses services, lets say some digital services like renting movies
online. Billing keeps track of billing info. I want to connect these two
because obviously they have a relationship. Can I connect them in a
component diagram (with for ex. connectors that each have a port) or can I
NOT connect them and have to define some sort of context in a context
diagram?

If this example is no good then another example is welcome.

regards,
Nick
Re: can't see connector [message #624551 is a reply to message #475257] Tue, 28 August 2007 15:19 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nick,

Lets take a really silly example just to illustrate a point.

Say you have 3 classes ( or components ). Say, "Hero", "Villain" and
"Sidekick". In a class diagram ( or component diagram ) you could model
these classes (components).
In one context say "Action Movie" you could have some connection between
Hero and Villain, and another connection between Hero and Sidekick.
In another context, say "Romantic Comedy" you could have a connection
between "Hero" and "Sidekick", there would be no connection between "Hero"
and "Villain".

Imagine that you drew connectors between "Hero" and "Villain" in your class
( or component ) diagram. In effect you would be saying that regardless of
context you always have some connection between "Hero" and "Villain", but
this is not the case.

You would need to create some other structured classifier called "Action
Movie" and in that structured classifier, create a composite structure
diagram and show some role typed by hero, a role typed by villain and a role
typed by Sidekick with the connections between them.

For example, say you want to model the movie "Shrek" and assume it is of
type "Action Movie".

Shrek would be playing the role of Hero, donkey would be playing the role
of Sidekick and evil fairy godmother would be plaing the role of Villain and
since the movie Shrek is of type "Action Movie" there would be some
connection between the hero and villain and between hero and sidekick.

In the context of a particular "Romantic Comedy" shrek could be playing the
role of "Sidekick" and donkey could be playing the role of "Hero" and there
would be a relationship between them ( maybey the hero falls in love with
the sidekick ... kinda weird ).

The point here is that in your class/component diagram you model general
components that can be used in different contexts. You wouldn't want to
create connectors between Hero and Villain on your component diagram because
you have no idea what context's Hero and Villain will be used... they may or
may not be "connected".


Keep in mind that you can use Collaborations as context.

( There is no such thing as "context diagram" but rather "composite
structure diagram" )

Does that help?

- James.




"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:0676bd910f2a09d4c960d350761df970$1@www.eclipse.org...
> Hi james, thx for that last post, I understand the connector/component
> relationship a little better, but I don't think I understand it 100%
>
> It's important I understand this correctly because it's an essential part
> of my project.
>
> Let me confirm this:
>
> If I have two components in a component diagram I cannot connect them with
> a connector because they have no context?
>
> So even if I have two components: lets say user and billing.
>
> A user uses services, lets say some digital services like renting movies
> online. Billing keeps track of billing info. I want to connect these two
> because obviously they have a relationship. Can I connect them in a
> component diagram (with for ex. connectors that each have a port) or can I
> NOT connect them and have to define some sort of context in a context
> diagram?
>
> If this example is no good then another example is welcome.
>
> regards,
> Nick
>
Re: can't see connector [message #624573 is a reply to message #475259] Wed, 29 August 2007 11:03 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi james,

I understand the concept now. But i'm having trouble implementing the
concept into uml2.
Could you explain step by step how to model the shrek example in the uml2
diagram?

thx
Re: can't see connector [message #624576 is a reply to message #475355] Wed, 29 August 2007 15:32 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
In general ....

- Create a component call it C1 ( on a component diagram ).
- Create ports or required/provided interfaces on C1 or the ports as
required. ( there have been previous postings explaining this in detail ).
- Create another Component/Class/Collaboration call it C2.
- Create a property in C2 call it "foo" and set its type to C1.
- Create a composite structure diagram whose context is C2. you should see
foo:C1 with ports/required provided interfaces etc.
- Create connectors on the composite structure diagram between parts/roles.

I'm not sure if UML2Tools project supports composite structure diagrams at
this stage? You can create all of this using the opensource UML2
(tree-like) editor.

- James

"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:a27247de9cdaab5c9ef38ea8d3dfc512$1@www.eclipse.org...
> Hi james,
>
> I understand the concept now. But i'm having trouble implementing the
> concept into uml2.
> Could you explain step by step how to model the shrek example in the uml2
> diagram?
>
> thx
>
Re: can't see connector [message #624582 is a reply to message #475359] Thu, 30 August 2007 12:38 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Ok got it working up until creating the composite structure diagram.
You're right that it's not working in uml2 tools. How do I do it in the
uml2 diagram editor?

thx
Nick
Re: can't see connector [message #624584 is a reply to message #475365] Thu, 30 August 2007 12:42 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

One more thing. Is this explained anywhere in the mdt uml2 documentation?
I haven't found it but if it does exist then it would save having to ask
you ;)

nick
Re: can't see connector [message #624586 is a reply to message #475366] Thu, 30 August 2007 13:26 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
General explanations of UML, how it works, the various diagrams and
everything you ever wanted to know ( and more ) is explained in the
Superstructure specification for UML at omg.org. This document keeps
changing as changes are made to UML. MDT UML2 documentation focuses on the
API that is provided but not about how to use UML.

- James.


"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:a804d6a73cff55a908cfac89302421c1$1@www.eclipse.org...
> One more thing. Is this explained anywhere in the mdt uml2 documentation?
> I haven't found it but if it does exist then it would save having to ask
> you ;)
>
> nick
>
Re: can't see connector [message #624588 is a reply to message #475365] Thu, 30 August 2007 13:32 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
UML2 project doesn't have a diagram editor, just a tree-like default EMF
editor.
You can create all the items mentioned by using context menus to create
various child items.
It's a pretty rough way to model UML and is intended to be an example editor
only. I would recommend using UML2Tools diagram editor or extending it
yourself to support Composite Structures or to use another commercial ( or
freebie ) product that does support composite structures.

- James.

"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:fff3c4362540d4197d8e3722fa06fce9$1@www.eclipse.org...
> Ok got it working up until creating the composite structure diagram.
> You're right that it's not working in uml2 tools. How do I do it in the
> uml2 diagram editor?
>
> thx
> Nick
>
Re: can't see connector [message #624590 is a reply to message #475367] Thu, 30 August 2007 13:32 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

ok and how do I do this in the uml2 diagram editor?

-Create a composite structure diagram whose context is C2. you should see
foo:C1 with ports/required provided interfaces etc.

nick
Re: can't see connector [message #624591 is a reply to message #475369] Thu, 30 August 2007 13:44 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi james,

yeah but I only need it for very simple situations ( and later on more
complicated ones. but that can wait ), more proof of concept at the
moment. You said that it was possible in the uml2 tree editor(which is
what i meant when i said uml2 diagram editor) to create a composite
structure, yet I haven't found that option.

nick
Re: can't see connector [message #624593 is a reply to message #475372] Thu, 30 August 2007 14:20 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
The suggestion of creating a composite structure diagram was if you were
using UML2Tools or a tool other than the default UML2 tree editor ( since
there are no diagrams in this perspective ). I was talking about how to do
such a thing in general terms.

You just...

Create a component C1.
Create a component C2
Create a property of C2 called foo.
type foo with C1.


- James.


"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:a7d3d9f8941f745e6d14bf07eb5f29fa$1@www.eclipse.org...
> Hi james,
>
> yeah but I only need it for very simple situations ( and later on more
> complicated ones. but that can wait ), more proof of concept at the
> moment. You said that it was possible in the uml2 tree editor(which is
> what i meant when i said uml2 diagram editor) to create a composite
> structure, yet I haven't found that option.
>
> nick
>
Re: can't see connector [message #624601 is a reply to message #475376] Fri, 31 August 2007 08:59 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi,

Yes but now I haven't created a connector between c1 and c2. This should
be done in a composite structure right? How do I do this in the uml editor?

nick
Re: can't see connector [message #624610 is a reply to message #475574] Fri, 31 August 2007 16:51 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
The connector would be created under the component C2 (i.e. in the context
of C2 ) between foo and another part typed by some other classifier in the
same way that every other relationship (or element) is created.
( Not directly between C1 and C2 as mentioned previously )

A composite structure diagram visually depicts the internal structure of
some structured classifier.
The uml editor lets you define semantically what that internal structure is.

The internal structure of C2 could have 2 parts ( ie. "foo" as mentioned
previously and some other part ) and the connector that you would create as
you would any other element.

- James.



"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:7c922f789a069bdc8eb506251d854903$1@www.eclipse.org...
> Hi,
>
> Yes but now I haven't created a connector between c1 and c2. This should
> be done in a composite structure right? How do I do this in the uml
> editor?
>
> nick
>
Re: can't see connector [message #624740 is a reply to message #475583] Mon, 10 September 2007 11:03 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

hi,

this is what I've done:

created a component c1
created port named e
stereotyped e with a stereotype

created a component c2
created a port named c
stereotyped c with a stereotype

created a property (selected c2, New child->OwnedAttribute->Property)
called the property foo, typed it with c1
created a property
called the property bar, typed it with c2

created a connector
created 2 connector ends
added foo to one of the roles and bar as the other.

is this how I should correctly connect two components within a context?

I get an error when I validate the model:

Assembly connector 'connector' must only be defined from a role end
requiring an interface to a role end providing that interface.

what am I doing wrong?

thx
Nick
Re: can't see connector [message #624742 is a reply to message #475849] Mon, 10 September 2007 20:13 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
To get rid of that warning, one of the parts at the end of the connector
should "provide" an interface and the part at the other end should "require"
that same interface.
Creating required and provided interfaces was already mentioned in previous
threads.

However, that particular constraint makes "sketcthing" composite structure
diagrams very difficult and leads to other issues with communication
diagrams so in my humble opinion you could almost place lesser importance on
this particular constraint .

An issue has been raised with this constraint at the OMG. But for the time
being, if you want to be "by the book" then you should create
required\provided interfaces as mentioned.

- James.

"nick kirtley" <nickkirtley@gmail.com> wrote in message
news:bd81ef459322fb066c333999cd1e633a$1@www.eclipse.org...
> hi,
>
> this is what I've done:
>
> created a component c1
> created port named e
> stereotyped e with a stereotype
>
> created a component c2
> created a port named c
> stereotyped c with a stereotype
>
> created a property (selected c2, New child->OwnedAttribute->Property)
> called the property foo, typed it with c1
> created a property
> called the property bar, typed it with c2
>
> created a connector
> created 2 connector ends
> added foo to one of the roles and bar as the other.
>
> is this how I should correctly connect two components within a context?
>
> I get an error when I validate the model:
>
> Assembly connector 'connector' must only be defined from a role end
> requiring an interface to a role end providing that interface.
>
> what am I doing wrong?
>
> thx
> Nick
>
Re: can't see connector [message #625343 is a reply to message #475851] Tue, 30 October 2007 10:12 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

sorry to bring this up again ;)

From this thread I learnt how to make a connector between two components.

This works fine and validates properly.

One of the components owns the connector with the connector ends role set
as properties typed by the two components. However, in this case the
'receiving' component, or c2, doesn't contain any information about the
connector. If I have two components and a connector in between then surely
the 'receiving/other' end should have a reference to the connector as well?

regards,
nick
Re: can't see connector [message #625349 is a reply to message #476440] Wed, 31 October 2007 17:56 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nick,

A connector can be "typed" by an association which is a way of providing
information about how the components typing the role's being connected are
associated. However, connectors do not have to specify a type.

The ConnectableElement::getEnds() might also be of some use in determining
'other' ends given a particular role or part that is connected.

Cheers,

- James.

"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:1a3766f6d9d7b8c804b4d6e000f02028$1@www.eclipse.org...
> sorry to bring this up again ;)
>
> From this thread I learnt how to make a connector between two components.
>
> This works fine and validates properly.
>
> One of the components owns the connector with the connector ends role set
> as properties typed by the two components. However, in this case the
> 'receiving' component, or c2, doesn't contain any information about the
> connector. If I have two components and a connector in between then surely
> the 'receiving/other' end should have a reference to the connector as
> well?
>
> regards,
> nick
>
Re: can't see connector [message #625350 is a reply to message #476446] Thu, 01 November 2007 09:44 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

A connector can be "typed" by an association which is a way of providing
information about how the components typing the role's being connected are
associated. However, connectors do not have to specify a type.

The ConnectableElement::getEnds() might also be of some use in determining
'other' ends given a particular role or part that is connected.

Hi

Could you explain what you mean by typing an association using an example
with uml tree editor.

Also , my point was that the calling side of the connector contains all of
the information regarding the connector. So if I can only view the
information contained within the receiving component, how then can I tell
if it has been connected. The ConnectableElement::getEnds() only works if
you have access to the connector itself, thus the calling end.

regards,
Nick
Re: can't see connector [message #625351 is a reply to message #476447] Thu, 01 November 2007 13:39 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
1. Not sure what you mean about "calling side of connector".
2. Also not sure what you mean by "The ConnectableElement::getEnds() only
works if
you have access to the connector itself, thus the calling end." . A
role or part is a connectable element ( not a connector ). You can call
this method if you have anything the connector is connected to (connectors
are connected to connectable elements ), and not the connector itself.
3. Typing the connector with an association involves simply setting the
connectors type.

- James.


"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:69251a5827fa183519ac04b214c9ad23$1@www.eclipse.org...
>A connector can be "typed" by an association which is a way of providing
>information about how the components typing the role's being connected are
>associated. However, connectors do not have to specify a type.
>
> The ConnectableElement::getEnds() might also be of some use in determining
> 'other' ends given a particular role or part that is connected.
>
> Hi
>
> Could you explain what you mean by typing an association using an example
> with uml tree editor.
>
> Also , my point was that the calling side of the connector contains all of
> the information regarding the connector. So if I can only view the
> information contained within the receiving component, how then can I tell
> if it has been connected. The ConnectableElement::getEnds() only works if
> you have access to the connector itself, thus the calling end.
>
> regards,
> Nick
>
Previous Topic:UML 2.2
Next Topic:[Announce] MDT UML2 2.2.0 I200711021052 is available
Goto Forum:
  


Current Time: Fri Dec 15 06:34:18 GMT 2017

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

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