Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Geert Bellekens on May 09, 2016, 05:03:00 pm

Title: Hidden Toolbox mechanism for different TV values?
Post by: Geert Bellekens on May 09, 2016, 05:03:00 pm
When dragging an Action onto an Activity Diagram, or a BPMN Activity onto a Business Process Diagram I get a little menu that allows me to select the type of Action/Activity.

The result of my choice is an element with the same stereotype, but with values for the tagged values.

I would like to replicate that for my own profile, but I don't know how. With the hidden toolbox feature I can do that for different stereotypes, but not for differences in the tagged values.

Does anyone know the secret recipe to do that?

Thanks

Geert
Title: Re: Hidden Toolbox mechanism for different TV values?
Post by: Paolo F Cantoni on May 09, 2016, 05:08:38 pm
I don't, so far...  I was looking at that myself.

Being able to (effectively) defined multiple metatypes mapping to the same stereotype would be a VERY USEFUL thing.  I can conceive how one might do it declaratively with only a slight modification to the MDG technology.

Paolo
Title: Re: Hidden Toolbox mechanism for different TV values?
Post by: Geert Bellekens on May 09, 2016, 05:18:23 pm
I'll ask Sparx Support directly as well.

Report back when I know more.

Geert
Title: Re: Hidden Toolbox mechanism for different TV values?
Post by: Eve on May 10, 2016, 08:37:13 am
I think what you want is _subtypeProperty.

See http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/supportedattributes_2.html (http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/supportedattributes_2.html)

Quote
Specifies the fully qualified name of the Tagged Value that is used to generate a popup submenu each time an element with the stereotype is created from the Toolbox.
The Tagged Value is an enumeration and the submenu consists of a command for each enumeration literal. The Tagged Value is initialized with whichever command is selected on the submenu; if none is selected (such as if the user clicks off the submenu) then the default value is used as normal.
For example, if you create a BPMN 2 Activity element, a submenu displays listing the task types such as 'BusinessRule', 'Manual' and 'Receive'. Selecting one of these values sets it as the value of the taskType Tagged Value.
The Tagged Value is effectively the Activity's subtype; in the BPMN 2 profile, in the format profile::stereotype::tag, the subtypeProperty for the Activity stereotype would be:
      BPMN2.0::Activity::taskType.
Title: Re: Hidden Toolbox mechanism for different TV values?
Post by: Geert Bellekens on May 10, 2016, 01:34:10 pm
That looks like exactly what I need, but for some reason I can't get it to work.

I've emailed support my profile hoping they can spot the error.

Geert
Title: Re: Hidden Toolbox mechanism for different TV values?
Post by: Geert Bellekens on May 10, 2016, 04:14:20 pm
Hmm, according to the reply from support this feature only works for Elements, and not for connectors (although the  _subtypeProperty is available in the profile helper window).

I've asked this to be logged as a bug.

I also did not get it to work in case of stereotype inheritance, where the tagged value was on the "superstereotype", and the toolbox contains "substereotypes", but that was more as a test then a real requirement.

Geert
Title: Re: Hidden Toolbox mechanism for different TV values?
Post by: Geert Bellekens on May 12, 2016, 04:29:39 pm
New response from support:

Quote
>> Why is the property available for connectors if it doesn't work?
>> Can you submit the fact that is doesn't work as a bug for me please?

Our developers advised that this option should not be available for connectors. We will have this removed.

Not exactly the response I was hoping for, so I asked them to log a feature request on my behalf to enable this feature for connectors as well.
I still hope this will be available one day as it would be great improvement (and I really need this for one client)

Geert