Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Svend Erik Nygaard on August 22, 2012, 01:47:45 am
-
We need to update our EA repository (SQL server) from a Java web application residing on a linux server.
Using SQL to update EA with new elements, connections, diagrams etc seems far-fetched!
But can we use the EA Windows Automation API in this scenario from linux? - Somehow it MUST be possible - How?
-
Since you didn't mention what you've considered so far: are you aware of Wine (http://www.sparxsystems.com/support/faq/enterprise-architect-WINE.html) and crossover (http://community.sparxsystems.com/tutorials/software-development/enterprise-architect-90-mac-and-linux)?
Dont'know about Wine but according to their site crossover runs vbscript (http://www.codeweavers.com/compatibility/browse/name/?app_id=7859) so you should be able to run EA automation scripts.
-
Thanks for responding. However:
It is my understanding that Wine/Crossover does not bring me any closer to a solution on this:
If we installed Wine/Crossover on the Linux, then we would be able to call EA Automation API from windows programs under Wine/Crossover on the linux. But it will still be out of reach from our java web apps running on the linux.
Isn't that correctly understood?
Since you didn't mention what you've considered so far: are you aware of Wine (http://www.sparxsystems.com/support/faq/enterprise-architect-WINE.html) and crossover (http://community.sparxsystems.com/tutorials/software-development/enterprise-architect-90-mac-and-linux)?
Dont'know about Wine but according to their site crossover runs vbscript (http://www.codeweavers.com/compatibility/browse/name/?app_id=7859) so you should be able to run EA automation scripts.
-
The automation interface still requires Windows (or Wine) to run. It's not accessible at all outside of that.
In order to do what you want you're going to need to write an application that sits in Wine and can be called by running Wine from your Java app.
-
Either that, or you write a Windows app that does what you need, and you expose the functionality with web-services, which you can then call from your java web-application.
It should then not really matter whether your Windows app is residing on "real" windows or on an emulator.
Geert
-
Or, to keep it simple: let your web app in linux write changes that must be made to the EA repository to intermediate files (any format you like) in a specific folder on the local drive, and write an automation application running in Wine/Crossover that polls & parses this information en generates the changes through EA automation.
You can subsequently append the result to the intermediate files giving you an audit trail of the process. ;)
Or a bit more work but better still, write the information to a SQlServer database.
regards,
Paulus
-
Thanks guys for your input.
At least know I know, that I cannot access EA repositroy directly through its api from Java on Linux.
I have been thinking of two alternatives:
1) Accessing AND UPDATING! EA repository through SQL.
I guess that is a risky non-supported solution very sensitive to Sparx way of doing things internally.
2) Implementing a web service api with the operations that I need.
... which have also been suggested by Geert.
Although, since we using java, I will probably implement it in java (on windows) to be accessed by java web app from Linux.
I hope that the EA JAVA API to the windows automation api is just as mature as the other ones, even though it is rarely mentioned/examplified (?)
3) Yes I also considered dropping out on EA and move over to one of the competitors that have better support for Java integraion. However, our EA rpository now has more than 17.000 elements (business concepts, processes, goals, IT systems etc) - so that would probably be quite an operation with a lot of extra work for a long time reparing details in the models.
So for now, I will go for creating a web api - IF the java interface to EA is mature enogh - I hope so (?)
-
I think the Java api is just a port from the .net api.
I believe almost everything is the same. The only thing you can't do is create an add-in in Java.
Geert
-
..., even though it is rarely mentioned/examplified (?)
Take a look at:
http://code.google.com/a/eclipselabs.org/p/ea-emf-adapter/
http://mogwai.sourceforge.net/eareport.html
I've used the EA API wrapper of the former to create a basic model import program and it's pretty straightforward to use. If anything it will give you a good understanding of how to use the API.
regards,
Paulus
-
Thanks Paulus.
I think those links will be a good help.
It's still java on windows ofcourse, so I cant use them on Linux when they need the dll. But as you say, I too think they will be of good use when setting up my use of the EA win-automation Java API.
-
Hi,
maybe you might also want to check out our integration Yakindu Bridge, that has been just listed on the (German) Sparx Site: http://www.sparxsystems.de/3rd-party-tools/details/article/integration-von-enterprise-architect-ea-mit-dem-eclipse-modeling-framework-emf/?L=lgflubill&cHash=4219b23310
From the text:
Der Zugriff auf EAP-Modelldateien ist dabei nicht auf Windows beschränkt, sondern unter allen von der Eclipse-Plattform unterstützten Betriebssystemen (Windows, MacOS, Linux) möglich.
Which means:
Access to EAP-models is not limited to Windows, but supported on all OS that run Eclipse.
Best Regards,
Andreas