Book a Demo

Author Topic: v16 - How to get PK/FK indicators onto extended EAUML::table rendering  (Read 3901 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
We have extended EAUML::table to allow our version <Profile>::DBTbl to include standard adornments for our diagrams in the shapescript (i.e. responding to additional properties defined for DBTbl etc.)
The extension works quite well, and the Foreign Key mechanism works etc.  But one thing that DOESN'T work (hopefully, yet) is to get the DBTbl to provide the PK & FK indicators on the rendered diagram object.  We followed the instructions for "Create Stereotypes Extending non-UML Objects" and used drawparentshape() but to no avail.
  • Is this actually possible?
  • How can we do it?
TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: v16 - How to get PK/FK indicators onto extended EAUML::table rendering
« Reply #1 on: September 02, 2022, 04:55:37 pm »
Hi Paolo,

I haven't tried to extend EA table within a profile and it would be interesting to know if it disables EA table implementation of DB tables with the custom rendering (PK, FK, Not null, etc.).
Have you tried to manually set up tables with and without the profile to get at least in the native profile all visual indicators i.e. PK, FK, PfK (if both PK and FK), and * (not null) ?
For PKeys, you need to get an attribute property + create a PK operation.
For FKeys, you need to create an association in addition to the PK setup.

Regards
Guillaume
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16 - How to get PK/FK indicators onto extended EAUML::table rendering
« Reply #2 on: September 02, 2022, 06:54:00 pm »
Hi Paolo,

I haven't tried to extend the EA table within a profile, and it would be interesting to know if it disables EA table implementation of DB tables with the custom rendering (PK, FK, Not null, etc.).
Have you tried to manually set up tables with and without the profile to get at least in the native profile all visual indicators, i.e. PK, FK, PfK (if both PK and FK), and * (not null)?
For PKeys, you need to get an attribute property + create a PK operation.
For FKeys, you need to create an association in addition to the PK setup.

Regards
Guillaume
Hi Guillaume,
In our setup, the Table has two stereotypes, EAUML::table and <profile>:: DBTbl.  We can set up the attributes as needed.  If we remove the DBTbl stereotype, all functions as it should.  When we add the DBTbl stereotype, the rendering of the indicators visible on the simple Table disappears.

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

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: v16 - How to get PK/FK indicators onto extended EAUML::table rendering
« Reply #3 on: September 02, 2022, 11:01:54 pm »
Hi Paolo,

We have tried extending EAUML::table with very limited success, with version 15 we could not get the extension to show in any toolbars. I am curious about how you have tackle this problem.

Couple of other points:
1) Keep in mind that EAUML:table is not a shape like class or package (it is a special shape full of Sparx Systems idiosyncrasies and Sparx Systems does not want to touch it, despite the fact they can be improved.
2) From memory PKs and FKs are operations, their definitions are stored in all the operation related tables. As, I think I mentioned in another thread, I would not have implemented them as operations.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16 - How to get PK/FK indicators onto extended EAUML::table rendering
« Reply #4 on: September 03, 2022, 03:47:05 pm »
Hi Paolo,

We have tried extending EAUML::table with very limited success; with version 15, we could not get the extension to show in any toolbars. I am curious about how you have tackled this problem.
Hi Modesto,
As I mentioned, our extension involved adding a stereotype to EAUML::table. We then created a "pattern" for that new element.  The Patterned element was able to be added to the toolbars we wanted.
Quote
A couple of other points:
1) Keep in mind that EAUML::table is not a shape like class or package (it is a special shape full of Sparx Systems idiosyncrasies, and Sparx Systems does not want to touch it, despite the fact they can be improved.
Yes, but that's what gave hope that it would still display the indicators even after we applied the shapescrtipt.  I was surprised when they didn't appear.
Quote
2) From memory PKs and FKs are operations; their definitions are stored in all the operation-related tables. As I think I mentioned in another thread, I would not have implemented them as operations.
Yes, that's not the problem here.  The element is set up correctly (and without our "overlay", it all renders as expected).

Paolo
« Last Edit: September 03, 2022, 03:48:52 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!