Author Topic: Redefining an ArchiMate element does not work as expected?  (Read 6098 times)

Greg_PL

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Redefining an ArchiMate element does not work as expected?
« on: June 13, 2024, 05:01:07 pm »
Hi,

Trying to use redefinition capability of EA (16.0.1605). Looks simple, and somehow it works but not as I expected: my new element is being added to new diagram by dragging from default ArchiMate3 toolbox, HOWEVER it appears without proper shape (colour is default UML) and without any default connectors and quicklinker... What am I doing wrong?...  I'm using this simple guide.

Thanks for your help.
« Last Edit: June 13, 2024, 05:03:43 pm by Greg_PL »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13283
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Redefining an ArchiMate element does not work as expected?
« Reply #1 on: June 13, 2024, 06:03:58 pm »
Did you remember to set your MDG as the "Active" one?

Geert

Greg_PL

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Redefining an ArchiMate element does not work as expected?
« Reply #2 on: June 13, 2024, 06:58:20 pm »
Yes, I did remember. That's why I can use my stereotype by dragging from default toolbox. However the style and connectors are gone... Any clue what could go wrong?
« Last Edit: June 13, 2024, 08:51:02 pm by Greg_PL »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13283
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Redefining an ArchiMate element does not work as expected?
« Reply #3 on: June 14, 2024, 09:47:32 pm »
Yes, I did remember. That's why I can use my stereotype by dragging from default toolbox. However the style and connectors are gone... Any clue what could go wrong?
The style (as in shapescript) should automatically be applied, and I guess things like default color as well.

The connectors you see in the quicklinker also depend on the active toolbox.

Geert

Greg_PL

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Redefining an ArchiMate element does not work as expected?
« Reply #4 on: June 14, 2024, 09:59:30 pm »
Thanks. That was exactly what I was expecting... May I ask you to share simple MDG xml file with just one single redefinition? F.e. ArchiMate_BusinessService element with one extra tag value?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13283
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Redefining an ArchiMate element does not work as expected?
« Reply #5 on: June 14, 2024, 10:44:01 pm »
Here's a stereotype example from a real MDG (changed company names to protect the innocent)

Code: [Select]
<Stereotype name="ArchiMate_ApplicationComponent" metatype="ApplicationComponent" notes="" bgcolor="16777152" fontcolor="-1" bordercolor="-1" borderwidth="1" hideicon="0" generalizes="ArchiMate3::ArchiMate_ApplicationComponent" baseStereotypes="ArchiMate3::ArchiMate_ApplicationComponent">
<stereotypedrelationships>
<stereotypedrelationship stereotype="ArchiMate3::ArchiMate_Association" constraint="Contoso Modelling::ArchiMate_ApplicationComponent"/>
<stereotypedrelationship stereotype="ArchiMate3::ArchiMate_Composition" constraint="Contoso Modelling::ArchiMate_ApplicationComponent"/>
<stereotypedrelationship stereotype="ArchiMate3::ArchiMate_Flow" constraint="Contoso Modelling::ArchiMate_ApplicationComponent"/>
</stereotypedrelationships>
<Image type="EAShapeScript 1.0" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">UEsDBBQAAAAIAJ6LwlZsGT8FYQUAAMgjAAAHABEAc3RyLmRhdFVUDQAHzyZ6
ZM8memTPJnpk7VlNb9tGEJ1rCuQ/EDo5SALX1peDooekadECKRw0Bnp2LFsW
IkuCZUdwgvz3vjfDFbnLXZKyrQQCCsIrSnw782Z2dma4Hsm5nMlcruVUbmSC
u5lk8rtMcX8qx/i9Lz/Ln/JFnspP8lXHJ4qfYOYMc4p5v0pHlrLC+EuOm+Lp
HZ7dAnOCuwXmZMBlwExxf4HfKWksl7gr5k3wJJM96D2FxBOMY3zrrHntr1l1
5IVKc0868gyXSXFsn8hrGeH6AB4fMV4CRyaU+AYzTcYQMl+oXH5z98/WnL49
mFsmz1Wye7otpnVS3iakdPXzsSy+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PPkf
66qkGbXzkp0SH9XunLgn78OpnZfacIp5slzl+Zeq9H51IvJrLuH71frw980q
5Ep9MdK3Tr47x+tkeaf9+HpvFfM431vkT73mV8ZEdSduw/5ylxBKCRnvRq9w
pnLtFML9bivLrLXQOGanX/asneBM8JRv93vQ63oHes3uB8EMeioujdp4pvEJ
qDjCzxXm9/H6afWNo5e/mTmEv/cP81rZq8GYR+trpZ0NhZb6mBibco9Sb4ud
nzXnOr7RNWOOajA91VSPibEJq129Pe6trFfrs4FU/2ccYnim2OT7vvKtX8MU
I9oVVu5M38PL7/e+dRYP/O93Wl8v513n534eV/UYq1/1umJ8rGNlRkrZ0VX/
s99Kyya7quyQI09BmzA8S2nSFeNDO1aaLcqZK+xhuLavxE5vHeYjnn8R1mk7
eaIG4g7yKsKoIm/e8+S3jYS+4pwE111Y38Mo9CW4DMzxm/wHUEsBAhcLFAAA
AAgAnovCVmwZPwVhBQAAyCMAAAcACQAAAAAAAAAAAACAAAAAAHN0ci5kYXRV
VAUAB88memRQSwUGAAAAAAEAAQA+AAAAlwUAAAAA
</Image>
<AppliesTo>
<Apply type="Component">
<Property name="isIndirectlyInstantiated" value="true"/>
<Property name="_HideUmlLinks" value="True"/>
</Apply>
</AppliesTo>
<TaggedValues>
<Tag name="Level" type="enumeration" description="" unit="" values="L0,L1,L2,L3,TBD" default="TBD"/>
<Tag name="Contoso/ACME" type="enumeration" description="" unit="" values="Contoso,ACME,Contoso + ACME,TBD" default="TBD"/>
<Tag name="Maturity" type="enumeration" description="" unit="" values="AS-IS,AS-IS Evolution,TO-BE,To Delete,Temporary,TBD" default="TBD"/>
<Tag name="Maturity ACME" type="enumeration" description="" unit="" values="AS-IS,AS-IS Evolution,TO-BE,To Delete,Temporary,TBD" default="TBD"/>
<Tag name="Onshore/Offshore" type="enumeration" description="" unit="" values="Onshore,Offshore,Onshore + Offshore,TBD" default="TBD"/>
</TaggedValues>
<DiagramProperties>
<DiagramProperty name="Show Maturity Color" option="ShowMaturity" default="1"/>
</DiagramProperties>
</Stereotype>

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Redefining an ArchiMate element does not work as expected?
« Reply #6 on: June 15, 2024, 06:42:40 am »
Just flew over this, but it looks like "dragging from the standard toolbox" seems to be just the "standard" stereotype being created. So have you checked that the created element actually has the stereotype from your profile?

