Book a Demo

Author Topic: Store a non-rtf file in the EAP database  (Read 5374 times)

cty

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Store a non-rtf file in the EAP database
« on: August 11, 2009, 08:40:17 pm »
Hi,

I am trying to associate a non-rtf file with an element, and moreover to "store" this file in the .EAP file (in order to avoid many deployment problematics).
If I want to avoid to apply the rtf-style to my file, I can create this one through the automation interface... ok, but now how is it possible for me to edit this file later ? Should I implement (through any C# code for exemple) my own non-rtf editor, or is there any way to force EA to edit a "linked document" without using the default RTF editor ?

The real need is the following : I would like to associate some "configuration files" (XML formatted) withe some elements (or packages, or projects... anyway).
Did anybody find any way to do that ?

Thanks in advance for your help

Ronan

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Store a non-rtf file in the EAP database
« Reply #1 on: August 11, 2009, 09:24:55 pm »
Hi Ronan,

AFAIK this is not possible.

EA considers a linked document - this is not the same as an associated file - to be a "document artifact" rather than a file. In the EA paradigm this is explicitly an RTF format file.

IMO the ability to specify that a linked document would not be RTF, and perhaps explicitly specify the format (like XML) from a list of 'well known' formats, would be an excellent feature. If you selected XML as the format EA could invoke the same editor as you specify in the Tools | Options | XML Specifications dialog (or the EA default editor if you left this selection blank).

Perhaps you'd care to make this suggestion to Sparx. Use the Feature Request link near the bottom of any forum page. To make it easy for the Sparxians to participate in this discussion paste in a link to this forum thread.

If you hear back from Sparx on this subject please post back to this forum and let the rest of us know what they have to say.

David
« Last Edit: August 11, 2009, 09:25:13 pm by Midnight »
No, you can't have it!

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Store a non-rtf file in the EAP database
« Reply #2 on: August 12, 2009, 06:53:20 pm »
We had consutl about this in the past with Sparx and we came to the conclution that the only solution is to change the DB adding a column of our own.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Store a non-rtf file in the EAP database
« Reply #3 on: August 12, 2009, 09:32:46 pm »
Quote
We had consutl about this in the past with Sparx and we came to the conclution that the only solution is to change the DB adding a column of our own.
IMHO - please note the "H" - the only effective is for Sparx to change the DB. [Or for Sparx to make whatever other change they deem necessary.] Having to 'home grow' this everywhere is a recipe for chaos and disaster; of course these would be best case projections and individual implementations might fare much worse.

The DB modification scenario is not something to be taken lightly. All kinds of issues would surface, not the least of which is the potential for breaking a lot of add-ins and other legacy work. This becomes a more daunting issue over time. The longer this is delayed the greater the volume of legacy code becomes; the more brittle the old (i.e. current) schema become the greater the chance that something will break.

But such a change is IMHO long overdue. We saw a pale shadow of this when auditing was introduced in EA 7.0. Turning on auditing breaks downward compatibility in a DBMS repository. Compatibility could be restored by disabling auditing. Sparx stated in one of its release notes (or other accompanying documentation) that the change in structure would become at some unspecified future time. I do not know if that event has yet occurred. But the point is that such changes can be made without widespread disaster.

But I digress...
No, you can't have it!

cty

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: Store a non-rtf file in the EAP database
« Reply #4 on: August 12, 2009, 10:07:15 pm »
With the same "H" I would say the same. It is out of question for me to customize the database, for perennity reasons but also for deployment reasons : the code & profiles I am editing is forecasted to be delivered among numberous users in my company, that have their own legacy add-ins and their own version of EA.
The by-pass for me is to manage - with automation - a pool of XML files that are located in the same folder than the EAP file. It is probably not the most elegant way to fill my needs, but ... do you have a better idea ?
I have posted a change request for Sparx... wait and see.

Oh, by the way... thanks a lot for the time you spent on my pb  :)

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Store a non-rtf file in the EAP database
« Reply #5 on: August 12, 2009, 10:13:55 pm »
Thanks for adding your voice Ronan. This one is a biggie as far as I am concerned.

And you're welcome of course. This forum only works if we participate!
No, you can't have it!

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Store a non-rtf file in the EAP database
« Reply #6 on: August 12, 2009, 11:12:57 pm »
You are all right, we also decided not to change the DB for that propose. We do how ever have an enhance SQl script to enble replication (wich we got in this forum from someone else).
We need it since we are a very large and global company.
In deed making changes ot the DB is something that should not lightly headed been done, but considering we have a full team (5-7 people) taking care of EA support full time job, mantaining the infra and developping add-ins we can afford ourselves to do it.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

Luis J. Lobo

  • EA User
  • **
  • Posts: 252
  • Karma: +0/-0
  • IT Consultant
    • View Profile
Re: Store a non-rtf file in the EAP database
« Reply #7 on: September 01, 2009, 07:33:04 pm »
Why don't you paste the XML file as object (icon) into a Linked Document?

The better way is doing this in Word, and copy-paste the object in the linked document. And the XML file goes into the EAP file.

When opening the linked document, should be possible to make double-click in the object and the default XML editor runs.
« Last Edit: September 01, 2009, 07:33:54 pm by Deiser »

cty

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: Store a non-rtf file in the EAP database
« Reply #8 on: September 01, 2009, 08:25:26 pm »
This is a way to by-pass the limitation.
I can not apply this solution because the associated RTF file may be used by our users for what it has been built for : document an element with a rich text editor.
The XML file I want to associate with elements is a "configuration" file used by C# code we develop on our own. Its content may so absolutely not be edited by users. And it must be associated to elements by the C# code itself.... the copy/paste manipulation with word may be difficult to implement in this way.
Anyway, thanks for the idea  :)