Book a Demo

Author Topic: Can I create stereotypes in Toolbox that DON'T create items?  (Read 5023 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Can I create stereotypes in Toolbox that DON'T create items?
« on: February 20, 2020, 06:18:05 pm »
Following advice from (Sparxian) Eve, I'm playing with having multiple stereotypes against an item.  Previously, we had a rule one metatype = one stereotype.  I'm testing out the concept that there is still one stereotype to define/identify the metatype, but there are supplemental stereotypes to "enhance" metatype with additional information.

I have placed the supplemental stereotype in a toolbox page so I can take advantage of the "Synchronize Stereotype" functionality (especially during development).  However, if I'm not careful with my "clicking" I can accidentally create an object on a diagram (and hence browser) which I then have to purge from the repository.  Is there any way to designate the stereotype in the MDG so as NOT to allow it to create an object?  That is, to be, truly, supplemental to the metatype stereotypes.

TIA,
Paolo
« Last Edit: February 26, 2020, 04:15:10 pm by Paolo F Cantoni »
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: +397/-301
  • I'm no guru at all
    • View Profile
Re: Can I create stereotypes in Toolbox that DON'T create items in Browser?
« Reply #1 on: February 26, 2020, 10:05:18 am »
Try to extend something that does not exist. I guess in any case you end up in some strange hack.

q.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Can I create stereotypes in Toolbox that DON'T create items in Browser?
« Reply #2 on: February 26, 2020, 02:48:26 pm »
Quote
Following advice from (Sparxian) Eve, I'm playing with having multiple stereotypes against an item.  Previously, we had a rule one metatype = one stereotype.  I'm testing out the concept that there is still one stereotype to define/identify the metatype, but there are supplemental stereotypes to "enhance" metatype with additional information.

I have placed the supplemental stereotype in a toolbox page so I can take advantage of the "Synchronize Stereotype" functionality (especially during development).  However, if I'm not careful with my "clicking" I can accidentally create an object on a diagram (and hence browser) which I then have to purge from the repository.  Is there any way to designate the stereotype in the MDG so as NOT to allow it to create an object?  That is, to be, truly, supplemental to the metatype stereotypes.
Don't understand what that blurb above is all about. Totally confused what all that is about even after reading it several times.

However to answer the question "Can I create stereotypes in Toolbox that DON'T create items in Browser?"
Yes, if you extend a boundary object and stereotype it then it won't appear in the browser when you add it to a diagram.
Happy to help
:)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Can I create stereotypes in Toolbox that DON'T create items?
« Reply #3 on: February 26, 2020, 04:14:53 pm »
Quote
Following advice from (Sparxian) Eve, I'm playing with having multiple stereotypes against an item.  Previously, we had a rule one metatype = one stereotype.  I'm testing out the concept that there is still one stereotype to define/identify the metatype, but there are supplemental stereotypes to "enhance" metatype with additional information.

I have placed the supplemental stereotype in a toolbox page so I can take advantage of the "Synchronize Stereotype" functionality (especially during development).  However, if I'm not careful with my "clicking" I can accidentally create an object on a diagram (and hence browser) which I then have to purge from the repository.  Is there any way to designate the stereotype in the MDG so as NOT to allow it to create an object?  That is, to be, truly, supplemental to the metatype stereotypes.
Don't understand what that blurb above is all about. Totally confused what all that is about even after reading it several times.

However to answer the question "Can I create stereotypes in Toolbox that DON'T create items in the Browser?"
Yes, if you extend a boundary object and stereotype it then it won't appear in the browser when you add it to a diagram.
Hi Sunshine,
Sorry to confuse, and your answer has helped clarify what I'm after.

I don't want the supplemental stereotypes to create an object at all! (I'll amend the Thread title)  Boundary objects exist in the repository but aren't visible in the browser.  So that won't help me - in fact, it would make things worse as I wouldn't be able to find the miscreants via the browser and purge them!

