Book a Demo

Author Topic: Enumerations  (Read 15542 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Enumerations
« on: April 26, 2005, 07:39:42 pm »
Hi,

UML 2 (§7.3.16) defines Enumeration as: An enumeration is a data type whose values are enumerated in the model as enumeration literals.

The diagram in Figure 39 shows a "Class-like" box with what appears to be an attributes compartment with the enumeration values only shown.  (No datatype, no visibility, no intiial value)

EA appears to use enumerations ONLY in profiles:

"Enumerations may be used to restrict the values available to stereotype tags.  

Note: Enumerations defined under a profile package do not appear as elements in the profile when imported. "

An enumeration appears to be just a standard class with stereotype <<enumeration>>, the enumeration values are listed as individual attributes.  You can find it under the Profile section of the UML Toolbox.

Are there any plans to support Enumerations as specified in UML2?  Some other tools do so.

In the meantime, if I define my enumerations using the current mechanism, there should be no problem with EA converting them later, should there?

Paolo

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

thomaskilian

  • Guest
Re: Enumerations
« Reply #1 on: April 27, 2005, 02:23:25 am »
In my release it's §7.12.2 ??? I guess you can use any class and apply a stereotype of <<enumeration>>.  I don't see a reason for using a special element for this purpose.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Enumerations
« Reply #2 on: April 27, 2005, 06:35:17 am »
Quote
In my release it's §7.12.2 ??? I guess you can use any class and apply a stereotype of <<enumeration>>.  I don't see a reason for using a special element for this purpose.


I'm quoting from ptc 04-10-02.pdf (which may not be the latest).

The problem you have is that an Enumeration is NOT a Class.  It is a Classifer (as is Class) but it isn't a Class.  We all have to be very careful with Classifer vs Class.

Some tools (no names, no pack drill) seem to have no problems implementing the UML 2 requirements.  (Actually, there are some inconsistencies  ;D but, in principle, they do it properly).

Merely setting the stereotype is NOT sufficient, since that doesn't change the actual type (and therefore features and behaviours) of the element.  ALL it changes are the some peripheral features.  

That's why dragging an interface from the Componment section of the UML toolbox onto a diagram is NOT the same as dragging a class and giving it the stereotype «interface».  Try it.  See how the context menus and element properties are different - even if you disable "use circle notation".

For EA to properly support UML2 it has to have specific Enumeration and DataType elements.

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

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Enumerations
« Reply #3 on: April 29, 2005, 12:35:30 am »
Quote
In my release it's §7.12.2 ??? I guess you can use any class and apply a stereotype of <<enumeration>>.  I don't see a reason for using a special element for this purpose.


Thomas,

I don't believe you mentioned which version you're quoting from.  Is it later or earlier than mine?

I just want to be consistent...  ;D

Maybe we could work out which one we want to use and upload it to the User Group site?

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

thomaskilian

  • Guest
Re: Enumerations
« Reply #4 on: April 29, 2005, 01:28:48 am »
UML 2.0 Superstruct 03-08-02.pdf
It has a note "Final Adopted Specification" so I was pretty sure I could use this until 2.1 is published.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Enumerations
« Reply #5 on: April 29, 2005, 01:57:26 am »
 ;D Mine says:

Revised Final Adopted Specification ???
October 8, 2004 ::)

(only not in glorious technicolor)

So, should we upload mine?

Paolo

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

thomaskilian

  • Guest
Re: Enumerations
« Reply #6 on: April 29, 2005, 02:56:47 am »
 >:( Let X = X But Not Necessarily ...
Maybe someone could alarm us on the next updated update ;) I'll download the latest release.

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Enumerations
« Reply #7 on: May 01, 2005, 07:34:00 pm »
D*mn, I got the final as well.  >:(

Paolo, please upload it to the user site - or at least post the link here.

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Enumerations
« Reply #8 on: May 01, 2005, 08:50:28 pm »
It won't upload... (to user group site) :(  I don't have sharepoint compatible app and if I use the recommended upload document button, the upload seems to hang after the file has been uploaded (I presume).

The PDF file is over 15Mb long.  Can I email it to someone who can get it up onto the User Group Site?  Or Copy it onto someone's public facility?

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

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Enumerations
« Reply #9 on: May 01, 2005, 09:36:02 pm »
Hi Paolo,

you can e-mail the file to me, I will upload it to the User Group site and post the link here. (Given the size of the file, you may want to send it to me via www.dropload.com, it will likely go better than e-mailing it directly).
Just out of curiousity, do you have any other problems with SharePoint? You shouldn't require a special SP-compatible app in order to use it, if there are any issues, I willo bring it up with the provider.

Thank you,
Bruno

thomaskilian

  • Guest
Re: Enumerations
« Reply #10 on: May 02, 2005, 12:41:01 am »
http://www.omg.org/cgi-bin/doc?ptc/2004-10-02 seems to be Paolos version. It has the same date inside (despite the filename) and a lot of correction bars. Looks like the pre-release for 2.1 ???
« Last Edit: May 02, 2005, 12:42:41 am by thomaskilian »

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Enumerations
« Reply #11 on: May 02, 2005, 06:45:06 pm »
http://sharepoint.eausergroup.org/Lists/OMG%20Documents/AllItems.aspx

Quote
http://www.omg.org/cgi-bin/doc?ptc/2004-10-02 seems to be Paolos version. It has the same date inside (despite the filename) and a lot of correction bars. Looks like the pre-release for 2.1 ???


Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Enumerations
« Reply #12 on: May 02, 2005, 07:39:46 pm »
Quote
http://www.omg.org/cgi-bin/doc?ptc/2004-10-02 seems to be Paolos version. It has the same date inside (despite the filename) and a lot of correction bars. Looks like the pre-release for 2.1 ???



I think that's where I got it from, but it seemed to "disappear" for a while.   So that's why I didn't post the link.  Anyhow, Bruno's now put it on the UserGroup site and we can all "sing from the same hymn book"... ;D

Paolo
« Last Edit: May 02, 2005, 07:41:01 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Enumerations
« Reply #13 on: May 02, 2005, 08:08:11 pm »
ptc/04-10-02 is an "FTF Convenience document."

Which although not in accordance with OMG publication status standards appears to me to be a work in progress - as evidenced by the inclusion of all the  issues.

I'd think this status is "less than" a Proposed Available Specification.

So, thanks anyway Paolo, but I guess I'll be sticking to the published "Final Adopted Specification" lest this draft goes the same way as 1.4 et al

bruce



postscript : straneg that this thread ended up under the "enumerations" topic..... :)
« Last Edit: May 02, 2005, 08:10:01 pm by sargasso »
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Enumerations
« Reply #14 on: May 02, 2005, 09:07:23 pm »
Well Bruce,

Since I have both - it seems to be that the "OMG Adopted specification" 03-08-02.pdf is actually a "work in progress".  If you look at the comments it says "the FTF must do this; the FTF needs to do that..."  04-10-02.pdf on the other hand says:  "We changed this, we did that..."

Both (in their footers) claim to be Drafts...

"There's no such thing as an inconsistently correct system..." ;D

What is most important here is consistency.  My vote is to standardise on the later document, but I won't insist on it if everyone else wants to use the earlier...

Can one of the Sparxian (who ARE members of OMG) shed any light?

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