Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: RIL on January 19, 2013, 08:29:59 pm

Title: Term: Tool-sets of TaggedValues: How & What te
Post by: RIL on January 19, 2013, 08:29:59 pm
Hi all EA experts,

Coming from Rational Rose I'm trying to learn some new EA terms (I'm reading the ea docs but I haven't read through all of it yet), I would like to make a "set of tools" consisting of different sets of Tagged Values, even following a naming convention with a prefix for each TV. Like so "ToolName.TaggedValueName=Value".

My questions:
Regards,
// Rolf Lampa
Title: Re: Term: Tool-sets of TaggedValues: How & What te
Post by: qwerty on January 19, 2013, 11:28:08 pm
I don't understand your questions completely and my last touch with RR is a Millennium ago. But your 3rd assumption is correct. A MDG profile allows to connect tagged values with elements thus creating your own special elements. I haven't looked into this (http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1358521680) but it might help you.

q.
Title: Re: Term: Tool-sets of TaggedValues: How & Wha
Post by: RIL on January 20, 2013, 12:45:27 am
Hi qwerty

Yes, the tutorials for the TigerTeam TrimmWS will most definitely help me. I read through the first of them last night and I will most certainly read the other two also! :)

3. Multiple Tool Sets - As for the TV tool-sets, in Rose they are grouped into different sets and listed in the properties dialog,  one set of TV options per model element (Class, Attribute, ect). Like so:

(http://img18.imageshack.us/img18/8821/rosetvtoolsoptions.jpg)

2. Predefined Tagged Values - As shown on the pictures, one doesn't have to type in a TV name, only set the values for the TVs in the list.  The TVs also has default values, and in some cases, value lists to chose from, otherwise free text (my question 2). For example Booleans have a drop down list for chosing between False and True, like so:

(http://img72.imageshack.us/img72/967/rosetvtools.jpg)

Well, the above is what I also would like to achieve in EA.

Btw, what is the main difference between a Profile  and a MDG Technology? Can Profiles be exported and then used in other models as well, or does that take a MDG Technology?

I haven't read through all the code in your tutorials, but is it possible to make MDG technologies using Delphi? (I have D7 -- XE2).

Besides, there really should be "MDG Technology Templates" (projects) shipped for different programming langues (like for Delphi), ready for copying, compiling, (test)run and then refining until desired purpose is reached... :)

Regards,

// Rolf Lampa

(Rose98 on the pictures, btw...)
Title: Re: Term: Tool-sets of TaggedValues: How & What te
Post by: qwerty on January 21, 2013, 02:26:54 am
Rolf,
unfortunately you can't achieve with EA what is called Mutliple Tool Set in RR. I see that would be a nice feature (still I think that Sparx should "lend" some features from competitor's products). You can only combine single elements with  a set of TVs. So you would need to stereotype attributes as well (with the same stereotype as that of the class?) to assign TVs automatically. In contrast to RR you could add those attributes to any element. But as said: MTS is not possible.

Pre-defined TV are possible. You can assign lists (also possible to choose from stereotyped elements defined in the model, bool, int, string etc.) and each value can have a default. Read the tagged value section in the help. It's quite informative.

Difference between MDG and simple profile: the MDG allows to include a number of fancy things like automation code. You can define a MDG model and export a MDG profile which can be used by other modelers. Unfortunately you can not reverse a MDG so you get a model. It's likely due to confidentiality reasons.

BTW: It's not me but another smart guy who's published the MDG tutorials. I also had published a very simple one here (http://community.sparxsystems.com/tutorials/extensibility/intro-creating-mdg-file) and here (http://community.sparxsystems.com/resources/mdg-technologies/improved-mdg-creation).

q.
Title: Re: Term: Tool-sets of TaggedValues: How & Wha
Post by: RIL on January 21, 2013, 11:42:13 am
Thank you very much for this info! It was very much informative! I will read your articles on MDGs carefully.

I will also try to uniquely stereotype a set of TVs to match with likewise stereotyped Class / Attribute / Operations etc respectively. That sounds like a good try.

For this purpose I imagine it would make sense to use two part dot-delimited stereotype name convention as to hint about both its (pseudo) "tool set" and its specialized purpose for specific model elements, like so: "<<tool.elementtype>>").

For the Bold models I would for example then define the following stereotypes:

<<bold.package>>
<<bold.class>>
<<bold.attribute>>
<<bold.operation>>
<<bold.constraint>>
<<bold.tv>>

If I understood you right, the differently stereotyped TaggedValues (stereotyped with the variants above), would then be able to appear as "grouped" (like sets) in their corresponding model element property dialogs, that is, if using likewise stereotyped Class, Attribute and Operation etc elements.

If so then it would be possible to create specialized models for the Bold platform and the corresponding specialized Delphi CodeGen templates which would pick up and make use of these TVs.  

// Rolf Lampa
Title: Re: Term: Tool-sets of TaggedValues: How & What te
Post by: KP on January 21, 2013, 12:02:31 pm
EA does provide a means of grouping tagged values. The BPMN 2 technology is an example of how this works: create a BPMN 2 Activity element (for example) and see how its tagged values are grouped in the Tagged Values window. The help page "Define Tag Groupings" describes how to achieve this.
Title: Re: Term: Tool-sets of TaggedValues: How & Wha
Post by: RIL on January 21, 2013, 12:35:55 pm
Quote
EA does provide a means of grouping tagged values.

