Author Topic: Stereotype Multiple Inheritance and Attributes for Toolbox Profile  (Read 8520 times)

Viking

  • EA User
  • **
  • Posts: 433
  • Karma: +2/-2
    • View Profile
Hi,

I currently create a MDG.

I created 2 Stereotypes in a profile:

- “Business Process” which inherits from 2 other stereotypes BMPN2.0::Activity and ArchiMate3::ArchiMate_BusinessProcess.
- “Application” which inherits from 2 stereotypes BMPN2.0::Pool and ArchiMate3::ArchiMate_ApplicationComponent.

The documentation says that multiple inheritance is possible. The documentation says, they I have inherit from stereotypes and not extend them. So this should be correct.

I wanted to create a Toolbox using the Profile Helper “Add Toolbox Page” > “Add” > “Add Stereotype” > select my Stereotype “Business Process”. But nothing happens. Is this not supported?

My questions are:

1) Because the Profile Helper does not seem to help here I have to create the according attributes manually. What have to be the attribute values of a stereotype of the toolbox? Do I have to mention the stereotypes or the MetaClasses? And how do I have to define that I inherited 2 stereotypes?
MyEAM::Application(BMPN2.0::Activity,ArchiMate3::ArchiMate_BusinessProcess)
MyEAM::Business Process(BMPN2.0::Pool,ArchiMate3::ArchiMate_ApplicationComponent)

2) I created these relations in the profile. Why do I have to add these definitions?

3) I asked this question already: how can I find out the metaclass of a stereotype “ArchiMate3::ArchiMate_BusinessProcess”. I got an answer that I should remove the stereotypes. I do not know where I see the metaclass. I even look in the database :(

Many many thanks in advance, V.
« Last Edit: January 23, 2021, 12:53:23 am by Viking »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13295
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #1 on: January 23, 2021, 01:07:09 am »
I never tried to inherit from two different stereotypes. I only did this with a single stereotype

1) This works if you use the underlying base type Activity. So MyEAM::Business Process(UML::Activity) The profile helper will do this for you if you extend that metatype from your steoreotype
2) which relations are you talking about?

3) Create an ArchiMate Business process in your model. Remove the stereotype "ArchiMate_BusinessProcess", see what is left behind (Activity in this case)
Alternative is to look in the stereotype definition in the Archimate MDG xml file.

Geert

Viking

  • EA User
  • **
  • Posts: 433
  • Karma: +2/-2
    • View Profile
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #2 on: January 23, 2021, 01:23:58 am »
I never tried to inherit from two different stereotypes. I only did this with a single stereotype

1) This works if you use the underlying base type Activity. So MyEAM::Business Process(UML::Activity) The profile helper will do this for you if you extend that metatype from your steoreotype

2) which relations are you talking about?

3) Create an ArchiMate Business process in your model. Remove the stereotype "ArchiMate_BusinessProcess", see what is left behind (Activity in this case)
Alternative is to look in the stereotype definition in the Archimate MDG xml file.

Geert

Many thanks @Geert.

to 1) What is the underlying basetype if I inherit from 2 completely different stereotypes, in my case for my stereotype "application":

BMPN2.0::Pool -> UML::ActivityPartition
ArchiMate3::ArchiMate_ApplicationComponent -> UML::Component

to 2) I am talking about my 1. chapter and the relationships between my own stereotypes and the stereotypes I inherited from. I inherit from ArchiMate_BusinessProcess and the basetype of ArchiMate_BusinessProcess is UML::Activity. So this information could be derived by SparxEA itself.

to 3) Seems to be even easier: in the stereotypes list of an Element under tab "apply to". So there is not need to delete something as long if I understand this correctly.

V.
« Last Edit: January 23, 2021, 01:44:22 am by Viking »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13295
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #3 on: January 23, 2021, 01:57:36 am »
1) I have no idea. I guess you have to choose one of them. (or maybe even something completely different)

