Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: michielper on January 21, 2019, 10:26:35 pm

Title: Archimate elements not visually correct
Post by: michielper on January 21, 2019, 10:26:35 pm
I have a situation where an ArchiMate_BusinessProcess is shown as a yellow rounded rectangle but without the small arrow in the top right corner! Another element in the same diagram does also have ArchiMate_BusinessProcess as stereotype but does, correctly, show the small arrow.
How can this be, what determines the visual appearance of an element?
Title: Re: Archimate elements not visually correct
Post by: Glassboy on January 22, 2019, 06:45:14 am
I have a situation where an ArchiMate_BusinessProcess is shown as a yellow rounded rectangle but without the small arrow in the top right corner! Another element in the same diagram does also have ArchiMate_BusinessProcess as stereotype but does, correctly, show the small arrow.
How can this be, what determines the visual appearance of an element?

Have you accidentally changed the stereotype?
Title: Re: Archimate elements not visually correct
Post by: Sunshine on January 22, 2019, 05:42:14 pm
I have a situation where an ArchiMate_BusinessProcess is shown as a yellow rounded rectangle but without the small arrow in the top right corner! Another element in the same diagram does also have ArchiMate_BusinessProcess as stereotype but does, correctly, show the small arrow.
How can this be, what determines the visual appearance of an element?
Try double checking you don't have more than one stereotype selected
Title: Re: Archimate elements not visually correct
Post by: Paolo F Cantoni on January 22, 2019, 06:14:06 pm
I have a situation where an ArchiMate_BusinessProcess is shown as a yellow rounded rectangle but without the small arrow in the top right corner! Another element in the same diagram does also have ArchiMate_BusinessProcess as stereotype but does, correctly, show the small arrow.
How can this be, what determines the visual appearance of an element?
Try double checking you don't have more than one stereotype selected
WOT'E SAID!
Also check that the stereotypes are correctly defined in t_xref (will also show the point Sunshine made).  We had some very old objects whose stereotypes (Fully qualified name) wasn't quite correct and so the correct shapescript wouldn't get triggered.

Paolo
Title: Re: Archimate elements not visually correct
Post by: Glassboy on January 23, 2019, 07:20:07 am
Also check that the stereotypes are correctly defined in t_xref (will also show the point Sunshine made).  We had some very old objects whose stereotypes (Fully qualified name) wasn't quite correct and so the correct shapescript wouldn't get triggered.

I somehow ended up with objects that had the same stereotype for all three version of ArchiMate selected.  That was fun :-)
Title: Re: Archimate elements not visually correct
Post by: Sunshine on January 26, 2019, 09:51:45 am
Also check that the stereotypes are correctly defined in t_xref (will also show the point Sunshine made).  We had some very old objects whose stereotypes (Fully qualified name) wasn't quite correct and so the correct shapescript wouldn't get triggered.

I somehow ended up with objects that had the same stereotype for all three version of ArchiMate selected.  That was fun :-)
#MeToo
Ended up writing that script to set stereotypes I've posted before to fix it.
Title: Re: Archimate elements not visually correct
Post by: michielper on January 28, 2019, 07:49:08 pm
Thanks for all the reply's, but is there a way to fix this without replacing the element(s) concerned? How do I attach the right shape-script to an element?
Title: Re: Archimate elements not visually correct
Post by: Geert Bellekens on January 28, 2019, 08:29:01 pm
Thanks for all the reply's, but is there a way to fix this without replacing the element(s) concerned? How do I attach the right shape-script to an element?
Michiel,

The shapescript is linked to the (fully qualified) stereotype
So if you make sure your object has the correct stereotype from the correct MDG, and it has only one stereotype, then you should be fine.
Never ever type in a stereotype, instead always select it using the [...] button.

Also, make sure you only enable the MDG's you actually use. That reduces the risk of using the wrong stereotype.

Geert
Title: Re: Archimate elements not visually correct
Post by: michielper on January 29, 2019, 12:08:42 am
Thanks for all the reply's, but is there a way to fix this without replacing the element(s) concerned? How do I attach the right shape-script to an element?
Michiel,

The shapescript is linked to the (fully qualified) stereotype
So if you make sure your object has the correct stereotype from the correct MDG, and it has only one stereotype, then you should be fine.
Never ever type in a stereotype, instead always select it using the [...] button.

Also, make sure you only enable the MDG's you actually use. That reduces the risk of using the wrong stereotype.

Geert

Thanks for the help... this seems to go some way of a solution. I can indeed select a Profile such as Archimate, Archimate2 or Archimate3, but strangely enough, they do not show all element types! The element type that I need, BusinessProcess, is not in the list!!
Title: Re: Archimate elements not visually correct
Post by: Geert Bellekens on January 29, 2019, 12:27:07 am
Thanks for the help... But so far it doesn't work. The correct shape script is apparently not called. Instead, it is getting worse... Now I have a rectangle with explicit <<stereotype>> and scope:: in text. Deselecting "show namespace" does not help. Is there a way to force a shape script upon an element?
No, shapescripts are always loaded through the stereotypes.

You may want to check if you don't have any "rogue" stereotypes hanging around in Configure | Reference Data | UML Types and make sure you have the correct MDG enabled.

