Book a Demo

Author Topic: Change element stereotype  (Read 17960 times)

ralfeus

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Change element stereotype
« on: August 22, 2016, 07:25:49 pm »
Hi
I'm relatively new with EA so probably my question would be dumb. Nevertheles...
I use ArchiMate extension for building my models. Pretty often I need to change type of the element I've already created. In my understanding that should have been done easily with changing element's stereotype. However changing it doesn't properly change element's appearance.
For example I have an Application Component, which has stereotype Archimate2::ArchiMate_ApplicationComponent and looks like this:

When I change its stereotype to Archimate2::ArchiMate_ApplicationService I expect it to look like this:

but instead it looks like this:

I saw that Archimate2::ArchiMate_ApplicationComponent stereotype applies to elements of "component" type whilst Archimate2::ArchiMate_ApplicationService applies to ones of "class" type. I've changed element type to "class" but it didn't help.
Am I doing anything wrong? Or EA isn't capable of such thing at all?

Viking

  • EA User
  • **
  • Posts: 478
  • Karma: +2/-2
    • View Profile
Re: Change element stereotype
« Reply #1 on: August 22, 2016, 07:45:45 pm »
I am sorry, I do not see the pictures. Maybe because of our firewall. That's why I am not sure, if I understood your question correctly.

Propably this is the same topic: http://sparxsystems.com/forums/smf/index.php/topic,30888.0.html

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Change element stereotype
« Reply #2 on: August 22, 2016, 07:51:29 pm »
It looks like you have not turned on the Archimate2 MDG in Extensions/MDG.

q.

Pawel Zubkiewicz

  • EA User
  • **
  • Posts: 78
  • Karma: +2/-1
    • View Profile
    • zubkiewicz.com
Re: Change element stereotype
« Reply #3 on: August 22, 2016, 09:48:55 pm »
Am I doing anything wrong? Or EA isn't capable of such thing at all?

I did that in my EA. It work correctly but you need to close and re open the diagram to see correct element shape. Also check what qwerty described.
Enhanced Requirement Attributes Addin for Enterprise Architect (ERA Addin) - http://zubkiewicz.com/?p=239

ralfeus

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Change element stereotype
« Reply #4 on: August 23, 2016, 05:35:44 pm »
Propably this is the same topic: http://sparxsystems.com/forums/smf/index.php/topic,30888.0.html

No, I don't want same object to appear differently. I want to change object type. Let's say while building a model I add an application component. Later I understand that this entity is rather application service than component and want to change its type. When I have this object only in few diagrams and don't have too many relations I can just delete it and create new of right type. But if I have it on 5-10 diagrams and having relations with 20-30 other objects recreation of all of that wouldn't bring much joy.

ralfeus

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Change element stereotype
« Reply #5 on: August 23, 2016, 05:37:16 pm »
It looks like you have not turned on the Archimate2 MDG in Extensions/MDG.

I have it turned on. I guess I wouldn't be able to use both stereotypes otherwise as both of them (Application Component and Application Service) are part of Archimate2 MDG.

ralfeus

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Change element stereotype
« Reply #6 on: August 23, 2016, 05:39:21 pm »
I did that in my EA. It work correctly but you need to close and re open the diagram to see correct element shape. Also check what qwerty described.

Tried to reopen the diagram - no luck. It doesn't get appearance of Application Service stereotype.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Change element stereotype
« Reply #7 on: August 23, 2016, 06:36:24 pm »
What is your EA version?

q.

ralfeus

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Change element stereotype
« Reply #8 on: August 23, 2016, 06:40:07 pm »
12.1.1230

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Change element stereotype
« Reply #9 on: August 23, 2016, 06:55:46 pm »
Got it. They base on different metatypes. One is ApplicationComponent and the other ApplicationService. You need to assign the right stereotype to the right metatype. They don't work cross-over.

q.

ralfeus

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Change element stereotype
« Reply #10 on: August 23, 2016, 07:17:18 pm »
Is it possible to change element's metatype?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Change element stereotype
« Reply #11 on: August 23, 2016, 07:40:54 pm »
Via GUI you only can do Element/Advanced/Change Type. But that does not offer all metatypes. The only other way is to use a SQL and change t_object.object_type

The question is: why does one want to change e.g. an Action into a Node? I guess you're better off creating a new element instead.

q.
« Last Edit: August 23, 2016, 07:42:33 pm by qwerty »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Change element stereotype
« Reply #12 on: August 24, 2016, 10:00:14 am »
If the stereotypes extend the same metaclass you can just drag a new stereotype from the toolbox onto the diagram object and EA will offer to convert it. However, if they extend different metaclasses, this won't work so remove the stereotype, change the element type and apply the new stereotype.
The Sparx Team
[email protected]

ralfeus

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Change element stereotype
« Reply #13 on: August 24, 2016, 04:33:28 pm »
remove the stereotype, change the element type and apply the new stereotype.

I did that but element appearance hasn't changed:

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Change element stereotype
« Reply #14 on: August 24, 2016, 04:49:34 pm »
remove the stereotype, change the element type and apply the new stereotype.

I did that but element appearance hasn't changed:


Sorry, your picture's blocked on this PC. You want to change an Archimate 2 application component to an Archimate 2 application service. Do the following: Create a new Archimate 2 application service. Remove its stereotype. You will see that it is now an unstereotyped UML activity. You can now delete this activity - I was only using it to check what the stereotype extends. Go to your application component and remove its stereotype - it will now be an unstereotyped UML component. Change this to a UML activity - I forget the menu command to do this but qwerty suggested Element|Advanced|Change Type. Then drag "Application Service" from the toolbox onto your UML activity and choose "Apply" when asked. You will now have an Archimate 2 application service.
The Sparx Team
[email protected]