Geert

Viking

  • EA User
  • **
  • Posts: 433
  • Karma: +2/-2
    • View Profile
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #4 on: January 23, 2021, 02:00:21 am »
1) I have no idea. I guess you have to choose one of them. (or maybe even something completely different)
Geert

Do you know the purpose of this declaration? Why in the toolbox? The profile model already defines everything.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13295
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #5 on: January 23, 2021, 02:05:28 am »
1) I have no idea. I guess you have to choose one of them. (or maybe even something completely different)
Geert

Do you know the purpose of this declaration? Why in the toolbox? The profile model already defines everything.
Yes, I think you can extend multiple base types. The toolbox items needs to know which base type to create.
If there is only one then it could be derived, but that is not how it was implemented.

Often, for your own sanity, it is better not to ask why :o

Geert

Viking

  • EA User
  • **
  • Posts: 433
  • Karma: +2/-2
    • View Profile
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #6 on: January 23, 2021, 02:24:52 am »

Often, for your own sanity, it is better not to ask why :o

Geert

I already want to start a discussion about consistency ...

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #7 on: January 23, 2021, 04:03:50 am »
There are still some guys out there who think they will see a more consistent EA in their life time. I'm probably too old.

q.

Viking

  • EA User
  • **
  • Posts: 433
  • Karma: +2/-2
    • View Profile
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #8 on: January 23, 2021, 06:25:29 am »
There are still some guys out there who think they will see a more consistent EA in their life time. I'm probably too old.

q.

I feel found out. But hope springs eternal.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8599
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #9 on: January 23, 2021, 09:44:13 pm »
There are still some guys out there who think they will see a more consistent EA in their lifetime. I'm probably too old.

q.

I feel found out. But hope springs eternal.
Hi Viking,

As you've seen from my posts and my tagline, I'm a strong proponent of consistency.  EA appears to be "inching" toward consistency and while qwerty and I might not see it; but, hopefully, it will come.

Now, to the question about multiple inheritance.  Each metatype seems to only really be able to support one base type.  We have experimented quite a bit with inheritance and we are able to inherit properties and other aspects from multiple sources.

Not all our stereotypes have base types and so can be applied to multiple base types when creating our final metatype.  However, if there is a base type somewhere in the inheritance path, the final metatype has to have the same base type.  When we try to mix base types, it doesn't seem to work.

BTW, notwithstanding that you can have multiple base types in the <AppliesTo> segment, it doesn't seem to work anymore (maybe the Sparxians can comment).

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

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #10 on: January 25, 2021, 03:32:09 pm »
Hi,

I currently create a MDG.

I created 2 Stereotypes in a profile:

- “Business Process” which inherits from 2 other stereotypes BMPN2.0::Activity and ArchiMate3::ArchiMate_BusinessProcess.
- “Application” which inherits from 2 stereotypes BMPN2.0::Pool and ArchiMate3::ArchiMate_ApplicationComponent.

Why?
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #11 on: January 25, 2021, 07:55:22 pm »
Because multiple inheritance is such a nice mis-concept. An amphi-car inherits from car and ship. And it can neiter drive nor swim well.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8599
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #12 on: January 25, 2021, 08:05:55 pm »
Because multiple inheritance is such a nice mis-concept. An amphi-car inherits from car and ship. And it can neiter drive nor swim well.

q.
There goes hybrid vigour!   ;)

Still, an amphi-car does drive and it does swim...   Whereas a houseboat is not a boathouse.

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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #13 on: January 25, 2021, 10:16:18 pm »
The right person to comment  8) You were talking about inheritance concepts when I even had not heard of UML...

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8599
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Stereotype Multiple Inheritance and Attributes for Toolbox Profile
« Reply #14 on: January 26, 2021, 03:48:39 pm »
Nobody has picked up the deliberate mistake in my post.  Still, it's Australia Day public holiday here...

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