Book a Demo

Author Topic: How to block the use of a stereotype within a class  (Read 3160 times)

PiotrS24

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
How to block the use of a stereotype within a class
« on: February 24, 2020, 12:56:42 am »
Hi

In my meta model I have Entity(dervied from MetaClass Class) and Fields (derived from MetaClass Attribute)
It looks like:

https://drive.google.com/open?id=1F-MpnF9XCtJA5WyQZ0vauIw6xzQQP4di

Is this configuration possible:
that the Field stereotype can be used only within the Entity class attributes?
Such a blockage should probably be combined with a form for selecting stereotypes
https://drive.google.com/open?id=1xlnuWtT1hk9ENQf_W6T_UxV-Mp6v5qph

PiotrS24

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: How to block the use of a stereotype within a class
« Reply #1 on: February 27, 2020, 06:45:25 am »
Hi Sparx  :P

If EA does not have such functionality just write that it is not there, then maybe I will use some other solution or I will do it manually

Reply welcome ...

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to block the use of a stereotype within a class
« Reply #2 on: February 27, 2020, 06:30:09 pm »
Hi Sparx  :P

If EA does not have such functionality just write that it is not there, then maybe I will use some other solution or I will do it manually

Reply welcome ...
Hi Piotr

You are posting on the user forum of Sparx Systems.
And although some of the Sparx employees frequent this forum, there is no guarantee that a Sparx employee will see or respond to your question.

If you want to address Sparx I suggest you use the appropriate form on the website or email [email protected]

With regards to your question, I don't think you can do that using only UML profiles and MDG's. You should be able to write such validation rules in an add-in though.

Geert

PiotrS24

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: How to block the use of a stereotype within a class
« Reply #3 on: February 27, 2020, 10:16:28 pm »
You're right
I will follow these rules.
As for the explanation, I have been using EA for 10 years, and before that it happened that when I asked by e-mail I didn't get the answer or the times were long. That's why it turned out this way.
In conclusion, I will write an e-mail, sorry for the confusion.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to block the use of a stereotype within a class
« Reply #4 on: February 28, 2020, 08:42:12 am »
If it was going to be implemented you would need to add a metaconstraint with umlRole=class from your Field stereotype to your Entity stereotype.

Having said that, no handling of that constraint has been added so the best you can do is use an add-in to implement the rules you want.