Book a Demo

Author Topic: error safety guarantees  (Read 5462 times)

eberline

  • EA User
  • **
  • Posts: 40
  • Karma: +1/-0
    • View Profile
error safety guarantees
« on: April 26, 2006, 08:05:09 pm »
Can anyone recommend the best way to model that an operation offers a basic vs. strong vs. no-fail safety guarantee? A tagged value seems the most straightforward, but I don't know how to get EA to display operation tagged values in class diagrams.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: error safety guarantees
« Reply #1 on: April 26, 2006, 08:34:18 pm »
Basically, just do it. I tried assigning a stereotype - one that I created - to an operation, and it showed up just fine. It is positioned before the operation name, so it is prominant.

I had the Show Parameter Detais options for the diagram set to Full Details, but I'm not sure this is required.

HTH,
David
No, you can't have it!

eberline

  • EA User
  • **
  • Posts: 40
  • Karma: +1/-0
    • View Profile
Re: error safety guarantees
« Reply #2 on: April 26, 2006, 09:17:38 pm »
That is what I'm doing for now. But that idiom will hit a wall the first time I want to specify a safety guarantee for an operation that already needs another stereotype, for example «property set», since EA limits elements to a single stereotype. (UML itself allows elements to have any number of stereotypes, at least according to the UML Reference Manual.)

Also, grouping operations in the operation compartment by safety guarantee is not the most useful grouping I can imagine.

I guess I'm hoping to learn of a secret handshake that tells EA to display operation tagged values in class diagrams.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: error safety guarantees
« Reply #3 on: April 26, 2006, 10:46:09 pm »
There isn't anything in EA to allow showing operation tags on a diagram.

Would putting your safety guarantee in the operation behaviour field help?  That can be displayed on diagrams.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: error safety guarantees
« Reply #4 on: April 27, 2006, 03:16:50 am »
Another option would be to assign multiple stereotypes, with one as the 'primary.' The primary stereotype would show up on diagrams, but the others would be there when needed by other parts of the model - generation etc.

With an element this is possible (and thanks again Paolo for reminding me to actually look at the dialogs) by clicking the '...' button immediately to the right of the Stereotype dropdown (beside the Abstract check box).

The problem is that there is no such thing for Operations (perhaps not for elements either, or other features). This might be a difference in the UML Superstructure definitions, but I don't remember seeing that (which does not mean it is not there, just that I missed it). On the Operation dialog there is a similar button crammed (the dialog is very 'busy') onto the same physical location, but this assigns extended attributes to the return value.

My guess is that this just never made it onto the radar at Sparx. You would do well to request the feature. Do it via the Help / On-line Resources / Request a Feature dialog.

In the meantime try out Simon's suggestion.

David
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: error safety guarantees
« Reply #5 on: April 27, 2006, 04:20:19 am »
Quote
My guess is that this just never made it onto the radar at Sparx.
Consistency, Consistency, Consistency! TM

I first thought "but EA DOES allow multiple stereotypes!"  Then, I (like David) actually looked at the dialog...

Features (Attributes, Properties and methods) aren't Elements in the EA world so thus far they don't get multiple stereotypes.

Paolo
« Last Edit: April 27, 2006, 04:20:46 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

eberline

  • EA User
  • **
  • Posts: 40
  • Karma: +1/-0
    • View Profile
Re: error safety guarantees
« Reply #6 on: April 27, 2006, 02:16:29 pm »
Quote
I tried assigning a stereotype - one that I created - to an operation, and it showed up just fine. It is positioned before the operation name, so it is prominant.

I had the Show Parameter Detais options for the diagram set to Full Details, but I'm not sure this is required.


Actually, what I see when I try this is the stereotype group, not the stereotype. For example, if I create three stereotypes «basic», «strong» and «no-fail» in a stereotype group called safety guarantee, then I get operations together in a safety guarantee sub-compartment of the operations compartment, but the stereotypes are not visible on the diagram.

The operation stereotype does show up in the project view, and also temporarily in the diagram when editing the operation directly in the diagram.

I have submitted a feature request re. multiple operation stereotypes and making them visible. Meanwhile, I'll probably use Simon's suggestion. Thanks, folks.

Scott

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: error safety guarantees
« Reply #7 on: April 27, 2006, 06:17:25 pm »
But while you wait...

[The following is based on build 789, although it is applicable to several of the prior builds.]

Open the Tools / Options dialog and select Objects. At the bottom of the right-hand column the last two check boxes will be of interest to you. The seem to be checked by default. The results of unchecking them (or one of them if you don't care about attributes) may produce a result more to your liking. My earlier comments pertained to my results with both unchecked.

While you are there, take a look at the bottom check box in the left-hand column. Chances are you have stumbled over the results of this setting. Try it out!

Does this help?
David
No, you can't have it!

eberline

  • EA User
  • **
  • Posts: 40
  • Karma: +1/-0
    • View Profile
Re: error safety guarantees
« Reply #8 on: April 27, 2006, 06:56:05 pm »
Quote
Open the Tools / Options dialog and select Objects. At the bottom of the right-hand column the last two check boxes will be of interest to you. The seem to be checked by default. The results of unchecking them (or one of them if you don't care about attributes) may produce a result more to your liking.


Ah, that's much better. Thank you!

Scott