Book a Demo

Author Topic: How to read Trigger/Specification field  (Read 5254 times)

fginfrance

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
How to read Trigger/Specification field
« on: October 29, 2009, 09:02:51 pm »
Hi,

I try to exploit an existing model where required infos have been put into the  Transition Properties/Constraints/Trigger/Specification: dialog fields

These fields are obviously related to the Notes (at least that is what opens in the context-sensitive help) and associated w/ the trigger (as they are globally updated wherever the trigger is used), but I cannot figure out how to read them from the API.

Any help would be welcome. Thank you in advance.

fginfrance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to read Trigger/Specification field
« Reply #1 on: November 03, 2009, 07:16:40 pm »
Have you looked in the PDATA fields?

(just a guess)

Geert

fginfrance

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: How to read Trigger/Specification field
« Reply #2 on: November 03, 2009, 10:55:36 pm »
Hello Geert,

thank you for your answer.
I indeed try to dump systematically PDATA via the MiscData API for all elements w/ a little tool, since this was the answer to a previous problem (template infos) I posted, but not this time.
At least not in the 5 PDATA I am able to dump per elem before an execption is raised.
Btw. I have no experience w/ a C# access as I use a python wrapper, are you able to read beyond PDATA5?
Anyway, seems this Trigger/Spec entry is a hard one.
I checked also the XMI output and even there the Spec info is stored in a quite strange way (with a specific "signal" key and an inconsistent idref?!)

Will try to shift the infos from Spec to a more easily accessible field in the existing models, I guess...

Thanks again,
fginfrance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to read Trigger/Specification field
« Reply #3 on: November 04, 2009, 12:02:23 am »
What I usually do in such cases is to start from an empty project, and create ONLY the elements I need.
Then open the eap with Access and keep opening tables untill I find the information I need. I has to be somewhere so it is just a matter of time to find it.

Once you know the location in the database it is usually not that difficult to figure out how to retrieve said infromation through the API. (in a las resort you can always use the SQLQuery operation).

I think there are only 5 pdata fields in the database scheme, so that's probably why you get an exception when trying to read more.

Geert

fginfrance

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: How to read Trigger/Specification field
« Reply #4 on: November 05, 2009, 05:49:11 am »
Hi Geert,

It is friendly experts like you who make this forum a pleasure to participate to!
Thanks for the confirmation about 5 PDATA elements, it reassures me in using my python wrapper.
... and if I ever looked for a reason to "invest" in MS ACCESS, you gave me one  ;)
In the meantime, I will probably try to dump the XML of the element "on the fly"...
 
Regards
fginfrance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to read Trigger/Specification field
« Reply #5 on: November 05, 2009, 06:31:03 am »
Happy to help, but I don't consider myself to be an expert. Advanced user maybe, but expert is a term reserve for the real veterans like Paolo or David (<<Midnight>>)

Of course you don't really need access. You can do exactly the same with mysql, sql-server, or whatever database you run EA on.

Geert