Supplemental stereotypes in this concept are NOT supposed to create a metatype, merely enhance an existing one.  Consequently, I can drag it onto an existing metatype object, but I don't want it to create an object itself if I accidentally release it on a blank space on the diagram.

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

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Can I create stereotypes in Toolbox that DON'T create items?
« Reply #4 on: February 27, 2020, 09:18:04 am »
Ah I think I know what you mean now. Lets see if I can articulate it with an example.
Lets say you create an ArchiMate business actor and want to further classify it as "Organisation Unit" using an additional stereotype. Rather than open the stereotype dialog and select the additional stereotype "Organisation Unit" you want to drag that stereotype from a toolbox onto the actor and set the stereotypes as "Archimate::Business Actor" and "Organisation Unit". Is that an what you are after?
Happy to help
:)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Can I create stereotypes in Toolbox that DON'T create items?
« Reply #5 on: February 27, 2020, 10:01:45 am »
Ah, I think I know what you mean now. Let's see if I can articulate it with an example.
Let's say you create an ArchiMate business actor and want to further classify it as "Organisation Unit" using an additional stereotype. Rather than open the stereotype dialog and select the additional stereotype "Organisation Unit" you want to drag that stereotype from a toolbox onto the actor and set the stereotypes as "Archimate::Business Actor" and "Organisation Unit". Is that an what you are after?
Spot on!

And it already works!

But, HOW to stop Organisation UNit getting created if I accidentally drag it onto the empty part of the diagram!

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: +55/-3
    • View Profile
Re: Can I create stereotypes in Toolbox that DON'T create items?
« Reply #6 on: February 27, 2020, 10:14:07 am »
But, HOW to stop Organisation UNit getting created if I accidentally drag it onto the empty part of the diagram!


There is no way to declare stereotypes as secondary only. I don't remember if you are running an add-in, but if you are you can block the creation of elements in EA_OnPreNewDiagramObject(). Otherwise, you would need to delete them in your tidy up script.
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Can I create stereotypes in Toolbox that DON'T create items?
« Reply #7 on: February 27, 2020, 10:28:04 am »
But, HOW to stop Organisation Unit getting created if I accidentally drag it onto the empty part of the diagram!
There is no way to declare stereotypes as secondary only. I don't remember if you are running an add-in, but if you are you can block the creation of elements in EA_OnPreNewDiagramObject(). Otherwise, you would need to delete them in your tidy up script.
Thanks, Neil,

This was the expected result but in recent times I've posted questions for which I already had an expected result and was pleasantly surprised by actual (and thus, for me, unexpected) solutions.  So the moral is "Ask away", you never know!

Paolo

PS: To me, the idea of supplemental stereotypes (that can't create items) sounds neat!  Is it worth a feature request?
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: +55/-3
    • View Profile
Re: Can I create stereotypes in Toolbox that DON'T create items?
« Reply #8 on: February 27, 2020, 10:33:44 am »
PS: To me, the idea of supplemental stereotypes (that can't create items) sounds neat!  Is it worth a feature request?


I don't remember ever needing them in any of our technologies, but it feels like they could be useful, so yes!
The Sparx Team
[email protected]

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Can I create stereotypes in Toolbox that DON'T create items?
« Reply #9 on: February 28, 2020, 10:39:25 am »
Quote
Spot on!
Now I understand the problem better and see more posts since I last looked, here are a couple of thoughts.

a) If using V15.1 you could look at intercepting the event of creating an element with JavaScript Add-in and not create an element if its its a secondary stereotype. Not sure if its possible but worth looking into.

b) Consider holding the secondary stereotype as a drop down list tagged value but that might kind of change the way you use it unless you can set the tagged value via drag and drop mechanism you employ.

We use tag values to further refine the ArchiMate Stereotypes. I must admit I hadn't thought of doing it the same thing your way via dragging stereotypes onto the element in the diagram. Quite ingenious.

Happy to help
:)