Search code examples
componentsumlinstanceenterprise-architect

Correctly representing nested/sub components in EA 16


Assume I have the following structure:

enter image description here

Currently it is best practice in my company to represent sub-components in the following way.

Invalid

This is, however, not valid as it is impossible to have the same sub-component twice (imagine having a car with 4 tires) and it is lacking the horizontal line on the parent component, which indicates the compartment.

Now, in EA15 I would be able to insert the sub-component as an instance. The image below shows a result, which is in line with the example provided by the UML 2.5.1 specification on page 214 and therefore desired.

Looks valid

Unfortunately, inserting the sub-component as an instance in EA16 yields:

Not in line with UML 2.5.1?

In the UML specification the underline is reserved for instances. Hence, EA16 now represents the instance correctly (in contrast to EA15). However, the UML specification explicitly mentions for the example on page 214 that it shows a "Component that contains other Components" and not a component that contains instances of other components.

Example from UML 2.5.1 specification

So, how do I produce the correct output in EA16?

Note: I also considered to insert the sub-component as a property (part is not available). One of the major downsides is that the icon for the component is missing. This might be counter-intutitive to most of my colleagues.


Solution

  • As usual EA has it's own way of naming things. If you start with this

    enter image description here

    then you can drag the Sub Component from the browser over Main Component. Now from the dialog that pops up

    enter image description here

    choose Property and OK.

    EA will plaster that "somewhere"

    enter image description here

    Now you have to resize Main Component and then move Sub Component so it will dock inside. And voila (or whatever the Aussies say):

    enter image description here

    there is your Part!