What do you see when you select the [...] next to the stereotypes field?
It should only have one stereotype checked and it should show the correct version of archimate in the Profile dropdown.

Geert
Title: Re: Archimate elements not visually correct
Post by: michielper on January 29, 2019, 01:39:47 am
Thanks for the help... But so far it doesn't work. The correct shape script is apparently not called. Instead, it is getting worse... Now I have a rectangle with explicit <<stereotype>> and scope:: in text. Deselecting "show namespace" does not help. Is there a way to force a shape script upon an element?
No, shapescripts are always loaded through the stereotypes.

You may want to check if you don't have any "rogue" stereotypes hanging around in Configure | Reference Data | UML Types and make sure you have the correct MDG enabled.

What do you see when you select the [...] next to the stereotypes field?
It should only have one stereotype checked and it should show the correct version of archimate in the Profile dropdown.

Geert

When I create a new Archimate 3 BusinessProcess, two stereotypes are checked!
Archimate_BusinessProcess  and  Archimate3::Archimate_BusinessProcess
Title: Re: Archimate elements not visually correct
Post by: Geert Bellekens on January 29, 2019, 04:10:35 am
When I create a new Archimate 3 BusinessProcess, two stereotypes are checked!
Archimate_BusinessProcess  and  Archimate3::Archimate_BusinessProcess

From which profile?
It sounds like you have the rogue stereotype problem.
Go into the stereotypes list and delete all stereotypes you find there that resemble one of these two.

Geert
Title: Re: Archimate elements not visually correct
Post by: michielper on January 29, 2019, 08:43:45 pm
When I create a new Archimate 3 BusinessProcess, two stereotypes are checked!
Archimate_BusinessProcess  and  Archimate3::Archimate_BusinessProcess

From which profile?
It sounds like you have the rogue stereotype problem.
Go into the stereotypes list and delete all stereotypes you find there that resemble one of these two.

Geert
Thanks for the help!
Where do I find the Profile I am using and the stereotype list? But your suggestion sounds dangerous.... I am sharing this model with a lot of other people an I am afraid an action like this might turn out disastrous....

I exported a very small package containing two elements. One original good looking element and one I messed with, changing its stereotype so it looks not correct. My idea is that in the XML I would be able to see what the problem with the second element is and I should be able to correct the XML code.... A logical idea, isntit? However, from the XML code I cannot see any clue as to why the first element should call the right shapescript and the second should not.... Very strange indeed! Is there some hidden information somewhere???
Title: Re: Archimate elements not visually correct
Post by: Geert Bellekens on January 29, 2019, 08:52:30 pm
The "select stereotype" dialog has a "profile" dropdown that shows the profile used by the stereotype.
When you select the correct Archimate profile you will see all archimate stereotypes.

You could also look in the t_xref table for it.

If you find a stereotype called Archimate_<something> in the stereotypes list in EA then you should delete it as it causes problems for you and every other user of this model. The stereotypes list should only contain "loose" stereotypes that are not defined in a profile of an MDG.

Geert
Title: Re: Archimate elements not visually correct
Post by: michielper on January 29, 2019, 11:26:49 pm
The "select stereotype" dialog has a "profile" dropdown that shows the profile used by the stereotype.
When you select the correct Archimate profile you will see all archimate stereotypes.

You could also look in the t_xref table for it.

If you find a stereotype called Archimate_<something> in the stereotypes list in EA then you should delete it as it causes problems for you and every other user of this model. The stereotypes list should only contain "loose" stereotypes that are not defined in a profile of an MDG.

Geert
Allright, so where do I find the dialog that lets me delete stereotypes? And what is the scope of such an action, can I try it in a test-model first?
Title: Re: Archimate elements not visually correct
Post by: Geert Bellekens on January 29, 2019, 11:48:35 pm
You may want to check if you don't have any "rogue" stereotypes hanging around in Configure | Reference Data | UML Types and make sure you have the correct MDG enabled.
Yes, sure you can try it in a test model if you an unsure.

Geert
Title: Re: Archimate elements not visually correct
Post by: michielper on January 31, 2019, 12:29:16 am
So now I copied (exported then imported) the offending elements (Archimate_BusinessProcess) to a clean project in its own .EA file in order to try to get them to behave properly (call the right shapescript). Then I open the properties of one of the elements not showing the right shape.
In the Profile pull-down I select the required profile: Archimate3
Then I see a list of element types below. However >:(  BusinessProcess is missing from the list!!! As are many other element types!!!
How can this be?
The same with the profiles Archimate and Archimate2, also many types missing among which BusinessProcess. Very strange!

Any idea?

Michiel
Title: Re: Archimate elements not visually correct
Post by: Geert Bellekens on January 31, 2019, 05:03:08 am
Ha, I think I know what is going on.
It seems like the stereotype Archimate_BusinessProcess has been applied to the wrong basetype.
It could be a Class, Action, Use Case,... instead of an Activity.

When you remove all stereotypes you are left with the base UML element. If that is not an Activity then that is the problem.
You can change the type of an element using one of the menu options, (but I always forget where it is exactly)

Geert