Author Topic: Multiple toolboxes per diagram profile  (Read 13869 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Multiple toolboxes per diagram profile
« on: November 10, 2015, 11:28:34 am »
We are creating a unified modelling environment.  We are also looking at role based toolboxes.  It doesn't seem to be possible to say that more than one toolbox could be associated with a diagram.  Is that correct?

For example, we have an Enterprise Architect toolbox and a Solution Architect toolbox.  If we make sure both toolboxes have the appropriate pages, can we say (for example) the application layer diagram can be used from either the Enterprise or Solution Architect toolbox.
This would allow us to make the role based tool box permanently visible for the appropriate role and as the application layer diagram was selected, the toolbox would not change for the user.

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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8052
  • Karma: +118/-20
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #1 on: November 10, 2015, 01:45:43 pm »
The easiest solution is for users to 'pin' the relevant page to the toolbox.

If that was too hard for your users, a separate technology with a toolbox page marked as common should do the job.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #2 on: November 10, 2015, 03:03:27 pm »
Quote
The easiest solution is for users to 'pin' the relevant page to the toolbox.

If that was too hard for your users, a separate technology with a toolbox page marked as common should do the job.
Thanks Simon,

Can you elaborate on the "separate technology" solution?  If I understand what you are suggesting, I might have TechComplete MDG where ALL the toolbox elements are defined.  Separate TechEnterprise and TechSolution MDGs where the toolboxes are created using the TechComplete Items and the diagrams are defined in terms of the stereotype (for example "Business") in both but referencing the appropriate toolbox.
Then, depending on which MDG is active, bringing up a "Business" stereotyped diagram will bring up the appropriate toolbox for the appropriate role.

Did I get it?

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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8052
  • Karma: +118/-20
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #3 on: November 10, 2015, 03:47:52 pm »
My thought for the technologies was simpler.

One technology that defines the stereotypes and base toolboxes.

Additional technologies can then be defined for each role that define additional common toolbox pages that are available regardless of what diagram is open.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #4 on: November 10, 2015, 05:27:35 pm »
Quote
My thought for the technologies was simpler.

One technology that defines the stereotypes and base toolboxes.

Additional technologies can then be defined for each role that define additional common toolbox pages that are available regardless of what diagram is open.
I think in my situation, the "same" (named)  toolbox pages for the different roles are not common - that is, they hold different item sets.  (NOTE: don;t get hung up on the similarity between Enterprise and Solution Architects - for our purposes here, they are just names.)  The important thing is that each diagram can be managed by more than one toolbox.

In this circumstance would my scenario, above, work?

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

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #5 on: November 10, 2015, 07:59:19 pm »
Hi Paolo,


I don't think what you're after is possible without constructing an Add-In.

First off, let's straighten out a couple of things.

The link is from the diagram type to the toolbox -- not the other way around. Several diagram types can utilize the same toolbox, but a diagram type can only specify one toolbox. So your surmise in the OP is correct.

When EA opens a diagram, it checks the type and uses that to look up which toolbox to open. The type consists of two parts, the base type (UML diagrams, plus a few additional EA-specific ones) and the customized type [my term].

The customized type is on the form MyMdgTech::MyDiagramType -- in other words, two different MDG Technologies can contain diagram definitions with the same name without any conflict, since EA always uses the fully-qualified name internally.

The only thing you can use to control which toolbox gets opened is the diagram type. You can't get EA to sometimes open one toolbox and sometimes another for the same diagram type.

Pinning toolboxes means they remain for all diagram types. You'd have to get users of each role to pin their respective toolboxes -- and if the toolbox is intended for some analysis role, why should it stay open when they open a sequence diagram?

The Common toolbox is a very special beast which is outside the regular rules. If you overrode that (don't know that you can, but if) in different ways in two MDG Technologies, that might work -- but you'd have the same relevance problem, plus two different MDG Technologies to mainpain.

I simply don't think you can implement role-based anything in MDG Technologies; it's a dimension they just don't have.

Add-Ins to the rescue.

You can create a very simple Add-In which responds to the EA_OnPostOpenDiagram event by checking the diagram's type and the user's role (which you can ascertain from the API by combining Repository.GetCurrentLoginUser(), Repository.GetAuthor() and Repository.ProjectRoles), and then calling Repository.ActivateToolbox().

Unless you get really fancy, this solution means the (three-way) association between a role, a diagram type and a toolbox gets hard-coded. Or you could write it into the description field of the roles if you like, depending on how tightly you intend to lock down your environment (if anyone can change it, they will -- especially if they're architects).

Either way, this approach should work. Mind you, I haven't tested it and it does become a race between EA and you in terms of opening the toolbox. It's a matter of who gets in last.

Cheers,


/Uffe
My theories are always correct, just apply them to the right reality.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #6 on: November 11, 2015, 07:47:30 am »
Why not take a low-fi approach and start with toolboxes collapsed.  Let the architect open the ones they need.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #7 on: November 11, 2015, 09:15:07 am »
Or you could make available two different versions of the same technology (same technology name, same UML profile, same diagram profile, different toolbox profiles). Sounds like a maintenance nightmare (and it probably is), but really all you would need is two separate .MTS files which differ in contents by the name of the toolbox profile file to be included, and the folder to which the technology file gets written. Enterprise Architects will add one folder to their technology path; Solution Architects will add the other folder. As long as nobody adds both folders...
« Last Edit: November 11, 2015, 09:47:04 am by KP »
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #8 on: November 11, 2015, 10:58:25 am »
Thanks Uffe,

I'd forgotten about the MDGDgm value in the StyleEx field...  :(

Paolo

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

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #9 on: November 11, 2015, 11:00:56 am »
Quote
Why not take a low-fi approach and start with toolboxes collapsed.  Let the architect open the ones they need.
In the past at least, when you swapped from 1 diagram to another, these settings might get reset.  Also, don't they get reset when you restart?

Also, the problem of having different sets of items in each toolbox rears its head.

I'm dealing with people who don't necessarily want to model in the first place.  Any friction is too much friction.

Paolo
« Last Edit: November 11, 2015, 11:02:22 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #10 on: November 11, 2015, 11:07:45 am »
Quote
Or you could make available two different versions of the same technology (same technology name, same UML profile, same diagram profile, different toolbox profiles). Sounds like a maintenance nightmare (and it probably is), but really all you would need is two separate .MTS files which differ in contents by the name of the toolbox profile file to be included, and the folder to which the technology file gets written. Enterprise Architects will add one folder to their technology path; Solution Architects will add the other folder. As long as nobody adds both folders...
Actually, the files could be in the same folder - so long as they have different file names - couldn't they?.  The internals could be identical or different - where required as you indicate.

May not be such a problem since the changes can be limited to a small area.

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: Multiple toolboxes per diagram profile
« Reply #11 on: November 11, 2015, 11:20:05 am »
Quote
Quote
Or you could make available two different versions of the same technology (same technology name, same UML profile, same diagram profile, different toolbox profiles). Sounds like a maintenance nightmare (and it probably is), but really all you would need is two separate .MTS files which differ in contents by the name of the toolbox profile file to be included, and the folder to which the technology file gets written. Enterprise Architects will add one folder to their technology path; Solution Architects will add the other folder. As long as nobody adds both folders...
Actually, the files could be in the same folder - so long as they have different file names - couldn't they?.  The internals could be identical or different - where required as you indicate.

May not be such a problem since the changes can be limited to a small area.

Paolo
The published technologies have to be in different folders because at startup EA will go to each folder in the technology path and load every technology in the folder. You need to avoid loading two different versions of the same technology.
The Sparx Team
[email protected]

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #12 on: November 11, 2015, 07:29:24 pm »
Quote
Quote
Quote
Or you could make available two different versions of the same technology (same technology name, same UML profile, same diagram profile, different toolbox profiles). Sounds like a maintenance nightmare (and it probably is), but really all you would need is two separate .MTS files which differ in contents by the name of the toolbox profile file to be included, and the folder to which the technology file gets written. Enterprise Architects will add one folder to their technology path; Solution Architects will add the other folder. As long as nobody adds both folders...
Actually, the files could be in the same folder - so long as they have different file names - couldn't they?.  The internals could be identical or different - where required as you indicate.

May not be such a problem since the changes can be limited to a small area.

Paolo
The published technologies have to be in different folders because at startup EA will go to each folder in the technology path and load every technology in the folder. You need to avoid loading two different versions of the same technology.
Yes, but - although each MDG Technology EA discovers is enabled by default, you can disable them and EA will remember for future sessions -- right?

Either way, this approach makes it a deployment problem and there are ways around. If you repackage EA you can set (some of) your own registry values, and you can decide which MDG Technologies get installed to the EA program directory.

You should also note that EA warns the user (in the System Output window) if it detects the same profile in two different MDG Technologies, which in this case would be an excellent indicator that the setup is wrong.

/Uffe

[size=8]Grumble mumble my solution's still better mumble grunt.[/size]
My theories are always correct, just apply them to the right reality.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #13 on: November 12, 2015, 10:40:06 am »
Thanks KP & Uffe,

An example of the Einsteinian dictum: "Keep things as simple as possible, but no simpler".  It's more complicated than expected, but still doable I think...

I'll have a play when i get some bandwidth and let you know how it goes.

I seem to be able to cross-reference MDGs (for example, MDG2 uses a stereotype definition from MDG1 and can place it on its Toolbox, also it can use it in its (MDG2) QuickLinker.  Is that by design or EAUI in our favour?  It seems to be very useful and I'd like to know if I can rely on it.

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

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Multiple toolboxes per diagram profile
« Reply #14 on: November 12, 2015, 11:58:18 am »
Quote
I'm dealing with people who don't necessarily want to model in the first place.  Any friction is too much friction.

The best thing then is to make some standard patterns and include them in your toolkit.  It's always payed off for me.