Author Topic: [Solved] MDG TaggedValue Association filter  (Read 5056 times)

Hermelin

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
[Solved] MDG TaggedValue Association filter
« on: November 08, 2013, 02:18:27 am »
Hi,

I have an MDG with two stereotypes, EnterpriseVision and EnterpriseGoal, both extending the metaclass Class.

From EnterpriseVision there's an association <taggedValue> called goals that points to EnterpriseGoal. I want to tag a EnterpriseVision with links to several EnterpriseGoals.

I have this set up and if I create a EnterpriseVision a taggedValue named goals is there, and I can press a button in the value field that open a ConstructPicker, which allow me to choose elements form the model.  The problem is that the filter in the ConstructPicker is set to only show elements with stereotype EnterpriseVision and I'm thus not able to select any EnterpriseGoal.

Is it possible to change something in my MDG to set the filter to EnterpriseGoals instead?

Thanks for any input!


EDIT: According to Sparx the issue happens since I had named the association, not just the target role. "In earlier versions of EA the connector name was used for defining "Classifier" tags, however this feature has since been deprecated."
« Last Edit: November 15, 2013, 11:48:06 pm by hermelin »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: MDG TaggedValue Association filter
« Reply #1 on: November 11, 2013, 09:35:47 am »
If you open up your profile in a text editor and search for "EnterpriseVision" you should be able to find an occurrence of that string that you can change to "EnterpriseGoal" (you'll know which occurrence to change when you see it - it will be in a <TaggedValueType> definition).

To figure out what is going wrong with your profile generation might be more difficult, but check that you don't have more than one «taggedValue» association between your "EnterpriseVision" and "EnterpriseGoal" stereotypes.
The Sparx Team
[email protected]

Hermelin

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: MDG TaggedValue Association filter (solved)
« Reply #2 on: November 11, 2013, 09:12:04 pm »
Thank you. I found the line. I have confirmed that I do not have a double connection.

After having tried all different ways of creating such associations, directions, combinations of source/destinations etc I noticed that I can make it change by changing the name of the stereotype.

EnterpriseVision -> EnterpriseGoal  ( Filter: EnterpriseVision)
EnterpriseVision -> EnterprisezGoal (Filter: EnterpriseGoal)

Thinking it could be dependent of some sort of alphabetic ordering I created new stereotypes named A-D. But it did not hold true for them.  Until, I tried changing the order in the project browser...


Can anyone confirm that what determines which stereotype is used for the filter is dependent on the position in the project browser, where a position lower in the list get priority? Is this an intentionally design?

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: MDG TaggedValue Association filter
« Reply #3 on: November 12, 2013, 09:34:21 am »
That sounds like a bug that was fixed in EA 8.0.859. Is your version of EA older than that?

Just to confirm, in EA 10.0 you create a «taggedValue» association from the «stereotype» that will have the tagged value to the «stereotype» that will be the results filter. Name the Target Role of the association to define the name of the tagged value.
The Sparx Team
[email protected]

Hermelin

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: MDG TaggedValue Association filter
« Reply #4 on: November 12, 2013, 06:55:46 pm »
I'm using EA 10.0.1009 (UE) and I do create the association the way you describe it. It is still the position in the browser that override the filter setting. I guess that turned this into a bug report.

Btw good thing you said to name the Target Role, since that activated the Multiplicity, which I was also wondering why it didn't work.
« Last Edit: November 13, 2013, 09:00:38 pm by hermelin »

Hermelin

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: MDG TaggedValue Association filter
« Reply #5 on: November 13, 2013, 09:00:47 pm »
I have submitted it as a bug. I could live with it by placing the elements correctly, but this do not work when the connected elements are in different package.


EDIT: According to Sparx the issue happens since I had named the association, not just the target role. "In earlier versions of EA the connector name was used for defining "Classifier" tags, however this feature has since been deprecated."
« Last Edit: November 15, 2013, 11:47:32 pm by hermelin »