Author Topic: v16.1 Can't set Parent_ID where parent is a Note item  (Read 14358 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
v16.1 Can't set Parent_ID where parent is a Note item
« on: February 06, 2023, 02:05:03 pm »
We create "Neighborhood" Diagrams for our items.  Since Diagrams can't have tagged Values, we use the DiagramNote item (effectively the "Title Block" for the diagram) as a surrogate.  We make the Parent of the Diagram and the Parent of the DiagramNote the item for whom the Diagram is being generated.  This works fine for most items, but recently our Diagrammer Add-In has been crashing on Note Items with the message indicating that the Parent_ID relationship is contrary to UML specifications.  That is, when we set the Parent_ID of the DiagramNote to be that of the Note Item (for which we are creating the Neighborhood Diagram), the exception is thrown.


Before I report a defect, can anyone point to the section of the UML specification that indicates this rule (which we appear to be breaking)?  A quick check of 7.8.2 Comment [Class] (of the UML 2.5.1 Standard) indicates no such issue.


We have been processing such Note items with our Diagrammer for over a decade, so when did this change?


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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #1 on: February 06, 2023, 08:05:21 pm »
I seem to remember a recent post dealing with that. p_id is now zero (since v16?) as notes do not really belong to a package. Seems to make sense, though inconvenient for coder relying on it otherwise.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #2 on: February 06, 2023, 08:28:48 pm »
I seem to remember a recent post dealing with that. p_id is now zero (since v16?) as notes do not really belong to a package. It seems to make sense, though inconvenient for the coder relying on it otherwise.

q.
Hi q,
it's not the Note's parent that is the problem; it's that it seems it can't be the parent of anything.

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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #3 on: February 06, 2023, 08:59:05 pm »
I seem to remember a recent post dealing with that. p_id is now zero (since v16?) as notes do not really belong to a package. It seems to make sense, though inconvenient for the coder relying on it otherwise.

q.
Hi q,
it's not the Note's parent that is the problem; it's that it seems it can't be the parent of anything.

Paolo

I just check the UML specs, and a Comment is in fact a specialization of Element, and an element can be the owner of other elements.
So there is no (UML) reason notes shouldn't be able to own other elements.

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1137
  • Karma: +30/-8
    • View Profile
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #4 on: February 06, 2023, 09:57:25 pm »
Hi Paulo,

Are you setting the Parent_ID of an element, as per Geert comment, or of a diagram? Both, have a Parent_ID.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #5 on: February 06, 2023, 10:13:53 pm »
Hi Paulo,

Are you setting the Parent_ID of an element, as per Geert's comment, or of a diagram? Both have a Parent_ID.
Hi Modesto,
The problematic Parent _ID is the Element.  The Diagram Parent_ID is set as it used to be.  What's confusing is that I'm sure that this didn't happen with v15.2, so I suspect that the new DLL has the bug, and so, since I'm linking to it in the Add-In, even v15.2 activation of the Add-In crashes.

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

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #6 on: February 06, 2023, 10:16:26 pm »
I seem to remember a recent post dealing with that. p_id is now zero (since v16?) as notes do not really belong to a package. It seems to make sense, though inconvenient for the coder relying on it otherwise.

q.
Hi q,
it's not the Note's parent that is the problem; it's that it seems it can't be the parent of anything.

Paolo

I just check the UML specs, and a Comment is in fact a specialization of Element, and an element can be the owner of other elements.
So there is no (UML) reason notes shouldn't be able to own other elements.

Geert
Thanks, Geert;
that was my reading of the Standard, but they can be pretty dense, so I wanted another "set of eyes" to confirm or deny.

Let's see what the Sparxians have to say tomorrow.

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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #7 on: February 06, 2023, 10:44:10 pm »
Got it into the wrong throat (as we say here). It's probably the special treatment of EA that notes (aren't they call annotation in UML?) never were "real" elements. You did not see them in the browser. Likely that's why they still can not be parent of anything. Will it change for good? Maybe.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #8 on: February 06, 2023, 11:01:20 pm »
Got it into the wrong throat (as we say here). It's probably the special treatment of EA that notes (aren't they call annotation in UML?)
Comment in UML, see ยง 7.8.2 Comment [Class] page 40

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #9 on: February 07, 2023, 12:06:22 am »
Yes, thanks :-) So Sparx has an "excuse" since it's not an UML element (btw. Object isn't UML either). But don't they claim to be UML 2 compliant?

q.

P.S. I can't find a UML compliance statement right now but pretty sure in the past they had some advert in this direction.
« Last Edit: February 07, 2023, 12:11:06 am by qwerty »

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #10 on: February 07, 2023, 12:23:05 am »
Yes, thanks :-) So Sparx has an "excuse" since it's not a UML element (btw. Object isn't UML either). But don't they claim to be UML 2 compliant?

q.

P.S. I can't find a UML compliance statement right now, but pretty sure in the past, they had some adverts in this direction.
(my emphasis) If it's NOT UML, then how can it break UML Rules...

The exception message is explicit: The Relationship is NOT allowed by UML Rules" (IIRC).

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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #11 on: February 07, 2023, 01:27:06 am »
It's "The requested connection is not UML compliant". But I meant an explicit statement like "UML 2.0 compliant modeling tool". I seem to remember that ad but there is none anymore. Maybe in one of the heave PDF document files?

q.

P.S. Indeed after searching the Help theres a lot about NIEM, BPMN, etc. compliance but not so much about UML. I found "it is not a strictly UML compliant construct)" in the help about SDs.
« Last Edit: February 07, 2023, 01:31:41 am by qwerty »

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 340
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #12 on: February 07, 2023, 01:36:58 am »
Are you using Parent_ID instead of Package_ID?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #13 on: February 07, 2023, 01:50:58 am »
Well, "if it looks like a duck...."

and a EA Note element pretty much looks like a UML Comment to me, so for all intends an purposes, I guess we can treat a Note like it's a UML Comment.

Geert




qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: v16.1 Can't set Parent_ID where parent is a Note item
« Reply #14 on: February 07, 2023, 02:29:17 am »
Well, "if it looks like a duck...."
But this one barks ;-)

Honestly, this is a Sparx element, not an UML element. Like Object, which is kind of heritage. Eve already told that the latter will not change for compatibilty reasons. Looks like UML InstanceSpecification but...

q.