Book a Demo

Author Topic: How to update/ synchronize applied stereotypes?  (Read 5950 times)

r2

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
How to update/ synchronize applied stereotypes?
« on: April 17, 2018, 07:31:16 pm »
Hi,

I have an EA profile and a toolbox with several stereotypes which I applied in the model. Now I updated the name, color and properties of the stereotypes in my profile, saved the toolbox and re-imported the updated MDG technology XMI file into the model. How do I update the existing elements in the model automatically? Is there a chance without a script? I assume since I changed the name of the (same) stereotype, there is no mapping between the elements.

Thanks

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to update/ synchronize applied stereotypes?
« Reply #1 on: April 17, 2018, 08:47:53 pm »
Just go to your stereotype in the toolbox and choose Synch from the context menu. Note that it only adds new TVs and does not remove existing ones.

q.

r2

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: How to update/ synchronize applied stereotypes?
« Reply #2 on: April 17, 2018, 09:24:24 pm »
Well, if I use synch stereotype nothing happens apart from the tagged values. But I want to update the existing applied stereotypes in total, eg. <<name_old>> --> <<name_new>>, old color --> new color and so on. Any idea?

r2

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to update/ synchronize applied stereotypes?
« Reply #3 on: April 17, 2018, 10:34:52 pm »
You need to script that. EA has no idea that you change the name of a stereotype. So you need to run a script which knows about that. It's best anyway to have a new version of your profile and shift existing ones to the new. A change to a stereotype is not trivial and should only be made after well thinking about it, never on the fly.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: How to update/ synchronize applied stereotypes?
« Reply #4 on: April 17, 2018, 11:56:59 pm »
A change to a stereotype is not trivial and should only be made after well thinking about it, never on the fly.
This.

Now, someone who is somewhat familiar with EA might be forgiven for thinking that a stereotype's name is not its identity, since that's how most of EA works, but with stereotypes the (fully-qualified) name is in fact the identity. So you can't change it, what you're doing is deleting one stereotype and creating another. EA has no record of the change, and in fact no concept of a stereotype name change.

/Uffe
My theories are always correct, just apply them to the right reality.

r2

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: How to update/ synchronize applied stereotypes?
« Reply #5 on: April 18, 2018, 01:34:06 am »
A change to a stereotype is not trivial and should only be made after well thinking about it, never on the fly.
This.

Now, someone who is somewhat familiar with EA might be forgiven for thinking that a stereotype's name is not its identity, since that's how most of EA works, but with stereotypes the (fully-qualified) name is in fact the identity. So you can't change it, what you're doing is deleting one stereotype and creating another. EA has no record of the change, and in fact no concept of a stereotype name change.

/Uffe


Thanks for your feedback. So there is no stereotype specific GUID available to start from.. and the only chance is to use a script that runs by the name as identifier? Is there a UML tool on the market that supports to some extend such a stereotype updating mechanism?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to update/ synchronize applied stereotypes?
« Reply #6 on: April 18, 2018, 01:54:05 am »
No, there is no GUID. Stereotypes are held in EA's memory. When scripting use StereotypeEx for the FQN of the stereotype. Regarding tools: probably nothing or in price areas where I don't work.

q.