Author Topic: Same object with different stereotypes in different diagrams  (Read 8241 times)

qwerty

  • EA Guru
  • *****
  • Posts: 9364
  • Karma: +144/-137
  • I'm no guru at all
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #15 on: July 22, 2016, 05:54:40 am »
Once you are through with that, you can checkout Geerts github site with tons of shape scripts (even those which have been somehow copyrighted but are now no longer).

q.

Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #16 on: July 22, 2016, 04:26:54 pm »
In the Stereotype field you have to insert the name of your stereotype you create.
I thought I have to insert "ArchiMate_ApplicationComponent" here. Is that not correct? If you say "name of your stereotype", does the name has any effect on anything?

In the Base Class field you have to select the UML basis type what somehow defines the features you can use later.
I chose <all>. Is that not correct?

In the table on the right you see examples of that, e.g. a cdrom that is in fact an UML Node (at least in my installation).
Not in mine.

As I understand, you what to have a different shape.
No. I want to reuse the Archimate Component shape and the BPMN Swimlane shape. Is reusing not possible? Do I have to create new shapes, although they are already there?

Unfortunately I do not get to run the example of Sunshine either.

Information how to do that, you can find on Sparx help pages or in querty’s book here:
https://leanpub.com/shapescript/read
I know this paper. I do not want to create new shapes. Otherwise this paper would be helpful. And I want to understand the concepts behind this. But I don't and the paper does not help me here.
« Last Edit: July 22, 2016, 05:29:41 pm by Viking »

PeterHeintz

  • EA User
  • **
  • Posts: 691
  • Karma: +42/-16
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #17 on: July 22, 2016, 06:42:55 pm »
I am still not sure whether I understand enough what you want to achieve and I do not have knowledge what elements exist in ArchiMate and what there meaning is.

However whatever element you use( e.g. in a diagram) is based on a “Base Class”, e.g. your ArchiMate_ApplicationComponent” is based on Component. You can find out this by deleting the Stereotype and reopening the properties dialog where in the frame header now is Component rather than ApplicationComponent.

An element can have many stereotypes assigned to, however the first assigned is somehow master and e.g. defines the layout of the element in a diagram.

So if you define Base Class <all> that means your stereotype is assignable to any kind of element maybe already having some other stereotypes already.

If you want an element to look different you have to provide information about that. In virtually all cases (some minor exceptions exist) to say "that there is something different, additional,…"you have to use a stereotype and to make the element look different you can define colors,  images or shape scripts.

This statement below gives me the feeling we all talk about different things.
Quote
No. I want to reuse the Archimate Component shape and the BPMN Swimlane shape. Is reusing not possible? Do I have to create new shapes, although they are already there?
I did not found the ArchiMate Swimlane in my tool boxes of ArchiMate but Swimlanes you could classify under context menu “Advanced/Instance Classifier.
(maybe that is just what you are looking for)
Best regards,

Peter Heintz

Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #18 on: July 22, 2016, 06:58:07 pm »
Thank you very much for your patience.

I am talking about ArchiMate Application (Component in UML) and BPMN Swinlane (there is no lane in Archimate). Lanes are part of BMPN (and could be used to represent applications).

By "reusing" I mean that I do not need to create a new shape. I want to reuse the shapes which are already there.

What I want is that an Application is shown by the application-icon in an Archimnate (or UML) diagram and as a Swimlane in a BPMN-diagram.

« Last Edit: July 22, 2016, 07:00:11 pm by Viking »

PeterHeintz

  • EA User
  • **
  • Posts: 691
  • Karma: +42/-16
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #19 on: July 22, 2016, 07:12:35 pm »
From my understanding the solution is what I mentioned above (“Advanced/Instance Classifier“).
A swimlane is a swimlane and not your component, in the same way as swimlane 4 is not Mark Spitz just because Mark swims on lane 4. Lane 4 is the lane of Mark and you express that by classifying your lane with your ApplicationComponent.
Best regards,

Peter Heintz

Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #20 on: July 22, 2016, 08:40:13 pm »
I am sorry. I do not understand this.

I just want that something (here an Application) is shown by the application-"picture" in one diagram (e.g. stereotyped by Archimate) and as a Swimlane in a another diagram (e.g. stereotyped by BPMN).

