Author Topic: How do I update EA from a linux java web app?  (Read 7061 times)

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
How do I update EA from a linux java web app?
« 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?
« Last Edit: August 22, 2012, 01:53:53 am by svenderiknygaard »

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: How do I update EA from a linux java web app?
« Reply #1 on: August 22, 2012, 03:23:40 am »
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.

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
Re: How do I update EA from a linux java web app?
« Reply #2 on: August 22, 2012, 08:17:45 am »
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?


Quote
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.
« Last Edit: August 22, 2012, 08:18:25 am by svenderiknygaard »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: How do I update EA from a linux java web app?
« Reply #3 on: August 22, 2012, 08:54:05 am »
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.
« Last Edit: August 22, 2012, 08:56:18 am by simonm »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How do I update EA from a linux java web app?
« Reply #4 on: August 22, 2012, 04:03:19 pm »
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

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: How do I update EA from a linux java web app?
« Reply #5 on: August 22, 2012, 06:05:41 pm »
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
« Last Edit: August 22, 2012, 06:14:04 pm by pmaessen »

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
Re: How do I update EA from a linux java web app?
« Reply #6 on: August 23, 2012, 02:19:55 am »
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 (?)
« Last Edit: August 23, 2012, 02:21:25 am by svenderiknygaard »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How do I update EA from a linux java web app?
« Reply #7 on: August 23, 2012, 02:39:35 am »
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

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: How do I update EA from a linux java web app?
« Reply #8 on: August 23, 2012, 06:35:22 am »
Quote
..., 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
« Last Edit: August 23, 2012, 06:37:16 am by pmaessen »

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
Re: How do I update EA from a linux java web app?
« Reply #9 on: August 23, 2012, 10:54:15 pm »
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.

Andreas Graf

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: How do I update EA from a linux java web app?
« Reply #10 on: September 10, 2012, 10:45:00 pm »
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