Book a Demo

Author Topic: Diagram Notes disappear  (Read 3223 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Diagram Notes disappear
« on: November 28, 2008, 01:04:28 pm »
The Diagram Notes which are added by using the Diagram Notes Element button on the UML Elements toolbar.  Are a funny beast...  They are stored by EA in the t_object table.  Now that is questionable, but not the REAL problem in this bug report.

Since, in EA, a Diagram is NOT an element (and therefore doesn't exist in t_object), EA cannot attach the t_object to the diagram.  So what it does is to attach it to the nearest available t_object.  In the case of a diagram created under a package, it attaches (by means of the ParentID column) to the Package t_object entry.  If the diagram is created under a class (say, by means of the infamous <Vertex Context Menu>|Advanced>Make Composite menu item), then it attaches to the parent object.

Now you can move the diagram from where it was created to somewhere else.  But the ParentID of the Diagram Notes object doesn't change.  Consequently, when you delete the original object, the Diagram Notes object is also erroneously deleted.

When you move the diagram, the parent of the Diagram Notes object needs to be refactored to the new parent of the diagram.

So...  If you've ever had the Diagram notes element disappear inexplicably... Now you know why!

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

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Diagram Notes disappear
« Reply #1 on: November 28, 2008, 01:43:37 pm »
That might explain some really quirky behavior I saw when I was building some MDG Technologies a while ago. Around the time that EA 7.1 was in beta testing I had to redo technologies a lot - we were stamping out some new bugs - and sometimes moved diagrams. Every so often the notes got lost.

In MDG Technology development diagram notes can be significant. It is hard to notice if they disappear (without apparent cause) and the resulting technology can display weird symptoms when assembled. This kind of thing turned out to be very difficult to trace, and I never did find a root cause. Perhaps this thread explains the mystery.
No, you can't have it!