Book a Demo

Author Topic: Tagged Values for Roles?  (Read 14860 times)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Tagged Values for Roles?
« Reply #15 on: December 17, 2014, 06:40:54 am »
Quote
Quote
OK, I have made a VBscript that iterates the model and inserts stereotypes for roles where they're missing. Is there a way to run scripts automatically at certain UI events or the alike? Or a quick meny for running scripts for "current" model elements?
You can do that be writing an add-in. It can catch some of the user interaction and do some magic. It's probably possible event with VB if you use WSH (just a good guess again). I was able to do that with Perl at least. However, a language that can compile is preferred as you need to register your add-in.

Add-ins are also useful for on-the-fly interactions as you get them offered via context menu.

q.
« Last Edit: December 17, 2014, 06:41:52 am by qwerty »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Tagged Values for Roles?
« Reply #16 on: December 17, 2014, 10:32:45 am »
Don't look in your file. I said look in the resource tree for an imported technology. In later versions we've offered an alternate way of importing a technology into a model (more value for your upgrade price) but older versions would have imported the technology by splitting it up across multiple tables, including the stereotypes table. It would then prevent deleting that stereotype because it would invalidate the rest of the technology.

(It's possible that the problem could just be a profile as well)

All EA tagged values allow you to enter notes. (There's a button on the tagged values dialog) to enter them. You won't find the "$ea_notes" in your resource file. It's in the back end database (I'm guessing this problem only applies to your association role tags and parameter tags if you're using them) The GUI knows to look for this hidden identifier. It probably only impacts code generation (but I wouldn't rule out it impacting report generation either)

Regarding code generation from attributes, there is an option I forgot. Add a custom template of type Connector. You then get raw access to all(?) fields of a connector including access to objects at either end. Then you add the appropriate list over it. Just be aware that you need to determine the direction yourself. (eg. connectorStartElemGUID=classGUID)
« Last Edit: December 17, 2014, 10:35:31 am by simonm »

RIL

  • EA User
  • **
  • Posts: 164
  • Karma: +3/-0
  • -- There's always a solution --
    • View Profile
Re: Tagged Values for Roles?
« Reply #17 on: December 17, 2014, 03:20:47 pm »
Quote
Don't look in your file. I said look in the resource tree for an imported technology.
Nope, not there. :(

Now what?

// Rolf Lampa
-- There's always a solution --

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Tagged Values for Roles?
« Reply #18 on: December 17, 2014, 05:10:29 pm »
Open the search window, go to edit and find the SQL Scratch pad.

Run the following:
Code: [Select]
select * from t_stereotypes where Stereotype='bold.attr'What does that give you? By my theory you would have some contents in VisualType (the last column)

RIL

  • EA User
  • **
  • Posts: 164
  • Karma: +3/-0
  • -- There's always a solution --
    • View Profile
Re: Tagged Values for Roles?
« Reply #19 on: December 17, 2014, 05:29:10 pm »
Quote
Code: [Select]
select * from t_stereotypes where Stereotype='bold.attr'What does that give you? By my theory you would have some contents in VisualType (the last column)
I get this: (hit!)
No VisualStyle though.



Can I delete the second item from this SQL editor?

// Rolf Lampa
-- There's always a solution --

RIL

  • EA User
  • **
  • Posts: 164
  • Karma: +3/-0
  • -- There's always a solution --
    • View Profile
Re: Tagged Values for Roles?
« Reply #20 on: December 17, 2014, 06:00:18 pm »
I tried to run the following SQL but nothing changed:

Code: [Select]
delete from t_stereotypes
where Stereotype='bold.attr'
and ea_guid='{090C472D-EEF0-4764-A337-3D757332E3FF}'
-- There's always a solution --

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Tagged Values for Roles?
« Reply #21 on: December 17, 2014, 06:03:07 pm »
You can't run that from the SQL window. It only allows SELECT. Use either a M$ Access client or run the SQL from a VB script that has a
Code: [Select]
Repository.Execute("your sql")statement.

q.

RIL

  • EA User
  • **
  • Posts: 164
  • Karma: +3/-0
  • -- There's always a solution --
    • View Profile
Re: Tagged Values for Roles?
« Reply #22 on: December 17, 2014, 06:08:12 pm »
Fixed. Many thanks!

// Rolf Lampa
-- There's always a solution --