Book a Demo

Author Topic: no tagged values after add stereotype to connector  (Read 6885 times)

sff

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
no tagged values after add stereotype to connector
« on: April 30, 2014, 07:09:03 am »
I'm adding a large number of elements using the java api.  The various types are being created, stereotyped, and their tagged values are updated on the fly.  I'm running into a problem with not seeing tagged values for a stereotype after it has been added to any connector type and the connector Update()'ed.  All of the other connector-related settings are being captured, just not the tagged values for the applied stereotypes.  Refreshing the connector's tagged values doesn't help.  The stereotypes are part of a profile, and they are appropriate for the connector they are being applied to.  The stereotypes are definitely being applied as they show up on the elements in the project browser, on the connector's properties, in XMI exports, etc.  Note that if I manually add the stereotype via the connector's properties, the tagged values are there. Not so when the stereotype is added using the AI.  Adding stereotypes to all of the other uml types (packages, attributes, elements of various flavors, etc) that I am working with via the AI do not have this problem.  It seems to me that running a repo-wide Repo.SynchProfile is a bit heavyweight to run every time a connector is added using the AI (there are 1000's of them).  Element types have a SynchTaggedValues() call (although I'm not using it), connectors don't so that isn't an option.  Additionally, I thought v10 fixed this tagged value thing during Update().  Any suggestions?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: no tagged values after add stereotype to conne
« Reply #1 on: April 30, 2014, 10:13:08 am »
Check Repository.SynchProfile (string Profile, string Stereotype)

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: no tagged values after add stereotype to conne
« Reply #2 on: April 30, 2014, 10:38:06 am »
Quote
Check Repository.SynchProfile (string Profile, string Stereotype)
He already said he knew about that. (Although given it's hard to read with the text in one big paragraph)

If it doesn't do it then it sounds like an issue. I do remember something about StereotypeEx doing it but not Stereotype. But that could have been for another type. Worth a try at least.

sff

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: no tagged values after add stereotype to conne
« Reply #3 on: April 30, 2014, 10:51:41 pm »
Thank you for the responses.

Sorry about the long paragraph.

I forgot to mention this.  Repo.SynchProfile() is not available through the java API.

I'm adding the stereotype with StereotypeEx.  I've tried Stereotype by itself and both at the same time in different orders.  Doesn't help.

connector.Update() doesn't add the stereotype's tagged values to the connector, there is no SynchTaggedValues() call like there is for Element, and Repo.SynchProfile() isn't available.  I think I'm stuck.

If I manually synch the stereotype after the API routine completes, the tagged values do show up on the connector, so it seems I just need a way to make this happen.

BTW, I can also reproduce this with JScript.  If tried this to see if it was an issue with Java or behind the underlying com interface.  It appears to be in the com implementation since the same behavior occurs.  However, one does have access to the Repo.SynchProfile() method with JScript, and I tried running it after Update() and presto the tagged values show up on the connector.  Unfortunately, JScript is not an option for me.

If I could call a script... er, no can't do that either.  :-/

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: no tagged values after add stereotype to conne
« Reply #4 on: April 30, 2014, 11:11:51 pm »
btw: which version du you use?

q.

sff

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: no tagged values after add stereotype to conne
« Reply #5 on: May 01, 2014, 03:27:50 am »
10.0.1006

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: no tagged values after add stereotype to conne
« Reply #6 on: May 01, 2014, 03:51:51 am »
Strange. I thought they had changed that behavior with V10. But obviously not so for connectors. I'll take a deeper look next Monday (it's little holiday from 1st of May til Monday here).

q.

sff

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: no tagged values after add stereotype to conne
« Reply #7 on: May 02, 2014, 07:04:53 am »
Should I write up a bug for this?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: no tagged values after add stereotype to conne
« Reply #8 on: May 02, 2014, 08:17:30 am »
The worst that could happen is that it's a bug indeed. The best would be they can tell you a work-around. So, yes.

Anyway (if I don't forget) I'll have a look Monday.

q.

benc

  • EA Administrator
  • EA User
  • *****
  • Posts: 200
  • Karma: +0/-0
    • View Profile
Re: no tagged values after add stereotype to conne
« Reply #9 on: May 02, 2014, 04:01:33 pm »
You might have a look at another script that does the same kind of thing... From memory, it was written against EA 10.x or 9.x. Have a look at the function AddRelationshipClassTags starting at line 1802 here.

http://www.sparxsystems.com/arcgis/visio/VBScript-PostProcessImportedVisioArcInfoModel.vbs

It adds a bunch of tags 'manually', but synchs the connectors against the profile all at once, right at the end of the script. (See the comments starting from line 1947 and the call to SynchProfile at line 468.)

I can't remember which release of EA it was fixed in, but the tagged value synch became smart enough to preserve existing values of the same-named tags and bring those 'unprofiled' tags nicely into the profile as part of the synch. This particular script works on EA's ArcGIS profile... Been a while since I used that script, but I think that's roughly how it behaved anyway.

Given that you haven't got SynchProfile available from the java API - could this be one manual step, after script is run, achieved via the UI?

I hope that helps.

Ben

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: no tagged values after add stereotype to conne
« Reply #10 on: May 05, 2014, 08:44:12 pm »
I just made a test with this issue. Conclusion: it's fixed with V11. In V10 the tags are not created, but in V11 they are. Time for an update.

q.