Author Topic: Limit Object stereotype associations  (Read 116 times)

rupertkiwi

  • EA User
  • **
  • Posts: 39
  • Karma: +3/-0
    • View Profile
Limit Object stereotype associations
« on: March 14, 2019, 04:38:56 pm »
Hi,

Is it possible to limit which stereotypes an object can be associated with?

I.e. Objects of stereotype 'A' can be associated with objects of stereotype 'B' and 'D', but not associated with 'C' ?

Can this be established in a UML profile?

Thanks,
Rupert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2567
  • Karma: +36/-2
    • View Profile
Re: Limit Object stereotype associations
« Reply #1 on: March 14, 2019, 04:57:06 pm »
Yes, there were three new mechanisms added to UML Profiles in EA 14 for just this sort of thing. Check out the help at

https://sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/metamodelconstraints.html
The Sparx Team
support@sparxsystems.com

rupertkiwi

  • EA User
  • **
  • Posts: 39
  • Karma: +3/-0
    • View Profile
Re: Limit Object stereotype associations
« Reply #2 on: March 14, 2019, 05:09:24 pm »
Thanks for your reply KP.

We are running v13. Might be time for us to upgrade.

Thanks,
Rupert

rupertkiwi

  • EA User
  • **
  • Posts: 39
  • Karma: +3/-0
    • View Profile
Re: Limit Object stereotype associations
« Reply #3 on: March 15, 2019, 10:45:51 am »
Hi KP,

The help seems to be quite difficult to follow.

To limit the type of stereotype that a stereotype can connect to do I use the 'type' value of the 'umlrole' tagged value ? It's not really clear in the help document that you sent me.

Thanks,
Rupert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2567
  • Karma: +36/-2
    • View Profile
Re: Limit Object stereotype associations
« Reply #4 on: March 15, 2019, 12:07:27 pm »
No, that would be for defining/restricting the type of a port or part etc. If it's an unstereotyped Association, you will need a <<metarelationship>> from A to B and A to D, but I'm not sure if doing that would implicitly disallow an Association between A to C, I would need to try it. Perhaps it would require adding a stereotyped Association into the mix?
The Sparx Team
support@sparxsystems.com

rupertkiwi

  • EA User
  • **
  • Posts: 39
  • Karma: +3/-0
    • View Profile
Re: Limit Object stereotype associations
« Reply #5 on: March 21, 2019, 04:35:36 pm »
Do you have an example of how I might go about limiting the stereotypes that can be associated?

Thanks,
Rupert