Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Paolo F Cantoni on January 30, 2020, 12:32:45 am

Title: RefGuid type in old style MDG
Post by: Paolo F Cantoni on January 30, 2020, 12:32:45 am
I still don't have a new style MDG built from a model so I'm still hand-crafting our MDG.

I need to create a RefGuid Tag in the profile similar to...
Code: [Select]
<TaggedValues>
<Tag name="ActorNature" type="enumeration" description="" unit="" values="Human,Organisational,Automaton,«Unspecified»" default="Organisational"/>
</TaggedValues>
If I wanted to define a RefGuid, can some kind soul provide the value for type="<RefGuidType>" i.e. what replaces "enumeration" for such a Tag?  I tried "RefGuid", but that didn't do it.

Interestingly, if I define a RefGuid Tag in the general repository under UML Types, and reference it in the profile like...
Code: [Select]
<TaggedValues>
<Tag name="JurisdictionalLocationReference"  default="{4D8BF378-485E-442f-BDB7-AADC6AF007FB}"/>
</TaggedValues>
Everything works fine and even the default value gets correctly rendered!

TIA,
Paolo


Title: Re: RefGuid type in old style MDG
Post by: Geert Bellekens on January 30, 2020, 01:29:01 am
From the BPMN 2.0 MDG:

Code: [Select]
<TaggedValueType property="processRef" description="" notes="Type=RefGUID;Stereotypes=BusinessProcess;BaseStereotype=Activity,Participant,Pool;"/>
Geert
Title: Re: RefGuid type in old style MDG
Post by: Paolo F Cantoni on January 31, 2020, 09:22:10 am
From the BPMN 2.0 MDG:

Code: [Select]
<TaggedValueType property="processRef" description="" notes="Type=RefGUID;Stereotypes=BusinessProcess;BaseStereotype=Activity,Participant,Pool;"/>
Geert
Thanks, Geert,

I thought one of the existing MDGs had it, but I didn't know what I was looking for so I couldn't search.

So, property identifies the Tag and Stereotypes identifies what to look for in the lookup dialogue, and BaseStereotype identifies what stereotypes the Tag can be applied to?

I've got a sample to work, but only by "monkey see, monkey do" - I'm not fully understanding what I'm doing.

Paolo
Title: Re: RefGuid type in old style MDG
Post by: Geert Bellekens on January 31, 2020, 03:32:44 pm
Yes, that seem correct to me.

You should be able to find that info in the help section about setting up tagged value types.
The notes in an MDG tagged value type, or a regular tagged value type are the same.

Geert
Title: Re: RefGuid type in old style MDG
Post by: Paolo F Cantoni on January 31, 2020, 08:00:28 pm
Yes, that seem correct to me.

You should be able to find that info in the help section about setting up tagged value types.
The notes in an MDG tagged value type, or a regular tagged value type are the same.

Geert
That's what I thought. But the Help says...

Type=RefGUID;

Values=Type1,Type2;

Stereotypes=Stereotype1;

Or

Type=RefGUID;

Metatype=Type;

Used to: Reference an element from the model by specifying the element's GUID, where:

Type1 and Type2 specify one or more allowed diagram objects (such as Class, Component, attribute or operation)
Stereotype1 represents an allowed stereotype
Metatype can be used to reference Classifiers or Property types:

Metatype=Classifier; presents all Enterprise Architect-defined Classifier types to select from
Metatype=Property; presents all Ports, Parts and attributes to select from
You can set the classifier, attribute or operation for a Tagged Value of this type by clicking on the Browse. button against the Tagged Value in the Properties window.

You can also right-click on the RefGUID Tagged Value name in the Properties window and select the 'Find in Project Browser' option to locate a referenced object in the Browser window.
ype=RefGUID;

Values=Type1,Type2;

Stereotypes=Stereotype1;

Or

Type=RefGUID;

Metatype=Type;

Used to: Reference an element from the model by specifying the element's GUID, where:

Type1 and Type2 specify one or more allowed diagram objects (such as Class, Component, attribute or operation)
Stereotype1 represents an allowed stereotype
Metatype can be used to reference Classifiers or Property types:

Metatype=Classifier; presents all Enterprise Architect-defined Classifier types to select from
Metatype=Property; presents all Ports, Parts and attributes to select from
You can set the classifier, attribute or operation for a Tagged Value of this type by clicking on the Browse. button against the Tagged Value in the Properties window.

You can also right-click on the RefGUID Tagged Value name in the Properties window and select the 'Find in Project Browser' option to locate a referenced object in the Browser window.

your example, doesn't fit this syntax...  "It's a RefGUID, Jim, but not as we know it"  ;)

Paolo
Title: Re: RefGuid type in old style MDG
Post by: Geert Bellekens on January 31, 2020, 10:28:05 pm
Hmm, indeed, I see. And then again, why would it be exactly the same? That would be too easy now would it  ;)

Geert
Title: Re: RefGuid type in old style MDG
Post by: Eve on February 03, 2020, 10:11:00 am
In the first example "Values" and "Stereotypes" are a logical OR. You can include either one or both.