Book a Demo

Author Topic: How to manage elements operations?  (Read 3333 times)

Stefan Christoph

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
How to manage elements operations?
« on: October 28, 2010, 02:27:08 am »
Hi,

I'm right now looking at possibilities to access an elements operation. I can access the element (in this case a component which comes with a couple of operations defined on it) and can access interfaces, parts, etc attached to it via Element.Elements / Element.EmbeddedElements.

Up to know, i couldn't find a way to access the operations. I would like to read all defined operations and also to modify/add operations.

Is this possible via  the EA Object Model? Or do I need to access DB directly?

Cheers,

Stefan

Stefan Christoph

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: How to manage elements operations?
« Reply #1 on: October 28, 2010, 03:14:04 am »
Hi again,

that was a rather easy question - I can now even answer myself ;-)
Operation are called Methods on the API level - which fits to the UML notion - and come with an API. Best way to start is the nice script example: ManageAttributesMethodsExample

Follow up question would be, if it is possible to read external files from a automation script. I would like to generate/update operations based on a input file. Is this something I could do if I execute my script from within EATool or do I need to chose an external runtime environment?

Cheers,

Stefan

Stefan Christoph

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: How to manage elements operations?
« Reply #2 on: October 28, 2010, 03:44:15 am »
and again a little bit more searching would have helped:

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1277431606/7#7

So it is possible and working for me as well.

Sorry for bothering you guys ..

Cheers,

Stefan

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13519
  • Karma: +573/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to manage elements operations?
« Reply #3 on: October 28, 2010, 04:05:25 pm »
Quote
Operation are called Methods on the API level - which fits to the UML notion -
Stefan,

UML uses the term "Operation" as well. Method is used in UML as the behavior implementing the operation.

The term "Method" in the API is just plain wrong and should be "Operation".

Geert