Book a Demo

Author Topic: Size of tagged values  (Read 5204 times)

nraponi

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Size of tagged values
« on: March 09, 2006, 04:51:59 am »
Hi
I am investigating sourcing use cases from a use case generation tool (currently investigating Serlio Case Complete).  This exports the use cases in XMI 1.3.

However all the data regarding the use case gets transfered as tagged values.  The problem with this is that these values hold text such as the full use case description, and when imported into EA the tagged value is being truncated.  (no error messages displayed during import).

Is there a way either redirect the tags so that they goto the relevent (correct!) areas in the use cases in EA, or to increase the size of the relevent fields?

Cheers
Nick

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Size of tagged values
« Reply #1 on: March 09, 2006, 04:06:04 pm »
Yes there will be a size limit. Don't know without looking it up what the limit is (and it will probably vary with the repository you are using).

There might be a work-around involving custom tagged values of type "Memo". Try creating a custom tagged value ("Settings | UML | Tagged Value Types") with the following line in the Detail field: Type=Memo;

Add this tagged value to a use case and enter some text, then export to XMI. Have a look at the XML created and this should tell you the XMI syntax that EA is expecting to see for memo tagged values.

Then all you need to do is pre-process your XMI before importing it into EA...

Best of luck!
The Sparx Team
[email protected]

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Size of tagged values
« Reply #2 on: March 09, 2006, 05:29:42 pm »
Is there a way to preprocess the XMI file so that the information lands in the normal place within EA?
Verbal Use Cases aren't worth the paper they are written upon.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Size of tagged values
« Reply #3 on: March 09, 2006, 05:45:00 pm »
Quote
Is there a way to preprocess the XMI file so that the information lands in the normal place within EA?


I was thinking text editor  :(
The Sparx Team
[email protected]

thomaskilian

  • Guest
Re: Size of tagged values
« Reply #4 on: March 10, 2006, 01:14:08 am »
Try notepad++ (see Google), that gives you some highlighting at least (and is of course a superior replacement for notepad).

nraponi

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Size of tagged values
« Reply #5 on: March 10, 2006, 01:39:27 am »
"and it will probably vary with the repository you are using"

Does that mean that I could change a field size in the database and it would work?

cheers
Nick

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Size of tagged values
« Reply #6 on: March 10, 2006, 02:50:54 am »
I'm not familiar with XMI nor with EA's repository, but my reasoning is as follows:
  • XMI is a tagged file type (each piece of information is associated with a tag)
  • EA uses XMI to import/export models
  • Each element in an EA diagram has an XMI tag that refers to that element's note field
  • Serlio writes an XMI file, but the tags don't match those used by EA
  • Is someone not conforming to OMG's XMI Standard?
  • I would think that a text editor's global search and replace could change the tags produced by Serlio to those used by EA
Where am I going wrong?

Thanks
Jim
Verbal Use Cases aren't worth the paper they are written upon.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Size of tagged values
« Reply #7 on: March 13, 2006, 02:03:56 pm »
Quote
"and it will probably vary with the repository you are using"

Actually it doesn't; it's 255 bytes regardless.
Quote
Does that mean that I could change a field size in the database and it would work?

For more than 255 bytes, it's recommended you use a memo field.
The Sparx Team
[email protected]

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Size of tagged values
« Reply #8 on: March 13, 2006, 02:10:56 pm »
But would it work with EA? Strikes me the field definitions EA uses work well with EA's database connectivity code. We could expect some grief if we changed anything that affected how EA stored things.

Perhaps there'd be less grief if we stored the information outside of EA, but still tried some kind of round trip. Still grief is grief.

I've been working through a something very similar. What I noticed is that EA provides a Note field for tagged values (as with pretty much everything), and the Note is a memo. I was working out how to handle arbitrary (i.e. often very long) text strings via tagged values. My working assumption is that I can put this into the Note field, perhaps wrapped in XML in case I need to include other information as well.
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Size of tagged values
« Reply #9 on: March 13, 2006, 04:31:31 pm »
Quote
Does that mean that I could change a field size in the database and it would work?


In most cases it should work.

nraponi

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Size of tagged values
« Reply #10 on: March 23, 2006, 04:23:35 pm »
Hi
I tried inserting the string from a memo extract into the value attribute on the import file and this made no difference - the text was just in the imported string.

The line from the extract of a working memo field was :

<UML:TaggedValue tag="nick" xmi.id="EAID_FA3362A4_5AA3_49bb_B276_FE2268509607" value="&lt;memo&gt;#NOTES#this is some memo text" modelElement="EAID_12A5A209_A407_45dc_8F7B_03D99B27E574"/>

So I inserted "&lt;memo&gt;#NOTES#" (no quotes) into the value of the tag on the import file.

I then set up the UML tagged value type with the corresponding name of the tagged field from the import in a blank project and did the import.  When the file was imported the tag was created as a memo correctly- however none of the text was imported into it (it was blank).

Any ideas?

Cheers
Nick

nara_c

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Size of tagged values
« Reply #11 on: April 11, 2006, 02:39:57 pm »
Quote

In most cases it should work.


What will the impact be if I then migrate a model file containting Elements with a "Memo Type" Tagged Value field to another DB say SQL Server/mySQL.  

Will the Memo type tagged value continue to accept long text in the upgraded DB? or will it revert to the standard 255 characters text.

I use both SQL server and native EAP files and found that I am able to create the "Memo type" tagged value in the SQL server model file too, with the same behaviour and space for extra text.

My concern is, will this work if I had originally created a memo field in an EAP file and then upgraded the whole model file to SQL server or mySQL later?