Book a Demo

Author Topic: Inserting "meta data" into notes  (Read 6959 times)

Marty Burns

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Inserting "meta data" into notes
« on: July 26, 2012, 04:24:43 am »
I am looking for a way to insert information into a notes field that is kept there for in-line processing by external software tools. For example, the notes field supports a somewhat rich formatting but does not support heading tags. If I insert <h1/> for example, it will be removed automatically.

Is there some way to insert this kind of information in a note that is not visible except to software the extracts the note and processes it for other purposes? It can be cryptic -- perhaps some no-op EA command for example.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Inserting "meta data" into notes
« Reply #1 on: July 26, 2012, 06:39:14 am »
If you modify the notes column of the according note object via repository.execute you can put in almost anything. But I guess that's not very wise. If a user is editing the notes it will get scrambled. Maybe you should put that information into tagged values. Of course these can be screwed up also but they are more out of sight.

q.

Marty Burns

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Inserting "meta data" into notes
« Reply #2 on: July 26, 2012, 07:10:14 am »
Sounds promising. Can you give an example?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Inserting "meta data" into notes
« Reply #3 on: July 26, 2012, 08:16:05 am »
Which one? Tag or Execute?

q.

Marty Burns

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Inserting "meta data" into notes
« Reply #4 on: July 26, 2012, 08:52:36 am »
Lets say I have the following note:


A long long time ago. I can still remember when the music used to make me cry.


Now lets say I want to annotate it as follows:


A long long time ago. <tag some foo/>I can still remember when the music used to make me cry.


How can I do this? Of course <tag some foo/> is not visible in the note box.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Inserting "meta data" into notes
« Reply #5 on: July 26, 2012, 09:05:50 am »
Hm. Before passing you this armed grenade called Execute I probably need to understand your use case a bit more. So I try to repeat what I understood:

You need to tag certain parts in the notes in a way that a user does not see it, but you can via some wizardry. The user shall not be able to alter the tag.

Is this correct? If not can you correct me?

q.

P.S.: Bed time for me now...

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Inserting "meta data" into notes
« Reply #6 on: July 26, 2012, 11:26:47 am »
Basically if I understand your desires correctly you can't.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Inserting "meta data" into notes
« Reply #7 on: July 26, 2012, 03:32:45 pm »
You can, but it will require quite a substantial amount of work.

We actually did something similar at my current client.

The notes of each element is structured using some kind of xml markup.
So we have notes similar to:
Quote
<definition>The screen were we manage the Attestations.</definition>
<description>In this screen the user can do the following concerning Attestations
Request period of Attestations
See the details of a received Attestations
Under certain conditions remove the requested Attestations
Take received Attestations in consideration to calculate the number of days that a SIP has worked to allow the SIP to receive
</description>
<changed date="15/09/2011" workitem="45372" user="t99bms" status="new">added</changed>
Each type of element (type in the metamodel of our modelling method) has its own structure defined as an xsd with mandatory tags, multiplicities etc..

Now i.s.o using the standard notes field we have developed an add-in to edit the notes


But if you can get by using only tagged values then that would, by far, be my first choice.

Geert


Marty Burns

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Inserting "meta data" into notes
« Reply #8 on: July 28, 2012, 04:05:03 am »
Interesting, Geert. I can see how the markup/custom editor plugin can work. I was hoping for something less intrusive. I guess I could sacrifice immunity from local editing if there is some other markup that can be used.

What is this execute concept, Qwerty?

Thanks for all the suggestions, by the way.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Inserting "meta data" into notes
« Reply #9 on: July 28, 2012, 06:50:31 am »
I don't know whether Geert is using it (I guess so). It's simply a way to bypass the API and modify the database content directly. In the end you would use it in the way Geert did it as for his solution. It's not making it easier, though.

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: Inserting "meta data" into notes
« Reply #10 on: July 28, 2012, 04:39:58 pm »
No, the noteseditor doesn't need to do any mass updates, just one by one, so I was able to use the normal API operations (EA.Element.Notes + EA.Element.Update())

To be able to translate the notes between the EA format (kinda HTML) and RTF I use Repository.GetFormatFromField() and Repository.GetFieldFromFormat()

Geert