Book a Demo

Author Topic: How to instantiate composite components  (Read 3282 times)

ppietrus

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
How to instantiate composite components
« on: July 13, 2007, 03:13:39 pm »
Hi,
I've got a (composite) component related problem and I wonder if anyone may have come across this (or better yet found a solution..)
Namely, I can't figure out a way to create an instance of my OuterComponent in the deployment diagram such that it shows its inner components. Even if I mark 'include Embedded Elements/All embedded elements' when I drag my OuterComponent from the Project Browser to the deployment diagram the new instance in the depl. diagram is only created for the outermost component, not for any inner components.

Here's more detail:

I've got a component called OuterComponent.This component exposes two interfaces I1 and I2.
It contains two inner components InnerComponent1 that implements and exposes I1 and InnerComponent2 that exposes I2
I want to deploy my OuterComponent to multiple servers.
I would like to able to show in my deployment diagrams that an instance of OuterComponent runs on a given node and also have the inner component instances be visible there.


Here's how I tried to get there:
1. Start out by creating a component diagram.
2. Drop a component element, give it a name of "OuterComponent"
3. Drop interface element call it I1, same thing for I2
4. Mark OuterComponent as composite
5. To show that my component exposes I1 and I2, create Port1 and Port2 on OuterComponent and connect them to I1 and I2 using the 'realize' link

Now I need to show subcomponents. Let's start with one subcomponent.

Drag a new component and drop it onto OuterComponent. Add a port to it (Inner1) and connect it to Port1 of the OuterCompoent (While it shows indented under OuterComponent in the ProjectBrowser it is not showing in the Composite diagram of OuterComponent.. but let's continue).

Now on to the deployment diagram, create one, add a Node, and drag and drop my OuterComponent onto it selecting 'as Instance of Element' and selecting 'include Embedded Elements/All Embedded Elements'.
Now looking at the Project Browser I don't see my InnerComponents instantiated for the deployment diagram (only a new instance of OuterComponent is there). Selecting
Composite Element and Show Composite Diagram Contents in the OuterComponent's popup menu does not show InnerComponent either.


I tried going to Composite Diagram of OuterComponent and adding InnerComponent (dragging & dropping InnerComponents on it) by hand but that does not help either.

Is this a bug or am I doing something wrong? Any insight or workarounds?
Note: I want to be able to define the structure of my coarse grained OuterComponent in one place and then 'instantiate' it into multiple deployment diagrams possibly showing internal structure.

Thanks!
Pawel