Book a Demo

Author Topic: Display attribute constraint  (Read 4585 times)

Honza

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Display attribute constraint
« on: March 27, 2008, 04:09:03 am »
Please, can you tell me, how to show an constraint of attribute on a diagram?
e.g. I have Class1, with attribute Size, and defined constraint to the attribute {Size <= 12}
I can define it, but I cannot see it on a diagram.

Thank you

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Display attribute constraint
« Reply #1 on: March 27, 2008, 04:29:36 am »
Look up Note, Link to Element Feature in the EA Help index.
No, you can't have it!

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Display attribute constraint
« Reply #2 on: March 27, 2008, 07:22:09 am »
Quote
Look up Note, Link to Element Feature in the EA Help index.
Does it really work for attribute constraints? I thought it worked for element constraints only. :-/
Jan 'Bary' Glas

thomas.kilian

  • Guest
Re: Display attribute constraint
« Reply #3 on: March 27, 2008, 08:41:19 am »
Yes Jan (Hi again). It only works for responsibilities and constraints on class level. Not for attributes.

Btw. How does Superstructures denote constraints on attribute level? Simply inside curly brackets?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Display attribute constraint
« Reply #4 on: March 27, 2008, 08:55:55 am »
Right guys... I was hoping they'd repair this in 7.1. This is a big relief, since now I don't have to keep living without hope...   ;)

You can do the old 'attach note to link' trick and turn the note into a constraint. Unfortunately this does not seem to work with features or elements, but only links.

On the whole it might be better to design constraint-free systems. After all they're software; they were going to have bugs anyway.

One thing I can think of to make this easier to deal with (one is for you Hanza):   [smiley=beer.gif] [smiley=beer.gif]
No, you can't have it!

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Display attribute constraint
« Reply #5 on: March 27, 2008, 09:30:25 am »
Honzo,

as a workaround you may model you attribute outside the class as another class with regular constraints on association or class.

But in fact this is so unreadable that it is better not to listen to me :-D it is nearly midnight here in Prague.

Honza Glas

(for non-Czech speakers "Honza" is a familiar version of "Jan")
Jan 'Bary' Glas

Honza

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Display attribute constraint
« Reply #6 on: March 27, 2008, 08:44:31 pm »
Hi guys,
thank you for your attention. I hope Sparx will correct this ASAP and we can drink more instead to think up this workarounds.

My solution is:
I need to define a class as a parameter of some web service. Some attributes of the class have to be defined as mandatory.
So I stereotyped the class as <<table>>. At this moment you can set some attributes (columns) as Not null, that you can see in a diagram.
It looks very strange to see Parameter of Web service as Table, but it works. :-)

For Jan Glas> Díky Honzo, navrhuji ud[ch283]lat na KC n[ch283]jakou sekci workaround[ch367] (nejen v EA). Honza F. :-)

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Display attribute constraint
« Reply #7 on: March 28, 2008, 02:12:08 am »
Quote
For Jan Glas> Díky Honzo, navrhuji ud[ch283]lat na KC n[ch283]jakou sekci workaround[ch367] (nejen v EA). Honza F. :-)
Private message would do better.
Jan 'Bary' Glas