Book a Demo

Author Topic: Is Package.Flags safe to use?  (Read 4917 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Is Package.Flags safe to use?
« on: August 07, 2020, 05:35:54 pm »
Hello all,


Let's say I've got some information I want to store relating to a root node.

Root nodes, unlike other packages, are not shadowed by an element but exist only in t_package. This means they can't have tagged values assigned to them.

However, there is a field Package.Flags (t_package.PackageFlags), which contains not binary flags but various properties. It is documented thusly:
    String
    Read/Write
    Extended information about the Package.

It doesn't say that this field is Sparx, for the exclusive use of.

So if I add a custom "flag" here, will EA leave it alone and let me play with my own toys in peace?
Or will it get deleted because some sub-function in some dark corner of the codebase doesn't recognize it?

Cheers,


/Uffe
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Is Package.Flags safe to use?
« Reply #1 on: August 07, 2020, 05:52:40 pm »
Use the notes. They even make their way to the XMI. I once had an application for that but then disaster broke and it's only just on my mind. So no test on bejond V13.5.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Is Package.Flags safe to use?
« Reply #2 on: August 07, 2020, 06:05:15 pm »
Huh. I thought Notes were also a property of the element, but no, you're right, it's in t_package as well.

And you can update a root node's Notes from the API, and it doesn't show up in the GUI.

Bit of a hack, but sounds workable. Thanks!

/U
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Is Package.Flags safe to use?
« Reply #3 on: August 07, 2020, 06:16:33 pm »
That's what I am: a hacker :-)

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Is Package.Flags safe to use?
« Reply #4 on: August 07, 2020, 06:42:10 pm »
Yep, I've used that exact "trick" in the past as well  8)

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Is Package.Flags safe to use?
« Reply #5 on: August 07, 2020, 06:48:48 pm »
Yep, I've used that exact "trick" in the past as well  8)

Geert

Hmm... So maybe we need some way of co-ordinating our hacks...
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Is Package.Flags safe to use?
« Reply #6 on: August 07, 2020, 06:55:51 pm »
Damn. And I thought I had the "copyright"!

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Is Package.Flags safe to use?
« Reply #7 on: August 07, 2020, 08:11:20 pm »
Damn. And I thought I had the "copyright"!

q.
I might have started doing it after you suggested it ;D. I'm not sure, must be like 10 years ago or something.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Is Package.Flags safe to use?
« Reply #8 on: August 07, 2020, 09:20:09 pm »
Then you're the owner. I stumbled over that for a project 2 years ago. I guess you had the need for it earlier.

q.