Book a Demo

Author Topic: Aliases in meta constraints?  (Read 10073 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Aliases in meta constraints?
« on: July 15, 2021, 04:29:38 am »
Hi all

Looking at the meta-constraints section of the MDG bible and for a number of the constraint values, there are listed what appears to be aliases for each type of constraint. But my question is, are they REALLY aliases? Or do they actually mean something different?

The complete set of constraints with these "aliases" is given below.
So for example, if I set umlRole="realizingConnector", is this identical to setting umlRole="realizingActivityEdge"?
Or do these apply to different sorts of target Stereotypes?

Same question goes for all the others.

Cheers

Jays :-)

* client/source/end[0].role/informationSource
* supplier/target/end[1].role/informationTarget
* realizingConnector/realizingActivityEdge/realizingMessage
* typedElement/instanceSpecification
* owner/class/activity/owningInstance
* ownedElement/ownedAttribute/ownedOperation/ownedParameter/ownedPort
* annotatedElement/constrainedElement

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Aliases in meta constraints?
« Reply #1 on: July 15, 2021, 05:41:39 am »
I'm not really on track with what you're thinking. Maybe it's too late for me? But umlrole is meant to take the metaclass of some basic UML connector (like Association, Dependency, etc.).

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Aliases in meta constraints?
« Reply #2 on: July 15, 2021, 06:12:41 am »
Hey q

Those among us who have been using Sparx for 10+ years are probably all beyond saving ;-)

However, if we look at the MDG documentation [p.75] it offers the following possible values for umlRole:

realizingConnector/realizingActivityEdge/realizingMessage

Does that mean these three values are completely interchangeable or are semantically different?


KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Aliases in meta constraints?
« Reply #3 on: July 15, 2021, 08:01:06 am »
In the UML metamodel, different relationships have their ends named differently. For example, Dependency has a client and a supplier; an InformationFlow has informationSource and informationTarget, etc. These are all evaluated identically by EA, so if you were to use source and target, say, for everything then I don't think EA would complain. I'd recommend using the correct one as defined by the UML spec though.
The Sparx Team
[email protected]

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Aliases in meta constraints?
« Reply #4 on: July 15, 2021, 09:26:03 am »
... if you were to use source and target, say, for everything then I don't think EA would complain. I'd recommend using the correct one as defined by the UML spec though.
Confirmed.

I too would recommend using the correct UML terms where possible just because it encourages you to think about the meaning a little deeper.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Aliases in meta constraints?
« Reply #5 on: July 15, 2021, 09:33:48 am »
Coolio! Thanks for that ladies! :-)

Just as an addendum to the question, can I use Metatypes as well as Stereotypes as the Target in these constraints?

Cheers :-)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Aliases in meta constraints?
« Reply #6 on: July 16, 2021, 09:55:02 am »
Coolio! Thanks for that ladies! :-)
KP doesn't fit that label.

Just as an addendum to the question, can I use Metatypes as well as Stereotypes as the Target in these constraints?
Yes, the help also describes how to use stereotypes in other profiles as the targets.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Aliases in meta constraints?
« Reply #7 on: July 17, 2021, 03:57:34 am »
Hey Eve

I meant can I use Metatypes/UML Types (i.e. Class, Activity, etc...) as the Target Element in Constraints.

Cheers

Jays :-)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Aliases in meta constraints?
« Reply #8 on: July 17, 2021, 06:57:10 am »
I have also only scratched the surface, but IIRC then the answer is yes. I seem to remember having tried that and also seem to remember it worked. Memory is a voloatile thing when you age...

q.