Book a Demo

Author Topic: Metarelationship abstract -> concrete specialization doesn't work  (Read 3050 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Hello,


I'm working on a profile where I have an abstract stereotype with two concrete specializations. The two concrete stereotypes work as intended; I've tested them, they're simple enough.

However, I'm running into a problem with the metarelationship between them.

I want to specify that the following permitted relationships:
A)    ConcStereo1  --Aggregation-->  ConcStereo2
B)    ConcStereo2  --Aggregation-->  ConcStereo2


I would have expected to be able to accomplish this by specifying a single metarelationship:
AbstStereo  --metarelationship[Aggregation]-->  ConcStereo2

In other words, specifying that from any concrete specialization of this abstract stereotype, an aggregation may be drawn to ConcStereo2.

This doesn't work. The quick linker only allows the A relationship, not B.

The quick linker clearly recognizes that ConcStereo1 and ConcStero2 are both specializations of AbstStereo. But it seems able to apply this knowledge only when the attempted relationship is drawn between two elements with different specialized stereotypes, not if it's drawn between two elements with the same specialized stereotype.

Why is this?

To be clear: I'm not trying to draw a self connector. I'm trying to draw it between two elements with the same stereotype.


/Uffe
My theories are always correct, just apply them to the right reality.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Metarelationship abstract -> concrete specialization doesn't work
« Reply #1 on: June 02, 2020, 09:13:47 am »
The good news is that I've done exactly what you appear to be describing many times (including right now.)

When the following profile is added to a technology and imported I get "Aggregation to Part" and "Aggregation to Whole" options linking between two instances of ConcStereo2.

Code: [Select]
<?xml version="1.0" encoding="windows-1252"?>
<UMLProfile profiletype="uml2">
<Documentation id="BBE1217E-3" name="AbstractSource" version="1.0" notes="AbstractSource"/>
<Content>
<Stereotypes>
<Stereotype name="AbstStereo" notes="" isAbstract="true">
<metarelationships>
<metarelationship metaclass="Aggregation" constraint="AbstractSource::ConcStereo2"/>
</metarelationships>
</Stereotype>
<Stereotype name="ConcStereo1" notes="" generalizes="AbstStereo" baseStereotypes="AbstStereo">
<AppliesTo>
<Apply type="Class">
<Property name="_HideUmlLinks" value="True"/>
<Property name="isActive" value=""/>
</Apply>
</AppliesTo>
</Stereotype>
<Stereotype name="ConcStereo2" notes="" generalizes="AbstStereo" baseStereotypes="AbstStereo">
<AppliesTo>
<Apply type="Class">
<Property name="_HideUmlLinks" value="True"/>
<Property name="isActive" value=""/>
</Apply>
</AppliesTo>
</Stereotype>
</Stereotypes>
<TaggedValueTypes/>
<ViewDefinitions/>
<Metamodel/>
</Content>
</UMLProfile>

The question is, how is your profile different?