Book a Demo

Author Topic: Tagged Values in a Profile  (Read 9239 times)

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Tagged Values in a Profile
« on: November 27, 2012, 05:30:50 am »
Hi,

Anyone aware of any bugs/issues with tagged values in umlprofiles ? Try as i might i can't get a tagged value of type DataTime to work via a umlprofile xml (see snippet below). The tagged value appears against the "Project" class, but it's just freetext...


<Stereotype name="Project" metatype="Project" notes="" cx="90" cy="70" strictness="profile">
<AppliesTo>                        
<Apply type="Class">
  <Property name="_Tag" value="1"/>
</Apply>
</AppliesTo>
<TaggedValues>
<Tag name="dateRequested" type="DateTime" description="Date of request" unit="" values="" default=""/>
</TaggedValues>
</Stereotype>

If i create the tagged value in sparx (adding Type=DateTime into the tagged value diagloue) all is ok ?

Appreciate any help/pointers as i've wasted a day on this now.


Regards,


Jon.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Tagged Values in a Profile
« Reply #1 on: November 27, 2012, 09:50:57 am »
1. Go to Settings > UML Types > Tagged Value Types and create a tagged value type named "dateRequested" with detail "Type=DateTime;".
2. In your profile, give the "Project" stereotype class an attribute named "dateRequested".
3. Save your profile.
4. Create an MDG Technology. Include your profile and under "Tagged Value Types" include your "dateRequested" tagged value type.
5. Deploy and use your technology...
The Sparx Team
[email protected]

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Tagged Values in a Profile
« Reply #2 on: November 27, 2012, 11:58:37 pm »
This doesn't help. The MDG will only work against the repository that i manually create via Sparx UML Types > Tagged Value Types screen the tagged value (dateRequested). If i deploy the MDG to another repository, using Settings > MDG Technologies dataRequested will not be defined as a type.

There appear to be two solutions, i add a  TaggedValueTypes section to a specific umlprofile or i add a TaggedValueTypes section with RefData, DataSet and a DataRow entry to the main MDG.

The issue is that neither approach appears to be working for me. Something has screwed up but i can't spot what ! Frankly the way in which things have screwed up leads me to beleive that something is a bit flaky in the whole MDG / UML Profile code within Sparx.

Is there a way to generate a debug log when importing an MDG file ? So i can get to the bottom if this ?

Regards,

Jon.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Tagged Values in a Profile
« Reply #3 on: November 28, 2012, 08:49:14 am »
Quote
This doesn't help. The MDG will only work against the repository that i manually create via Sparx UML Types > Tagged Value Types screen the tagged value (dateRequested). If i deploy the MDG to another repository, using Settings > MDG Technologies dataRequested will not be defined as a type.
True, the tagged value type won't appear in the Settings > UML Types > Tagged Value Types table, but if you create a stereotyped element which has the tagged value, does the tagged value work? This works for the BPMN technologies (for example) and not just in the repository that we created the BPMN tagged value types in.
The Sparx Team
[email protected]

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Tagged Values in a Profile
« Reply #4 on: November 28, 2012, 10:58:13 pm »
Well this is the strange thing - for some of the tagged value types i have defined in the mdg it works for others it doesn't - and im positive i've not made a mistake in their definition. Something is up !

Consider this as well from the bpmn 2 mdg entry against an activity:

<Tag name="taskPriority" type="int" description="" unit="" values="" default=""/>

Try creating an activity and entering a taskPriority - i can put any value in; should just be an integer. Where Sparx have explicitly created a tagged value type in the bpmn 2 mdg file for integers eg :

<DataRow>
          <Column name="Property" value="completionQuantity"/>
          <Column name="Description" value="for Element Activity"/>
          <Column name="Notes" value="Type=Integer;BaseStereotype=Activity;"/>
        </DataRow>

It works as expected. If i however try and create a tagged value type of integer and use it - it deson't work. I have to apply your hack and create the tagged value in Sparx itself. Which means that my mdg is not portable....again not sure whats going on, but something is up...

Appreciate any help or further suggestions,

Jon.

adama

  • EA User
  • **
  • Posts: 62
  • Karma: +0/-0
    • View Profile
Re: Tagged Values in a Profile
« Reply #5 on: January 27, 2017, 11:11:28 pm »
Was this issue ever resolved? Tagged values (aka properties) are vital to my solution. This method of defining properties is extremely labor intensive and risky. There should be an easy way to create object properties on the fly, and have them apply to instances.

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Tagged Values in a Profile
« Reply #6 on: January 27, 2017, 11:46:27 pm »
When creating an MDG and using the MDG helpers you are prompted for and MDG ID, this is used to name your profile packages

This MGD ID must be the same as the ID used in the ID in the MDG Generation wizard, it also must be less than or equal to 12 chars and ideally contain no spaces.

Then all should be OK

Phil
Models are great!
Correct models are even greater!