Author Topic: please act on stereotype property type metaclass  (Read 4825 times)

Hendrik Jan van Randen

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
please act on stereotype property type metaclass
« on: November 06, 2007, 12:32:25 am »
subject: If stereotype property type is metaclass, please let corresponding tagged value follow that definition

dear makers of Enterprise Architect,

I've defined a stereotype «maintains» which extends metaclass 'Use Case'.
On this stereotype I've defined property 'maintainedClass', of which the type is metaclass 'Class', with multiplicity 1..*.

When I apply this stereotype to a use case, I would expect that in that use case for its tagged value 'maintainedClass' in the value field I can select one or more classes that I've defined in the same model.
Instead, in its value field I can type any text, as if the type of the defined property is 'string', and I cannot select any class for it.

To a certain extent this problem can be worked around by manually editing a tagged value type, the profile export file and by writing an add-in, as described in the reponses to my post on the UML Process forum
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.pl?board=UMLPRO;action=display;num=1192546905

Those workarounds are too cumbersome to be practically applicable if a profile has many such properties.

Can you please, if a stereotype property type is a metaclass, let the behavior of the corresponding tagged value follow the stereotype property type definition and multiplicity?

with kind regards,

Hendrik Jan van Randen
Solution Architect
Atos Origin

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: please act on stereotype property type metacla
« Reply #1 on: November 06, 2007, 03:59:52 am »
I agree Hendrik,

And I also agree that the workaround quickly breaks down in practice. This is particularly true when the core of a model is built through automation and developers modify it from there on. The number of instances can quickly overwhelm the developers' ability to keep things straight.

David
No, you can't have it!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: please act on stereotype property type metacla
« Reply #2 on: November 06, 2007, 01:42:04 pm »
I thought to myself that's a good idea, and created a mock-up of a profile that would be good if it worked. Would you believe, it worked! Give this a go:

This creates a tagged value named "myTag" of type RefGUIDList.

HTH
The Sparx Team
[email protected]

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: please act on stereotype property type metacla
« Reply #3 on: November 06, 2007, 02:31:56 pm »
That's something Neil!

I'll have to give it a whirl when I get back to profiles. Something has come up that will delay that for a few days.

David
No, you can't have it!

Hendrik Jan van Randen

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: please act on stereotype property type metacla
« Reply #4 on: November 09, 2007, 01:27:46 am »
The picture suggested above requires that each referred class has a stereotype (in the picture stereotype «myClass»). That's not desired (and it is the workaround that I mentioned in the P.S. of my original posting
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.pl?board=UMLPRO;action=display;num=1192546905
).

The required picture is:

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: please act on stereotype property type metacla
« Reply #5 on: November 09, 2007, 04:39:03 am »
Just out of interest, what would happen if you used an 'ordinary' class (i.e. not a «metaclass») as the target for the tagged value?

Would the profile take it at all? And if so, would this allow you to assign any class (rather than forcing you to stereotype the target within your model)?

If that doesn't work, could you use Neil's diagram, but add a _metatype attribute to the MyClass entity with a value of Class?

David
No, you can't have it!

Hendrik Jan van Randen

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: please act on stereotype property type metacla
« Reply #6 on: November 15, 2007, 07:14:10 am »
The type of the tagged value definition can't be an 'ordinary' class. It should be a metaclass, to indicate to which elements (being instances of that metaclass) the corresponding tag (in elements on which the stereotype is applied) can refer.

It's not clear to me what you (David) mean with "add a _metatype attribute to the MyClass entity with a value of Class".

Instead of searching a workaround, I think that it would be much more efficient to resolve this problem in the product, thus if a stereotype property type is a metaclass, let the behavior of the corresponding tagged value follow that stereotype property type definition and multiplicity. In several other products for which we're evaluating whether they can become our standard (Rational Software Modeler, MagicDraw and Borland Together) this works fine. To keep Enterprise Architect competing it is really necessary to fix this.

If you have a developer build of Enterprise Architect in which this is fixed, I would be very glad to test it and to provide feedback.

Hendrik Jan

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: please act on stereotype property type metacla
« Reply #7 on: November 15, 2007, 07:49:47 am »
Quote
... [1] It's not clear to me what you (David) mean with "add a _metatype attribute to the MyClass entity with a value of Class".

... [2] ...if a stereotype property type is a metaclass, let the behavior of the corresponding tagged value follow that stereotype property type definition and multiplicity.

...[3] If you have a developer build of Enterprise Architect in which this is fixed, I would be very glad to test it and to provide feedback.
...

As to [1], look at the profile documentation. You can give a stereotype an attribute of _metaclass. Its uses are in the documentation. I was wondering if this could be used to resolve the issue you had, given the sample profile fragments presented.

For [2], you can specify some of these for stereotypes. Personally, I feel the EA documentation in this area is still very weak. Based on my read of the appropriate docs and my limited (but ongoing) work with profiles to date. I cannot say whether EA will do what you want or not. If not, then appropriate bug reports and feature requests should be made directly to Sparx.

Finally, regarding [3], I really can't help you there. This is a user forum, though Sparx is very active here as well. Like you, I am (only) a member of the user community.

David
No, you can't have it!

Hendrik Jan van Randen

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: please act on stereotype property type metacla
« Reply #8 on: November 19, 2007, 02:00:06 am »
When I search the EA documentation for _metaclass it says 'No topics found'.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: please act on stereotype property type metacla
« Reply #9 on: November 19, 2007, 05:05:33 am »
Oops!

I am so sorry. The correct attribute name is _metatype.

I even had it in a model, and did not notice I'd misstated the name here.

David
No, you can't have it!