Book a Demo

Author Topic: Option to extend MDG metacontraints beyond the Model Validation  (Read 3237 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Option to extend MDG metacontraints beyond the Model Validation
« on: December 10, 2020, 07:47:22 pm »
Meta model contraints are really useful e.g. I found the metaconstraint with umlRole = ownedPort really interesting to restrict stereotyped ports to be created against a chosen stereotype
e.g. "Type1" components can only have "Type1" ports, "Type2" components can only have "Type2" ports...

It works if I run New Child Element on the component -> I only get the Type1 port for a Type1 component.
I also understand this metaconstraint is used by the Model Validation feature.

The issue is that I can create a Type2 port from the toolbox on a Type1 Component.

Would it be possible to add an option or a new umlRole value that would prevent a user from creating a Type2 port on a Type1 component for instance?
Or is there an option out there that would let me achieve the above?

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Option to extend MDG metacontraints beyond the Model Validation
« Reply #1 on: December 10, 2020, 09:20:07 pm »
Meta model contraints are really useful e.g. I found the metaconstraint with umlRole = ownedPort really interesting to restrict stereotyped ports to be created against a chosen stereotype
e.g. "Type1" components can only have "Type1" ports, "Type2" components can only have "Type2" ports...

It works if I run New Child Element on the component -> I only get the Type1 port for a Type1 component.
I also understand this metaconstraint is used by the Model Validation feature.

The issue is that I can create a Type2 port from the toolbox on a Type1 Component.

Would it be possible to add an option or a new umlRole value that would prevent a user from creating a Type2 port on a Type1 component for instance?
Or is there an option out there that would let me achieve the above?
Hi Guillaume,

Sounds more like a defect to me.  If you can't create it from scratch, you shouldn't be able to do so "ex post facto".

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!