q.

Greg_PL

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Redefining an ArchiMate element does not work as expected?
« Reply #7 on: June 19, 2024, 04:37:56 pm »
Hi there,

I still haven't succeeded with my "redefine" mdg... So what I do in my MDG profile diagram:
1. Create a stereotype element named 'ArchiMate3::ArchiMate_BusinessService' and tick 'Abstract' checkbox (in Properties-> Details)
2. Create second stereotype element named just 'ArchiMate_BusinessService'
3. Drag a 'Redefines' relation from toolbox and connext both stereotype elements (second one redefines first one)
4. Add custom TAG to new element.
5. Generate MDG and set it to 'Active'

Result:
1. When I drag a BusienssService element from a toolbox then it appears as my new stereotype (success)
2. New element does not look like the original ArchiMate Busienss Service - shape is indeed ok, but color is not (default UM:) (failure)
3. New element does not have any quicklinker links inherited from original ArchiMate (failure)
4. New element does not allow for any ArchiMate relations dragged from ArchiMate elements to it (failure)

Can anyone help me? Maybe someone can share a profile xml of properly redefined stereotype?


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13283
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Redefining an ArchiMate element does not work as expected?
« Reply #8 on: June 19, 2024, 05:20:00 pm »
You have to set the default color yourself (F4). That doesn't get inherited.

As for the quicklink entries. As long as you don't have the _HideUMLLinks set to true, you should be OK.

One thing about the way you create the original ArchiMate3::BusinessService. There is a much easier way if you use the metatype from the toolbox.
That avoids any typo's.

I can imagine that even a lowercase/uppercase mixup can cause these type of weird problems.

I already shared the relevant portion of my redefined stereotype (in that case I did have the HideUMLLinks option set to true because we are defining our own set of allowed relations)

Geert

Greg_PL

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Redefining an ArchiMate element does not work as expected?
« Reply #9 on: June 20, 2024, 08:37:33 pm »
Sweet Jesus... It works! So using metatype fixed it. Thank you!

Greg_PL

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Redefining an ArchiMate element does not work as expected?
« Reply #10 on: June 21, 2024, 09:16:49 pm »
Hi again. It's worth mentioning here...

All my problems with redefinition not working as expected were caused by... [attention please] SPARX EA not being restarted after applying new MDG. That is so strange - I've been working with MDGs for some time and restart was never necessary (I was just removing old/importing new MDG).

So it is solved form me, but probably a case for SPARX team ;).

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Redefining an ArchiMate element does not work as expected?
« Reply #11 on: June 21, 2024, 09:20:59 pm »
Instead of restarting you can disable and then enable the MDG. Took me a while to find that out.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13283
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Redefining an ArchiMate element does not work as expected?
« Reply #12 on: June 21, 2024, 09:55:05 pm »
Yeah, the tricky thing is that for most things a restart is not needed. But some some things it is.
Which some things exactly is still a mystery for me.
I've been caught by that quite a few times.

Whenever I now have an MDG problem that I can't get my head around, I first try the old "have you tried turning it off and on again" before searching further.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8598
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Redefining an ArchiMate element does not work as expected?
« Reply #13 on: June 23, 2024, 12:25:28 pm »
Yeah, the tricky thing is that for most things a restart is not needed. But some some things it is.
Which some things exactly is still a mystery for me.
I've been caught by that quite a few times.

Whenever I now have an MDG problem that I can't get my head around, I first try the old "have you tried turning it off and on again" before searching further.

Geert
Wot 'E Sed!

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

PDC

  • EA User
  • **
  • Posts: 90
  • Karma: +4/-0
  • Systems Engineer
    • View Profile
Re: Redefining an ArchiMate element does not work as expected?
« Reply #14 on: July 03, 2024, 05:38:32 pm »
Could it depend on where the MDG is located?
If the MDG is saved within the same model's Resources then maybe relaunching EA is not necessary, but with an MDG saved to the local disk I guess the relaunch is needed so that EA goes to the disk (/server) and brings in the MDG definition from the xml again.
Just a guess based on some thing I've been doing recently.
In any case, I'm with the rest of you - "Troubleshooting step 1 is to turn it off and on".
Phil