Book a Demo

Author Topic: UML Relationships  (Read 13115 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
UML Relationships
« on: January 23, 2020, 08:26:51 pm »
Does anybody where can I find the following:a list of all relationships permitted between UML elements as per the specification and those "permitted" by Sparx EA.

For instance, I note that a realisation is not a relationship I can pick between a class and a package, and have some trouble understanding if this because it is semantically incorrect or just because the way Sparx has been implemented.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: UML Relationships
« Reply #1 on: January 23, 2020, 09:10:30 pm »
I don't think a list of "permitted by Sparx" exists.

The ones permitted by the specification you can find in the actual UML specs.
(they also have an xmi of the metamodel you can download

For this particular case the Realization metaclass itself doesn't add additional contraints on it's association end client and supplier
These are defined in Dependency (Realization -> Abstraction -> Dependency) as NamedElement

And since Package is a NamedElement (Package -> Namespace -> NamedElement) and Class is a NamedElement (Class -> BehavioredClassifier -> Classifier -> NameSpace -> NamedElement) a Realization between Class and Package is allowed by UML.

Funny thing is that the quicklinker proposes Realization as a possible relation between a Class and a Package, but if I turn on Strict Connector Syntax I get an error saying the relation is not UML compliant.

Quicklinker and Strict Connector Syntax should use the same set of rules, so this is clearly a bug.

Geert

« Last Edit: January 23, 2020, 10:36:45 pm by Geert Bellekens »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: UML Relationships
« Reply #2 on: January 23, 2020, 10:31:24 pm »
If you open EA.exe with Notepad++ you can find the QL CSV definition in its guts. It's HUGE (no, even more....). I don't know which poor guy has been punished with setting this up and maintaining it. But finding and "rule" guiding that table: you will commit suicide when facing that.

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: UML Relationships
« Reply #3 on: January 24, 2020, 03:13:03 am »
Funny thing is that the quicklinker proposes Realization as a possible relation between a Class and a Package, but if I turn on Strict Connector Syntax I get an error saying the relation is not UML compliant.

Quicklinker and Strict Connector Syntax should use the same set of rules, so this is clearly a bug.
Presumably this is on version 15.X because the quick linker on version 13 does not give that option and do not have a laptop with version 15 with me.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: UML Relationships
« Reply #4 on: January 24, 2020, 05:05:07 am »
Funny thing is that the quicklinker proposes Realization as a possible relation between a Class and a Package, but if I turn on Strict Connector Syntax I get an error saying the relation is not UML compliant.

Quicklinker and Strict Connector Syntax should use the same set of rules, so this is clearly a bug.
Presumably this is on version 15.X because the quick linker on version 13 does not give that option and do not have a laptop with version 15 with me.
Yes, 15.1.1526

Geert

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: UML Relationships
« Reply #5 on: January 24, 2020, 09:44:19 am »
Does anybody where can I find the following:a list of all relationships permitted between UML elements as per the specification and those "permitted" by Sparx EA.
You can get a list in 15.1 as a side effect of the strict perspectives feature, which allows you to restrict how connectors are used. I've used it a lot since it was created to check profile metamodels.
https://www.sparxsystems.com/enterprise_architect_user_guide/15.1/user_interface/techno_sets.html

In the Manage Perspectives dialog, create a new perspective and mark it as strict. Add UML, then click the restrict button. Personally I prefer to disable all, then enable only one relationship before clicking on Link Rules. If you don't do that it will take a while to load the list, but you can move the Link Type from the group box to a column and use it as a filter instead.

For instance, I note that a realisation is not a relationship I can pick between a class and a package, and have some trouble understanding if this because it is semantically incorrect or just because the way Sparx has been implemented.

Funny thing is that the quicklinker proposes Realization as a possible relation between a Class and a Package, but if I turn on Strict Connector Syntax I get an error saying the relation is not UML compliant.
For realization what you'll find is it is valid between any two UML elements. Both the quicklinker and the validation of links is being driven by the same source as this list. Which means something is going wrong with the model validation.

If you open EA.exe with Notepad++ you can find the QL CSV definition in its guts. It's HUGE (no, even more....).
Presumably this is on version 15.X because the quick linker on version 13 does not give that option and do not have a laptop with version 15 with me.
You'll find that quicklinker list much smaller now. Most of the quicklinker is driven by the same metamodel relationships as you can use in your own profiles. The huge table required each concrete relationship to be specified explicitly along with any reverse rules.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: UML Relationships
« Reply #6 on: January 24, 2020, 11:06:52 am »
Which means something is going wrong with the model validation.
Interestingly, I was wrong. Even though turning off strict syntax allowed the connector to be created the problem was actually in the quicklinker. There are a few other relationships being offered there that are also incorrect, and you can create a realization using the toolbox with strict connector syntax.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: UML Relationships
« Reply #7 on: January 25, 2020, 02:15:55 am »
Does anybody where can I find the following:a list of all relationships permitted between UML elements as per the specification and those "permitted" by Sparx EA.
You can get a list in 15.1 as a side effect of the strict perspectives feature, which allows you to restrict how connectors are used. I've used it a lot since it was created to check profile metamodels.
https://www.sparxsystems.com/enterprise_architect_user_guide/15.1/user_interface/techno_sets.html

In the Manage Perspectives dialog, create a new perspective and mark it as strict. Add UML, then click the restrict button. Personally I prefer to disable all, then enable only one relationship before clicking on Link Rules. If you don't do that it will take a while to load the list, but you can move the Link Type from the group box to a column and use it as a filter instead.
Thanks Eve, really interesting. I have just tried what you described here and confirmed that in v15.1.1526 there is a link rule allowing Package to Class Realization and another supporting a Class to Package Realization. Am I correct to assume the following?

  • There is no way to export the information I am seeing when I click restrict
  • I could create a more restrictive profile by disabling specific Elements, Relationships, Diagrams and Link Rules
  • This is new to version 15 and is not available on v13 or v14

 


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: UML Relationships
« Reply #8 on: January 29, 2020, 09:42:32 am »
1. No, we haven't created an export function. Using it as an information source was not the original intention.
2. Yes, although I'd phrase it a little differently. That dialog allows you to define a perspective as a restricted subset of a set of technologies. Once that perspective is created you need to select it or assign it to a security group in order to see the restriction.
3. New to 15.1.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: UML Relationships
« Reply #9 on: January 29, 2020, 09:07:56 pm »
Thanks Eve, an export function would be a nice to have.