Book a Demo

Author Topic: Default Stereotype Notes + autonumbering  (Read 4314 times)

satrman

  • EA User
  • **
  • Posts: 50
  • Karma: +2/-0
    • View Profile
Default Stereotype Notes + autonumbering
« on: May 24, 2021, 08:03:41 pm »
Hi guys,
doing some custom profile + toolbox for coleague and he has 2 requirements:
1) New element creted from toolbox must have prefilled Notes with some tempalte text
2) Auto counter should apply

Ad 1 - I can create UML Pattern and add it to MDG with toolbox item referencing towards the pattern, however I don't get the autocounter number (even though there is "Use Auto Names" option)
Ad 2 - I can make standard stereotype but there is no property that would affect default Notes

Sure, I can make script, which handles that all, but that adds complexity to usage.
Any suggestions?

Thanx in advance

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Default Stereotype Notes + autonumbering
« Reply #1 on: May 25, 2021, 03:41:23 am »
I guess you're out of lock regarding the notes (to my knowledge). However, the auto-counter jumps on the _metatype you have set for your stereotype. You need to poke your metatype in t_trxtypes since EA offers only "standard" metatypes in he GUI and none from your profiles. I made it by defining an autocounter in the GUI and alter the value of TRX to my metatype with repository.execute.

q.

satrman

  • EA User
  • **
  • Posts: 50
  • Karma: +2/-0
    • View Profile
Re: Default Stereotype Notes + autonumbering
« Reply #2 on: May 25, 2021, 06:20:23 pm »
Thanks for the answer.
Those 2 requirements are connected... I have no problem to get autonumbering as my coleague chose "change" object_type and I can simply assign autonumbering to it (and it works if I make stereotype with "change" as base metaclass as well). But in stereotype definition, there si no way, how to prefill Notes.
So I can make diagram with my new stereotype on it, fill Notes with whatever I want, save it as UML pattern, Add pattern to MDG and in toolbox I can make reference to this pattern. This way I get my stereotype with Notes prefilled, however "onCreation" event does not trigger autonumbering. The only thing I can do is to run autonumbering ex post, but it adds complexity to the process for less advanced user.
I was thinking about simple "in-built" addin, that would catch on-create event and add desired Notes text to my stereotype, however seems to be an overkill for pretty simple issue:-)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Default Stereotype Notes + autonumbering
« Reply #3 on: May 25, 2021, 06:28:14 pm »
You can use the template package to "prefill notes" for a stereotype.
Seems a lot easier than UML patterns.

Geert

satrman

  • EA User
  • **
  • Posts: 50
  • Karma: +2/-0
    • View Profile
Re: Default Stereotype Notes + autonumbering
« Reply #4 on: May 25, 2021, 08:35:36 pm »
YES! I was curouious about this function but didn't have use for it until now.
Does exactly, what I needed.
Thanx Geert, (I know you know, but you're the best;-)