Author Topic: tagged value of type memo?  (Read 14419 times)

Patrick Julian

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
tagged value of type memo?
« on: March 21, 2013, 01:14:00 am »
Hi,

is it possible to add a tagged value of type "MEMO" by creating a UML profile in which I define the tagged values in a stereotype?

I ran into the 255 characters limit for "char" and saw that the type "MEMO" exists and it is used in MDGs (like in the SysML one) and in the SDK. However, I cannot find "memo" as a type in the dropdown.

Entering "memo" manually didn't do the trick.

Best regards
Patrick
« Last Edit: March 21, 2013, 01:18:49 am by observer »

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: tagged value of type memo?
« Reply #1 on: March 21, 2013, 09:05:35 am »
You can enter 'Memo' (note the uppercase M) in the name field and leave the type field empty... seems wrong to me (how do i define 2 memo-type tags for a stereotype?) so maybe i missed something, but at least it works.





« Last Edit: March 22, 2013, 12:54:55 am by pmaessen »

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: tagged value of type memo?
« Reply #2 on: March 21, 2013, 09:34:14 am »
Not quite. You type Memo in the Value field and type the long tag value text you need in the Notes field.
Best Regards, Roy

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: tagged value of type memo?
« Reply #3 on: March 22, 2013, 12:29:46 am »
I was referring to an attribute for a stereotype in an UML stereotype profile, where you can enter the fields Name, Type, Initial Value, and Stereotype for an attribute.

When you enter Name = 'Menu' and leave the rest blank you will get a tagged value named 'Memo' and of type Memo in elements of the stereotype.

I would have expected i would be able to enter Type = 'Memo' and Name='xxxx', resulting in a tagged value 'xxx' of type Memo but this is not the case, instead i get a tagged value 'xxx' of type String.

Patrick Julian

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: tagged value of type memo?
« Reply #4 on: March 22, 2013, 03:19:04 am »
Quote
I was referring to an attribute for a stereotype in an UML stereotype profile, where you can enter the fields Name, Type, Initial Value, and Stereotype for an attribute.

Me too, this is exactly what I meant :)

Quote
When you enter Name = 'Menu' and leave the rest blank you will get a tagged value named 'Memo' and of type Memo in elements of the stereotype.

Doesn't work for me, sadly. EA 10 Build 1005.

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: tagged value of type memo?
« Reply #5 on: March 22, 2013, 04:33:00 am »
Woooops my bad: I used an old profile of mine that had just this but missed out on something vital.

Just to be sure this time i started with a brand new project and used the new MDG technology wizard to create a 'Basic template' profile from scratch (@Sparx thx for that  it makes life sooooo much easier :) ).

So here's what you need to do to get it to work:

1) Define a tagged value type (settings->UML types, tagged valuetyupe tab) for your memo field, with say Tag Name='ACMENotes', and Detail='Type=Memo;'

2) (as before) Add an attribute with Name='ACMENotes' to your stereotype (in my case 'Animal'), leave the remaining fields blank and save the profile and generate the MDG (be sure to include the newly created tagged value type in the MDG)

grts,

Paulus
« Last Edit: March 22, 2013, 04:41:29 am by pmaessen »

philchudley

  • EA User
  • **
  • Posts: 740
  • Karma: +20/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
Re: tagged value of type memo?
« Reply #6 on: March 22, 2013, 06:05:28 am »
Sorry, still not working for me, and I have never got this to work! I have tried every combination of name, type, default in all versions of EA from 7.5, 8, 9 and 10

Yes, I get the Memo type if I use the same repository in which the MDG is defined, BUT, when the MDG is used in a different repository the Memo type tagged value always appears as  a String

I have had to export the TaggedValue as a resource and then import it, this works just fine.

I have looked the  BPMN 2.0 MDG xml file, and all the Memo TaggedValues have an extra line in the TaggedValue definition, namely BaseStereotype=

I have even tried this, but yet again it does not work

There must be a way, since SysML and BPMN all work, but try as I might I cannot get Memo (or DateTime) to work as stated in the User Guide in as in previous replies to this post.

