Book a Demo

Author Topic: Orphaned instance elements  (Read 2933 times)

dfreels

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Orphaned instance elements
« on: June 13, 2005, 08:54:24 am »
I have a sequence diagram with an instance object linked to a class. The class gets deleted due to refactoring. Does the element get removed from the sequence diagram or does the instance element get orphaned? If the element gets orphaned, is there a way in EA to identify orphaned instance elements?

Thank you,
David

thomaskilian

  • Guest
Re: Orphaned instance elements
« Reply #1 on: June 14, 2005, 02:33:06 am »
David,
the simplest way is always to try it in a test repository. I guess, the object will not be removed. And no: You  can't find these orphaned objects easily  (AFAIK). The Find Orphans function only returns elements that do not appear on diagrams. What you can do is to use automation, loop through all elements and check if there are no relations for object elements.

dfreels

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Orphaned instance elements
« Reply #2 on: June 14, 2005, 07:51:51 am »
The object actually stays on the diagram. Now, I just need to be able to report when an instance object is on the diagram and does not have an instance classifier set. Any ideas how to do this?

Thank you,
David

thomaskilian

  • Guest
Re: Orphaned instance elements
« Reply #3 on: June 15, 2005, 12:53:36 am »
The problem is, that once you delete the classifier, the object is only a simple object. You can't  find out that it once has been an instance of something. You could check Usage (Ctrl+U) to find out that a class has instances prior to deleting it. Or, a bit more advanced, you write a tool to conditionally delete a class.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Orphaned instance elements
« Reply #4 on: June 15, 2005, 01:46:09 am »
Quote
The problem is, that once you delete the classifier, the object is only a simple object. You can't  find out that it once has been an instance of something. You could check Usage (Ctrl+U) to find out that a class has instances prior to deleting it. Or, a bit more advanced, you write a tool to conditionally delete a class.
This is a bug and should be reported.  A number of valid scenarios are possible when deleting a class.  Leaving orphaned objects without informing the user isn't one of them...

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