Book a Demo

Author Topic: MDG Diagram & Toolbox Profiles  (Read 7683 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
MDG Diagram & Toolbox Profiles
« on: April 01, 2021, 04:45:35 am »
I am generating an MDG and am experiencing some trouble with Toolbox and Diagram Profiles.

Despite the fact that I have 2 toolbox profiles, when saving the package as a UML Profile only one toolbox gets exported. The Create Custom Toolbox helper creates a diagram per toolbox, as expected, but "insists" in always reusing the same ToolboxPage metaclass, somehow I was expecting a ToolboxPage metaclass per toolbox. How do I solve this problem? Do I need to create a toolbox profile package per toolbox? Do I change the name of ToolboxPage metaclass from the default value "ToolboxPage" to something else? If so to what?

Lastly, despite having the diagram and toolbox profiles correctly mapped, the toolboxes do not stick to diagram profiles.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: MDG Diagram & Toolbox Profiles
« Reply #1 on: April 01, 2021, 06:37:10 am »
It's per diagram (at least that's how I define it). I export one diagram per toolbox which then covers the various tool sub-boxes per extending ToolboxPage.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: MDG Diagram & Toolbox Profiles
« Reply #2 on: April 01, 2021, 11:04:33 am »
Do I need to create a toolbox profile package per toolbox? Do I change the name of ToolboxPage metaclass from the default value "ToolboxPage" to something else? If so to what?
Each toolbox profile contains a set of pages that are displayed together. So if you want a different set of pages then you need a different profile. The names of the profiles need to be unique but the names of the pages only have to be unique within the profile.

Lastly, despite having the diagram and toolbox profiles correctly mapped, the toolboxes do not stick to diagram profiles.
Sounds like it's not correctly mapped.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: MDG Diagram & Toolbox Profiles
« Reply #3 on: April 01, 2021, 08:58:53 pm »
Thanks Eve and qwerty. I have now organised my diagram profiles into groups. The toolboxes are available but they are still not sticking to the diagrams despite lookingcorrectly mapped.

With "sticking", I mean the following: If I use a particular diagram profile to create a new diagram, I expect the toolbox associated with the diagram profile to be used by default, it does not. Furthermore, Sparx EA seems to be randomly defaulting to either the last toolbox I used or the class toolbox (incidentally, all the tests I run so far are with diagram profiles extending class diagram).

Sounds like it's not correctly mapped.
I am relatively sure the mappings are correct, the right names appear in profile helper toolbox drop down. Of course, it is always possible that there is a Sparx quirk that escapes me.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG Diagram & Toolbox Profiles
« Reply #4 on: April 01, 2021, 09:07:05 pm »
You gotta play a bit with the names.

I remember having similar issues that got fixed after changing up the names a bit. I never really figured out what went wrong exactly though.
Specifically the name of the profile in the export profile dialog, and the name of the package or diagram.

It can also sometimes help to start over with a fresh profile. Some of these things get stored in things like the notes of the package or diagram and may mess things up.

Look at the xml files, and compare with a known working example. If you don't have a working example yourself see https://github.com/GeertBellekens/Enterprise-Architect-Toolpack/tree/master/EAJSON/Files

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: MDG Diagram & Toolbox Profiles
« Reply #5 on: April 01, 2021, 09:57:55 pm »
Thank you Geert, much appreciated. It is indeed the names.

In a nutshell the cause of the is that when a new Custom toolbox is created using the profile helper a name has to be specified - e.g., A_Toolbox, which will be used to name the diagram containing the elements for the toolbox pages. If when publishing the toolbox profile as a UML package a different name is specified - e.g., My Toolbox, Sparx cannot associate the toolbox profile to the diagram profile because the names are different.

In conclusion, the name of the diagram containing the toolbox pages needs to be same as the name given to the toolbox profile when publishing it as a UML package.

Sparx EA could be smarter about this and the hep could state this in big red bold letters.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: MDG Diagram & Toolbox Profiles
« Reply #6 on: April 06, 2021, 08:06:31 am »
I expect the toolbox associated with the diagram profile to be used by default, it does not.
There is no way to associate a diagram profile with a toolbox. Each diagram type defined by individual diagram types.

What is your 'toolbox' property assigned to for the diagram types? It should be <TechnologyName>::<ToolboxProfileName>. Depending on how you export your toolbox profiles, ToolboxProfileName will match either a package name or a diagram name.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: MDG Diagram & Toolbox Profiles
« Reply #7 on: April 19, 2021, 11:12:55 pm »
I will look into this shortly.

Depending on how you export your toolbox profiles, ToolboxProfileName will match either a package name or a diagram name.
Is there another way to export the toolbox profiles that does not involve saving the package as UML? Is there another way to export any profile that does not involve saving the package as UML?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG Diagram & Toolbox Profiles
« Reply #8 on: April 19, 2021, 11:15:49 pm »
I will look into this shortly.

Depending on how you export your toolbox profiles, ToolboxProfileName will match either a package name or a diagram name.
Is there another way to export the toolbox profiles that does not involve saving the package as UML? Is there another way to export any profile that does not involve saving the package as UML?
You can export the diagram as UML profile.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: MDG Diagram & Toolbox Profiles
« Reply #9 on: April 19, 2021, 11:57:40 pm »
Actually I wrote my own exporter. It wasn't that complicated and I can do all sorts of checking (so to verify that a defined entry is valid and will not result in a «» display). But you have to have quite a bit of background :-/

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: MDG Diagram & Toolbox Profiles
« Reply #10 on: April 21, 2021, 04:20:42 am »
What is your 'toolbox' property assigned to for the diagram types? It should be <TechnologyName>::<ToolboxProfileName>. Depending on how you export your toolbox profiles, ToolboxProfileName will match either a package name or a diagram name.
If you are referring to the corresponding <Property name="toolbox" value=##Toolbox name##/>, the value is not fully qualified. I am using the profile helper to select the toolbox profile. Are you saying that when I publish the package containing the diagram profiles as UML, the toolbox is not fully qualified? Do I have to manually edit the profiles? Or can it be done through the Sparx EA UI?

I will look into this shortly.

Depending on how you export your toolbox profiles, ToolboxProfileName will match either a package name or a diagram name.
Is there another way to export the toolbox profiles that does not involve saving the package as UML? Is there another way to export any profile that does not involve saving the package as UML?
You can export the diagram as UML profile.

Geert
Just to clarify and use proper sparxian, when I wrote the above I intended to say I always use Publish Package As UML to export all my profiles, including Toolbox and Diagram profiles.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: MDG Diagram & Toolbox Profiles
« Reply #11 on: April 23, 2021, 09:59:50 pm »
The problem with the toolboxes not sticking to the diagram profiles goes away after upgrading to version15.2.1.1559 without changing the profiles.