Using EA v11 I have successfully used patterns to build a number of behavioural and structural constructs – I have also embedded them in the toolbox of my MDG.
As an example, but not to be taken too literally, I have a generic DesktopComputer (of stereotype <<component>>) which is comprised of the following items which are of significance to my model:
MS Office <<Application>>
Skype <<Application>>
Windows 7 <<Operating System>>
Optical Disk Drive <<Interface>>
Gigabit LAN <<Interface>>
USB Socket #1 <<Interface>>
USB Socket#2 <<Interface>>
KVM<<Interface>>
Initially I built a single diagram showing the DesktopComputer<< component>> and inside it I placed the various interfaces and components.
I then saved the diagram as an xml pattern, listed it in the appropriate Toolbox Page Extension and combined it into the MDG.
That works fine: My MDG Toolbox shows DesktopComputer as a stereotype, which when dragged and dropped onto a diagram (let’s call it the Generic_IT_Repository_Diagram) and named as “My_Company_Standard_Desktop_Design_Type_1” works fine, and the Project Browser shows that the ‘primary’ component contains all the relevant internal components.
Unfortunately however, when I then take instances of this component onto a deployment diagram, by dragging and dropping and using Paste As Instance, only the top level DesktopComputer appears on diagram, and the Project Browser shows it has not having the lower level components.
A bit of internet research revealed the concept of the Composite Element, so I re-built one of my patterns as a Composite Element complete with chain symbol, saved that as a pattern, incorporated in the Toolbox, but this time dragging from the Toobox fails to generate anything other than the single top level component, so that is worse than before.
I did, by the way, try simply dragging the Composite Element from the Project Browser and that works fine.
I’m unsure whether the problems are as a result of (a) my failure to use the correct elements, or; (b) an attempt on my part to use EA for something for which it was not intended, or; (c) an attempt on my part to breach the rules of UML.
Any help in resolving which would be much appreciated.