Book a Demo

Author Topic: Create a Bi-Directional Association (Profile)?  (Read 4066 times)

Chris Tatem

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Create a Bi-Directional Association (Profile)?
« on: July 12, 2012, 11:58:32 pm »
I'm trying to create a profile stereotype of an Association (or Connector) that I would like the initial Direction to be Bi-Directional, the default on the metaclass is "Source -> Destination."  I have extended the metaclass with my stereotype and tried setting the attribute initializer (which doesn't show the metaclass attribute direction) and that didn't work.  I tried setting the attribute initial value in the metaclass and that didn't work.

Is there a way to set the direction for my stereotype?

Thanks
Chris

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Create a Bi-Directional Association (Profile)?
« Reply #1 on: July 13, 2012, 12:43:19 am »
I faintly remember to have asked the same question to Sparx support and the answer was: not possible. However, this might have change ever since, or my memory failed me. Maybe one of the Sparxians can confirm that.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Create a Bi-Directional Association (Profile)?
« Reply #2 on: July 13, 2012, 09:34:28 am »
I've just quickly tried it and it works for me. Here are my steps:

Create profile package and diagram. Drop a metaclass element onto diagram and choose "Association". It will have an attribute named "direction" with an initial value of "Source -> Destination". Use the "..." button in the attribute properties dialog to change this to "Bi-Directional". Drag extends connector from stereotype element to metaclass element. Save profile. Create MDG Technology that includes the profile. Go Settings > MDG Technologies and add the technology's path. Restart EA. Stereotype is now ready to use and when dropped from toolbox it will be created bi-directional.

Note however that if you create an unstereotyped association and give it the stereotype, it will not be changed to bi-directional: the profile defines the default direction that is set when the association is first created.

HTH
The Sparx Team
[email protected]