I think I'm having the same problem as the thread-opener
« Last Edit: July 22, 2016, 10:05:17 pm by Viking »

PeterHeintz

  • EA User
  • **
  • Posts: 691
  • Karma: +42/-16
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #21 on: July 22, 2016, 09:05:38 pm »
Again a component is a component and a swimlane is a swimlane!

You have two options:
1. Using a swimlane and classifying it by your component
2. Or make a component look like a swimlane by shape scripts

The first one is simple but the second need considerable EA knowledge to achieve that.
If you belief you need the second one, you have to go that maybe bloody shape script way.

I would choose the first option, just because for me it is weird to model a swimmer as a swimlane.
Keep in mind that you are modelling and not drawing (at least you should do when using EA).


Best regards,

Peter Heintz

Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #22 on: July 22, 2016, 09:27:20 pm »
1. Using a swimlane and classifying it by your component
Could you explain this, please?

Keep in mind that you are modelling and not drawing (at least you should do when using EA).
Yes. I just need this changed representation for modelling. not drawing. That's why I do not want to use an ArchiMate-icon in a BPMN-diagram.

Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #23 on: July 22, 2016, 09:28:14 pm »
At least I got the script running (and undestood why)  :)

Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #24 on: July 22, 2016, 09:54:12 pm »
A swimlane is a swimlane and not your component.
I am not sure if there is a misunderstanding. The swimlane is used to represent an application. That was decided by somebody else. I think a pool would be better.

Maybe it is also better to change my request, because I need this technique also to show ArchiMate Process Steps in one diagram and the same steps as BPMN-Activities in another diagram.

No, classifying is not what I am looking for. The scenario is that I link elements to different diagrams and they are displayed in different ways (according to the notation), so as ArchiMate Process Step[/b] in an ArchiMate diagram and the same step as BPMN-Activity in a BPMN-diagram.
« Last Edit: July 22, 2016, 10:22:23 pm by Viking »

PeterHeintz

  • EA User
  • **
  • Posts: 691
  • Karma: +42/-16
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #25 on: July 22, 2016, 10:53:45 pm »
Well, in UML spec. and BPMN spec. it is written what swimlanes are intended for, what capabilities those have and what those look like.

As any element swimlanes have a defined meta-model to store all what is needed to provide the defined capabilities. Swimlanes are intended to partition activity nodes represented as something that looks similar to a swim lane in a pool, but it is a modeling element of it’s one.

If you use the swimlane for something else you do drawing, or at lease introduce you own semantics of that element by introducing a swimlane shape.

So if you use a swimlane according what it is intended for, you cannot say a component is a swimlane. What you can say is, "a component relates somehow to a swimlane". In EA you can do that with a classifier (I assume even not UML, BPMN compliant).

Modelling means both, model (more what you see in the Project Browser) and diagram.
The model should be consistent and the diagram understandable for humans.

So if you use an ArchiMate component and make it look like a BPMN swimlane in a BPMN diagram it might be better understandable for the humans but it is not BPMN. Showing an ArchiMate component in a BPMN diagram, is just not BPMN as well, but maybe as well understandable for the humans looking on the diagram.

The things might change a bit in cases where something in ArchiMate has the same basis (base class) as e.g. in BPMN because they having the same basis. However to achieve that those things change shape, you need to write shape scripts, this is not provided by EA out of the box.
Best regards,

Peter Heintz

Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #26 on: July 22, 2016, 11:11:08 pm »
Dear Peter,

I totally agree. Propably you understand / accept my concern better with Archimate Process Steps and BPMN Activities.

V

PeterHeintz

  • EA User
  • **
  • Posts: 691
  • Karma: +42/-16
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #27 on: July 22, 2016, 11:31:44 pm »
Yes! But you have to go the bloody shape script way anyway.
Best regards,

Peter Heintz

Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #28 on: July 25, 2016, 11:44:24 pm »
Yes! But you have to go the bloody shape script way anyway.
Understood. I thought that I can reuse existing shapes and not to reimplement them. Thank you very much.

PeterHeintz

  • EA User
  • **
  • Posts: 691
  • Karma: +42/-16
    • View Profile
Re: Same object with different stereotypes in different diagrams
« Reply #29 on: July 25, 2016, 11:52:42 pm »
Maybe you can ask Sparx to get them.
Best regards,

Peter Heintz