Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » What is the best strategy to add a Tagged Value for "Definition" to Classifiers?(Tagged values, semantic)
What is the best strategy to add a Tagged Value for "Definition" to Classifiers? [message #1711253] Wed, 14 October 2015 10:44 Go to next message
Ri Fr is currently offline Ri FrFriend
Messages: 129
Registered: July 2015
Senior Member
I would like to attach the definition (semantics) to Classifiers so I can export Classifier name, Definition etc. via Tables. I could do it via Comments, but it would be hard to differentiate between multiple comments for 1 classifier (maybe 1 comment is for Definition, another is a comment that appears on a diagram to explain the behavior, another a Comment from a different Diagram...)
I prefer not to use Stereotypes because I want to use UML original stereotypes. Does anyone have any good workaround to do this? Thanks!
Re: What is the best strategy to add a Tagged Value for "Definition" to Classifier [message #1711515 is a reply to message #1711253] Fri, 16 October 2015 15:42 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1206
Registered: July 2009
Location: Canada
Senior Member

Hi,

Comments are intended to be informational; I would not recommend
attempting to use them for the modeling of precise semantics of
anything.

This is the typical use case for stereotypes: it is why the UML has
the profile mechanism in the first place, to allow the language to be
extended for domain-specific concerns such as yours.

However, if you reject the use of a profile, you may be able to use
Constraints to restrict the specific semantics of your classifiers.
Any element can be referenced by a Constraint as a constrained element.
In your case, a Constraint with an OpaqueExpression for its
specification in which the opaque expression language identifies the
body as a "definition" in your scheme may be sufficient.

HTH,

Christian


On 2015-10-14 10:44:25 +0000, Ri Fr said:

> I would like to attach the definition (semantics) to Classifiers so I
> can export Classifier name, Definition etc. via Tables. I could do it
> via Comments, but it would be hard to differentiate between multiple
> comments for 1 classifier (maybe 1 comment is for Definition, another
> is a comment that appears on a diagram to explain the behavior, another
> a Comment from a different Diagram...)
> I prefer not to use Stereotypes because I want to use UML original
> stereotypes. Does anyone have any good workaround to do this? Thanks!
Re: What is the best strategy to add a Tagged Value for "Definition" to Classifier [message #1711563 is a reply to message #1711515] Sat, 17 October 2015 10:56 Go to previous messageGo to next message
Ri Fr is currently offline Ri FrFriend
Messages: 129
Registered: July 2015
Senior Member
Thanks for reply! Do I understand correctly that you suggest the best strategy is to create a profile where the classifiers have a property which is the semantic description (text documentation). I prefer not to change the Profile, but if that's the right way to do it I guess I will try it. Thanks!
Re: What is the best strategy to add a Tagged Value for "Definition" to Cl [message #1711570 is a reply to message #1711563] Sat, 17 October 2015 14:23 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1206
Registered: July 2009
Location: Canada
Senior Member

Hi,

Well, a stereotype is probably the first approach that I would try, but
then again I don't know much about your situation. Is the semantic
description that you refer to expressed in a reasonably formal textual
specification language? Something of the nature of OCL, ALF, or other
expression languages. If so, then a Constraint may be a perfectly
appropriate vehicle for these semantic descriptions.

Cheers,

Christian


On 2015-10-17 10:56:25 +0000, Ri Fr said:

> Thanks for reply! Do I understand correctly that you suggest the best
> strategy is to create a profile where the classifiers have a property
> which is the semantic description (text documentation). I prefer not
> to change the Profile, but if that's the right way to do it I guess I
> will try it. Thanks!
Re: What is the best strategy to add a Tagged Value for "Definition" to Cl [message #1711776 is a reply to message #1711570] Mon, 19 October 2015 15:04 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 926
Registered: February 2011
Senior Member
Hi,

Tagged Values did exist in UML 1.x, but have been removed in UML 2.x. Profiles/Stereotypes is the mechanism that replaces them, so that's probably what you need.

Camille


Camille Letavernier
Re: What is the best strategy to add a Tagged Value for "Definition" to Classifiers? [message #1712038 is a reply to message #1711253] Wed, 21 October 2015 03:57 Go to previous messageGo to next message
Ri Fr is currently offline Ri FrFriend
Messages: 129
Registered: July 2015
Senior Member
Thanks guys, I have not read on Constraints so I will study them and see if they work for me.

If that does not work I may need to create a Profile where Classifiers have a Property called "Definition" which is a plain text field... hopefully NatTables will display that property so I can export it out. Cheers.

[Updated on: Wed, 21 October 2015 03:59]

Report message to a moderator

Re: What is the best strategy to add a Tagged Value for "Definition" to Classifiers? [message #1714169 is a reply to message #1712038] Tue, 10 November 2015 12:50 Go to previous message
Ri Fr is currently offline Ri FrFriend
Messages: 129
Registered: July 2015
Senior Member
Hello and thanks for the suggestions. Agreeing that the best approach is to develop a stereotype, ad-interim I'm using the following strategy: I would be interested to know if this workaround is solid or if it could break down / not work or cause other problems long term.
I create a 'template' Classifier for each Classifier I'm interested in for example, I create a Use Case called 'UC template'. I add to it several Comments: each Comment in succession is : 1. Definition 2. Preconditions 3. Basic path etc. etc.
Then I copy/paste this template into whatever package I'm working in, as many times as I need. Then I edit each 'Template' Copy by typing in the Use Case name, and add the definition, preconditions etc. to each Comment.
Then I develop my Use Case Model.
When I want to exctract documentation, I create a generic table, destroy all table Columns except 'Name" and 'Element Owned', drag all Comments to the Table and export to Excel.
In excel I can sort by Use Case name and for each Use Case I will get my Comments back in the right order. - DONE!

Since it will be a large model, important for my work I'd like to know if any potential concerns with this workaround. When I have time I'll develop the right profiles...
Previous Topic:How to merge two *.uml models in Papyrus?
Next Topic:How to add an Artifact to an Activity Diagram
Goto Forum:
  


Current Time: Thu Jul 09 21:20:36 GMT 2020

Powered by FUDForum. Page generated in 0.02168 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top