Cheers

Phil
follow me on Twitter

@SparxEAGuru

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: tagged value of type memo?
« Reply #7 on: March 22, 2013, 06:52:54 am »
Well, i can use the MDG in another repository and the memo field works.
I even switched to another (clean install) machine and it worked as well.

Maybe you overlooked something. I uploaded the zip file containing the EAP, MTS and generated XML's i used here: https://github.com/Paulusma/ACME (i hope i'm not breaking any rules here).

Maybe you can download that and see if the ACME.xml MDG works for you, if it does check the source EA & MTS how its created (you'll have to change the paths D:\CGI in the MTS ofcourse to get it working).

best regards,

Paulus
« Last Edit: March 22, 2013, 06:58:54 am by pmaessen »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: tagged value of type memo?
« Reply #8 on: March 22, 2013, 07:20:21 am »
I don't see where animal has any tagged value that creates a memo. The ACMEnotes simply create a tag without anything. In order to make it a memo you have to manually enter 'memo' in the tag value. Or am I missing something?

q.
« Last Edit: March 22, 2013, 07:21:28 am by qwerty »

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: tagged value of type memo?
« Reply #9 on: March 22, 2013, 07:42:54 am »
Animal has an attribute ACMENotes, and ACMENotes is defined as an UML tagged value type, of type Memo. When using the MDG it is included in the tagged-value set ACME.

When generating the MDG the tagged value type ACMENotes is included in the MDG along with the stereotype, diagram & toolbox profiles.

It works but i wonder if this is the way it's meant to be done, because, like i said, i find it a bit strange that name & type of the tag are tied to each other in this way. It prevents re-use of that type in other attributes.

« Last Edit: March 22, 2013, 07:43:36 am by pmaessen »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: tagged value of type memo?
« Reply #10 on: March 22, 2013, 12:48:01 pm »
I see. It really works! I also had difficulties creating the memo tags, but the way you did it seems to be the solution. Certainly it's strange, but it's EA. You've done a great job bringing light into this formerly dark room.

q.

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: tagged value of type memo?
« Reply #11 on: March 22, 2013, 05:58:21 pm »
:)  

I'll move the link to the community site then and perhaps embellish it a bit.
« Last Edit: March 22, 2013, 05:59:01 pm by pmaessen »

Robert Sheridan

  • EA User
  • **
  • Posts: 105
  • Karma: +0/-0
    • View Profile
Re: tagged value of type memo?
« Reply #12 on: March 22, 2013, 08:29:02 pm »
Way back when I got it to work in a profile by adding <memo> as the stereotype and initial value, I had to put the <> in for it to work; are these no longer needed?

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: tagged value of type memo?
« Reply #13 on: March 23, 2013, 12:38:14 am »
Robert thx for replying, this was just what was missing!

And btw they are still needed. I checked various combinations of <memo>, <Memo>,memo,Memo as values for Type and Initial Value, and it turns out that to create a Memo type tagged value:

- you need to set Initial Value = '<memo>' (exactly like that).
- Name can be freely chosen and remaining fields (including Type) can be left blank

Do you have a similar solution for custom tagged types like ACMENotes? Setting Initial Value = '<ACMENotes>' or '<acmenotes>' does not work.



« Last Edit: March 23, 2013, 12:39:26 am by pmaessen »

philchudley

  • EA User
  • **
  • Posts: 740
  • Karma: +20/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
Re: tagged value of type memo?
« Reply #14 on: March 25, 2013, 08:58:21 pm »
Thanks Paulus, yes your ACEM example did indeed work for all repositories.

Tried to re-create it myself and it did not work! Even though all XML files appeared to be identical in your ACME and my ACME.

However, I have got it work by adding the initial value of <memo>

Although the memo field has the default text of <memo> rather than blank as in your ACME example.

In addition, I notice that in your ACME, there is no initial value

All a mystery to me, but for now I will continue with the initial value trick

All the best

Phil
follow me on Twitter

@SparxEAGuru