Wow, that sounds really promising!

Q: Just to ensure that I can reach my end goal - Will these TVs also show up in the CodeGen templates using the macro for retrieving the "regular" TaggedValues?  (I already succeded generating code with a bunch of regular TVs in a specialized CodeGen Template, and that works very well, but will custom TVs also work?).

Btw, the help file perhaps would benefit from an update on this because I had a hard time finding the page even if I (now) knew the title. Had to make a free text search to find it... :)

Regards,
// Rolf Lampa
Title: Re: Term: Tool-sets of TaggedValues: How & Wha
Post by: KP on January 21, 2013, 01:35:32 pm
Quote
Q: Just to ensure that I can reach my end goal - Will these TVs also show up in the CodeGen templates using the macro for retrieving the "regular" TaggedValues?  (I already succeded generating code with a bunch of regular TVs in a specialized CodeGen Template, and that works very well, but will custom TVs also work?).
I know nothing of CodeGen templates but I'm pretty sure that as long as you ask for "tagname" not "groupname.tagname" then you'll be fine.
Title: Re: Term: Tool-sets of TaggedValues: How & Wha
Post by: RIL on January 24, 2013, 01:50:31 pm
Hi all again,

I don't seem to get the Tagge Value Stes to work. What I have done in order to make a TaggedValue Set is that I have created:


1. The TVs don't show up.
2. The _metaTags are visible in the TV inspector, which they shouldn't be.
[/list]
Finally; the global TV types DO show up in the TV inspector if I add the TV names as individual attributes to the stereotyped class in the Profile. But then no default values show up.

I also followed the first page of the instruction "how-to-develop-mdgs-for-enterprise... (http://www.tigerteam.dk/2011/how-to-develop-mdgs-for-enterprise-architect-part-1/), that is, the Profile part.

I tried with both Ea9.3 and Ea10, but no go. So what am I doing wrong? (or rather, am I doing anything right?...).

Nor does the code language setting propagate via this sterotype.

The things that do work are; the stereotype setting defaults to the correct <<bold.class>>. and the newly instantiated class name also defaults to the name specified using the "_metatype : String = bold.class" attribute on the stereotype "bold.class". And customized bg-color for the new class. So the Profile basically works, and I can detect changes, but no TV's listed.

(I can access the global TV types from anywhere, also when making the Profile, and I can add them manually one by one both in the Profile and directly on the end class, but no group listings show up).

I also save the Profile Package, not the Diagram (no difference). I've also tried to give more visibility to the meta tags than shown on the screenshots (public) but that doesn't help either.

All the TVs in Fig 1 should be listed in Fig 3 but the final list only shows the first three meta tags as shown in Fig 3.

Regards,
// Rolf Lampa


Fig. 1.
(http://img404.imageshack.us/img404/3655/scr0720130124032528.jpg)

Fig 2.
(http://img171.imageshack.us/img171/6582/scr0820130124032820.jpg)

Fig 3.
(http://img837.imageshack.us/img837/4840/scr0920130124042103.jpg)


Title: Re: Term: Tool-sets of TaggedValues: How & What te
Post by: Eve on January 25, 2013, 08:31:04 am
They need to be specified on the metaclass, not the stereotype.
Title: Re: Term: Tool-sets of TaggedValues: How & What te
Post by: RIL on January 25, 2013, 08:52:23 pm
Quote
They need to be specified on the metaclass, not the stereotype.
Hm, no better result when I moved them.

Is this supposed to work also in EA 9.3 or only in EA 10?

// Rolf Lampa
Title: Re: Term: Tool-sets of TaggedValues: How & What te
Post by: RIL on January 26, 2013, 07:53:53 am
Ok, now I got the (global) TaggedValues to show up as expected. With their respective enums and default values.

But the CodeGen language doesn't propagate. Is there a special attribute also for that?
Title: Re: Term: Tool-sets of TaggedValues: How & Wha
Post by: RIL on January 27, 2013, 03:04:12 am
Too bad that Code Template export & import is broken in EA10. Back to 9.3 while waiting for a fixed release.

Two questions:

1. Can I define somehow what type of attributes (i.e. what stereotype) to add when pressing "New" in the std attribute dialog?

2. The TVs for the classes now do "group" themselves as expected (using _tagGroupings), but the TVs for the attributes does not group although they are defined in exactly the same way. Does anyone have a clue what could be the reason for the difference? See images below.

// Rolf Lampa

Fig. 1 Class TVs:

(http://img22.imageshack.us/img22/6781/classtvs.jpg)

Fig. 2 Attribute TVs:

(http://img854.imageshack.us/img854/2694/attributetvs.jpg)

Fig 3. The Profile with stereotypes:

(http://img6.imageshack.us/img6/5009/screenhunter10jan261707.jpg)
Title: Re: Term: Tool-sets of TaggedValues: How & What te
Post by: Eve on January 29, 2013, 08:47:36 am
Grouping of tags is only available for elements, not attributes.