Book a Demo

Author Topic: Automation Interface - Architecture?  (Read 4740 times)

Thelonius

  • EA User
  • **
  • Posts: 274
  • Karma: +6/-0
  • I think. Therefore I get paid.
    • View Profile
Automation Interface - Architecture?
« on: March 14, 2009, 12:42:56 pm »
I think I know what the response to this next question is going to be, but I'll try anyway.

Is there a diagram that shows me what the physical / technical architecture of the EA automation interface looks like?

I was (incorrectly, as it turns out) thinking that it was server-based - or could interface directly to the SQL Server data base - but apparently (according to a peer who knows more than I do about these things) it can only interface through the EA client application to the SQL Server data base.

Then I thought - why isn't there a Sparx diagram that shows me the physical architecture / configuration of the Automation Interface?

I would then be able to see examples of the variety of physical objects that can be created by people who wish to use the Automation Interface. I could see the supporting technologies used to interact with the client (ODBC? Inline SQL statements?).

And how the client talks to the SQL Server data base. ODBC? Can stored procedures be written to be invoked on the server by the EA client?

Perhaps this diagram exists in an obvious place and I've just been negligent in overlooking it?

Jon

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Automation Interface - Architecture?
« Reply #1 on: March 14, 2009, 10:22:03 pm »
Hi Jon,

[This is a bit wordy, but follow along and there might be a few things you can use.]

The bad news is that you do know what the answer will be: there is no such diagram.

The good news is that you can create one yourself, though there won't be any associated documentation.

You seem to be asking about two things here. First there is the EA API itself. This is independent of the DBMS (or EAP) structure that EA uses to store the actual model. EA is a COM application. This is a somewhat dated (though still common and certainly workable) Microsoft paradigm for application interfacing.

Fortunately Sparx has provided a .Net 'wrapper' for the EA interface. Even though .Net would do this for you, the standard version provided by Sparx makes some (but not all) development tasks a bit easier. It also has a nifty side benefit in your case: it is a .Net executable file and thus may be imported into an EA model.

So, look up the Import Binary Module feature in the EA help. Create a model and use this function to import the wrapper file. The default location for this file is your EA installation directory; the name should be Interop.EA.dll (note that there are two periods in the name). If you want to be absolutely sure about the name you can use the References dialog in any .Net project to hunt for the file.

The second thing you seem to be asking for is the structure of the EA project schema. This can be diagrammed in EA by connecting to an EA project - not the one you have open, but another one - and importing the database from ODBC (or OLEDB, but the menu option is the same). Once again, look up how to import a schema in the EA help.

Finally, a word about how the EA 'engine' accesses its projects. Remember that EA uses both EAP files and DBMS databases as ways to store projects. Because of this EA uses a 'lowest common denominator' approach to handling storage. Although the engine is certainly aware of which database it is using - EAP files use the Microsoft Jet engine, the same one as used by MS Access - it does not rely on any functionality that is not present in all the databases it supports. Not only that, but the DBMS support in EA goes back several years, so EA was developed when several of the DBMS back ends had more limited functionality than today.

The end result is that EA does not make use of stored procedures - some DBMS back ends had very limited support, and Jet does not really handle these. Nor does it use some data types - data types like Boolean are not universally supported, but things like character codes are common. Still, the bottom line is that EA handles things in a 'plain vanilla' way; there's nothing along the lines of stored procedure calls.

David

PS: Although it is completely unsupported by Sparx (after all, how could they), you can actually tweak the DBMS back end a bit. Thus far EA has been fairly tolerant of this, just so long as you don't mess with any of the structure that EA defines. You and add your own stored procedures and triggers - once again I repeat the warning about messing with EA's own structures and add a caution about changing anything that EA would handle in the same transaction. You can even add additional fields to some - perhaps all, you will have to check and test each case - tables, or add new tables for your own functionality. Of course there are no promises here; in future Sparx might make changes that would invalidate some or all of what you do. So protect your work, and set up some kind of backup mechanism where you can extract the core (i.e. EA-specific) parts of the database. XMI export and a baseline of the entire model might work in many cases, but play around a bit and see what works best for you.
No, you can't have it!

Thelonius

  • EA User
  • **
  • Posts: 274
  • Karma: +6/-0
  • I think. Therefore I get paid.
    • View Profile
Re: Automation Interface - Architecture?
« Reply #2 on: March 15, 2009, 05:32:33 pm »
Thanks, Midnight! Yep, that's good information to have.

So if I wanted to do something that used the Automation Interface - what tool would I first have to pick up?

And what would I create with that tool?

I'm guessing: First tool = Visual Basic or something simlar? and I would be creating a .dll that I could then 'add-in' to EA?

Sorry for simpleton questions.

 :)

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Automation Interface - Architecture?
« Reply #3 on: March 16, 2009, 05:01:27 am »
You can use pretty much anything that can connect through a COM interface. You can also use Java, via yet another wrapper that Sparx has provided. Check the documentation for that, and look for readme files in your EA installation folder.

You can certainly use VB. EA works well with VB 6 as well as recent VB.Net versions. [It used to work with any .Net 1.x tool, but I don't know if it still does. It certainly works well with the 2005 and 2008 versions.] The same holds true for the respective C# versions.

Note that the above tools include the Express editions. These are available free from Microsoft.

You can also use VBA. This means that you could write a macro program in something like MS Word and it use it to automate an EA model.

There are many development environments outside of the Microsoft world that will also work well. These include Delphi and such from various vendors. You can also use free tools like Python and Perl, with their respective COM connectivity libraries.

Some people have even used database scripting - once again, as long as the database supports a COM interface - to work with EA. That can allow direct manipulation of an EA project from something like an Access application - to use an obvious example; there are many other possibilities.

As you can see, this is a pretty wide open field. Don't be overwhelmed! It simply means you have a lot of possible approaches you can take. You only need one to make things work.

See the EA documentation for some examples. The good news is that the examples provided are quite dated; this means that the examples illustrate some rather ubiquitous tools.

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


«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Automation Interface - Architecture?
« Reply #5 on: March 16, 2009, 10:14:34 pm »
Silly me...

I forgot those! Or sort of forgot them. My assumption had been that the desired diagram had been a complete overview, not partial ones. I had also assumed that either of the two people mentioned had checked the manual.
No, you can't have it!