Book a Demo

Author Topic: Propogating tagged values...  (Read 4613 times)

NT

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Propogating tagged values...
« on: June 19, 2008, 01:17:15 am »
I have the following scenario:
In my profile, I've created tagged values on a stereotype and imported my profile into another model.

In the model, I've created a Node, assigned the stereotype to that Node and created instances of that Node.
For example, I've created a stereotype <<server>> with tagged value "OS". In my model, I've created Node 'Unix Server' and Node instances called 'server1', 'server2'...'server n'.

Now, I decide all the servers are Solaris - so I set the tagged value "OS=Solaris" on the Node 'Unix Server'.

Can I get that tagged value to propagate down to all EXISTING Node instances 'server1', 'server2'....'server n'?

I can't set a default value on the stereotypes' tagged value because I also want to create Windows Server and Linux Server Nodes.

Thanks.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Propogating tagged values...
« Reply #1 on: June 19, 2008, 02:25:43 am »
I don't know of any way to propagate a new tagged value's value to earlier nodes.

There might be a workaround though. First make a backup of your project, just in case...

Try exporting the package(s) containing your nodes to XMI. Then edit the tagged values of the appropriate nodes. Import the packages back into your model, and make sure you clear the Strip GUIDs option]/i]. Doing the import this way will replace your packages with the new content (rather than creating a copy). This should get you the results you need.

HTH, David
No, you can't have it!

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: Propogating tagged values...
« Reply #2 on: June 19, 2008, 07:39:52 am »
I believe you would need to create an add-in via the automation interface to have this done elegantly real-time (behind the scenes) for the user.

We tend not to use instances, instead each <<server>> is an element in its own right.  I see the merits of using instances of a server (eg, you can re-use / inherit make and model which does not change between instances).
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

NT

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Propogating tagged values...
« Reply #3 on: June 19, 2008, 08:01:14 am »
Thanks for the ideas gentlemen, your input is much appreciated.

My plan was to use a stereotype <<server>>, then use that on classes such as Linux/Windows/Unix, then use instance names to represent the machine names.

I'm really trying to figure out how difficult it would be to make minor changes if the number of servers were quite high (>200). I have to admit, EA is feeling just a little bit frustrating right now  :'( !





«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Propogating tagged values...
« Reply #4 on: June 19, 2008, 08:19:17 am »
I keep forgetting this trick - thanks Frank et al for reminding me so often - but perhaps there is a 'quick and dirty' way to make your adjustments retroactively.

First make a backup of your project file, until you get this right...

Export the appropriate package tree(s) to XMI. You can now edit the XMI file, which is easier than it first seems (once you get used to it).

You can then import the XMI file back into your project. If you clear the Strip GUIDs option on the import dialog your import will overwrite the pre-existing versions of packages, elements, etc.

Not particularly elegant, but for a lot of things this can work wonders.

HTH, David
No, you can't have it!

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Propogating tagged values...
« Reply #5 on: June 19, 2008, 02:56:54 pm »
I assume you are aware of the "Set Run State" on the instances - rather than the Tagged Values? This wouldn't help on changes (XMI export/import would be best) - but this is the type of thing this feature is meant for.  See the main deployment diagrams in the EaExample model.

NT

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Propogating tagged values...
« Reply #6 on: June 19, 2008, 06:04:37 pm »
Thanks.
No, I'm not aware of the 'Set Run State'. I've looked it up and am a little confused by the difference between tagged values, and instance variables.

I would prefer to use tagged values as they are a UML Extension mechanism - however, maybe they're not appropriate for IT Infrastructure modeling.

If anyone has any suggestions to help explain the difference I would be most interested.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Propogating tagged values...
« Reply #7 on: June 19, 2008, 10:01:49 pm »
Imagine an object in a running program. [Yes, I know this is not a node in your model, but the paradigm might be easier for illustration.]

This object is an instance of a class. At run time the object instance will have (some or all of) its parameters set to specific values, which would be specific to the instance.

For example, let's say that each object of this class has an ID field that tells them apart (perhaps the ID is the database key of the record where object data is persisted). The class itself simply as an ID field with a data type (let's say Integer). Each instance of the class (each object of that class type) would have its own value for that attribute. So I might have an object with ID=1, another with ID=2, and so on.

Now in model some classes might have associated tagged values. These tell us something about the class, beyond the 'basic' characteristics defined across UML. Every instance of this class shares the 'tagged' characteristic. However, the values of the tag - or even the tag itself - are not accessible to the running instance. For example, these values might provide instructions to a code generator; by the time the source code is produced the tagged values have been 'consumed' and have done their work. Or perhaps they represent some characteristic that will be 'built in' for each instance of that class. The point is that the tagged value sets one class, and all its instances, apart from another class and its instances.

Now that you've got the flavor of the two things, let's proceed.

You might have several nodes in your model. Many of them might be of the «server» type, with general characteristics as appropriate. Some of these will fall into specific groups based on common characteristics, but at a lower level than the stereotype indicates. The different lower level categories would be difficult to explain using 'basic' UML, since they could be based on values that are specific to your organization or project, and might even be relevant only to a given viewpoint. You might use tagged values to differentiate them.

However, by the time you get to a detailed deployment model you need to tell the reader which is which, and perhaps give 'hard' specifications. That's where run state generally comes in. For each specific instance of a «server» of a given category (with a specific tagged value setting) you could have property settings that provided the instance-specific values required. These might be something like server address or URI. These would be common attributes but would have different run time values for each actual (instance of) server. There's your run state.

Hopefully you can extract some meaning out of the above mass of verbiage...

David
No, you can't have it!

NT

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Propogating tagged values...
« Reply #8 on: June 20, 2008, 07:53:43 am »
Thank you.
It's an excellent description - not a 'mass of verbiage'.

May I exemplify to aid understanding?

Would it be more inline with your definition to say <<server>> has tagged value "flavour=Windows|Linux|Unix". In my organisation we usually refer to 'Linux servers' or 'Unix servers' etc.

Further, my instance variables might include: OS, CPU, RAM, NIC...etc.

I could also use the same idea to classify network devices e.g. <<switch>> has tagged value "flavour=Ethernet|Fiber" etc.

In this case instance variables would include: Vendor, DTR etc.

Thanks again.
« Last Edit: June 20, 2008, 07:54:15 am by NT »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Propogating tagged values...
« Reply #9 on: June 20, 2008, 09:11:52 am »
By George, I think he's got it!

Nice example.

[Of course these things can get a bit blurry, but within the bounds of any organization and project you can usually figure out what's right for the case involved.]
No, you can't have it!