enterprise-architect , How to get rid of zombie processes after using EA's Java Automation interface?

How to get rid of zombie processes after using EA's Java Automation interface?


Tag: enterprise-architect

I am building an application that connects to Enterprise Architect using the Java automation interface. When the program exits, an EA process remains in the Windows Task Manager.

The application is using windowClosing hooks to call .CloseFile(), .Exit(), and .destroy() on the repository object, but the EA process remains. Adding a call to force garbage collection does not seem to make a difference.


Loading an EA file can take quite a long time. During this time, there is nothing the user can do but wait...so the application displays a "Please Wait" screen. In order to keep the UI from freezing, all of the loading is done in a separate thread (not a SwingWorker) while a loading animation is played on the Glass Pane.

The automation interface uses COM and when the loader thread dies, it trashes the COM connection. All of the data gathered prior to the thread ending was fine, but all subsequent accesses failed (somewhat mysteriously). Since the connection was severed, the application could not disconnect from EA (hence the zombies).

I solved the problem by getting a reference to the EA Repository object on the main thread (a very quick operation) but still deferred loading to the worker thread. Since the main thread stays alive throughout the life of the application, the COM connection stays alive and the interface works as it was originally expected to.


Create Sequence Connector

I would like to create programmatically a self-connector, using C#. This is how I do it in case of an Association connector: //Create new Association connector object connectorObject = selElement.Connectors.AddNew("NewConnector", "Association"); EA.Connector connector = connectorObject as EA.Connector; if (connector != null) { //self-connector connector.SupplierID = selElement.ElementID; connector.ClientID = selElement.ElementID; connector.Update();...

How to constrain a stereotype to have no attributes?

I tried using OCL but this doesn't actually work in EA. Is there a way to do it?...

Enterprise Architect edit Class Name before “::”

I used EA to import some source code. However, the name contains name::className. How can I get rid of name? If I highlight name::className it only displays className for editing?

transform reverse engineered physical data model into conceptual entity relationship diagram

I have reverse engineered a physical data model from an existing db using enterprise architect. It looks similar to this, which IMHO is an erm too: Can I transform this into an erm like this?: Thanks!...

Enterprise Architect scripting: set Connector's property for sequence diagram

I created a message (sequence connector) between two elements: dim w_src as EA.Element dim w_dst as EA.Element set w_src = Repository.GetElementByGuid("{C90B3F33-D01D-48d9-A46A-BD32CA8AF20E}") set w_dst = Repository.GetElementByGuid("{239814DD-D331-47dc-A198-F2C32E57471C}") Session.Output "Src: " & w_src.Name Session.Output "Dest: " & w_dst.Name dim w_con as EA.Connector set w_con = w_src.Connectors.AddNew("wocMessage", "Sequence") w_con.SupplierID = w_dst.ElementID w_con.Stereotype = "query"...

Display Notes of Custom Stereotypes in Enterprise Architect

I want to create my own custom toolbox. Therefore I created a metaclass and a stereotype. In the stereotype I wrote a note that gives some instructions about how to populate the object. Problem is, when I create my MDG Technology, the Notes won't display in the objects I create...

Limitations of Packaging Components in Sparx EA?

I'm running into what I would say are some limitations with the Packaging Components in Sparx EA. I use them to aggregate a number of commonly-themed web services in a Package. To be specific, they are JAX-RS Web Services. I model the Resource as a Packaging Component and the invokable...

Enterprise Architect Model Search XML Format

I have written a few Add-Ins for Enterprise Architect in C#. I want to add a complex model search now in a similar manner. I have no issue running my add-in search. I believe my issue is with the XML Model Search Format. The only documentation that I can find...

reverse engineer existing relation db in enterprise architect

I have an existing relational database (sql server), which I would like to use to create an entity relational diagram from in enterprise architect. I came across this but am not sure whether this is the right approach to achieve what I described above (I get lots of error messages)....

Enterprise Architect - Cancel Connectors Bridges

This might be a silly question but still - when two connectors cross each other the EA creates a bridge. Any way to cancel that so it'll basically be two straight lines crossing? Thanks....

Documentation with Diagram “Hyperlinks” in Enterprise Architect?

I'm struggling to get all the required (and only the required) information into the documentation of my Enterprise Architect Project. Precisely: we have modelled various requirements and displayed the source "standards" for these requirements in our diagrams by using the "hyperlink"-element out of the common toolbox. (This allows us to...

Using “Get all latest” function of Enterprise-Architect outside of the EA

Is there a way to acces the EA function "Get All Latest" for a package of the EAP file outside of a running Enterprise architect. For example via a batch file?...

How to move a diagram between projects?

I'm a very basic user of EA. I never had the time to learn its terminology or features and therefore i only use it to create pretty basic (yet rather big) diagrams. Unfortunately my EA project file was updated by another person and now i need to move a diagram...

Get Text of Linked Document

I would like to get a string which contains the formatted text of a linked document (the file linked to an Artifact). Is it possible using EA API (C#)?...

How can i generate domain model diagrams, and documentation

I imported my project files into Enterprise Architect, under the Domain Model section. The program imported the files correctly, but it did not create domain model diagrams, so i can generate documentation about it, but it is empty. If i imported the project files under the Class model section, class...

How to move exisiting elements between packages with an EA Addin in c#?

I am working on an EA Addin in c# (thanks Geert) and would like to move exisiting elements from a package to another using the code. It is clear how to add or delete elements to/from EA.Collection p.Elements, but this does not work sincethis procedure changes the GUID of the...

Sparx EA: What type of relationship created when a Component is added to a Node?

In this question (point #3), I asked about getting a Packaging Component recognized as contained by a Node (device or execution environment) on a deployment diagram. No direct answer. However, the answers to other points led me toward an alternative that seems simple in concept: manually create the relationship or...

How to represent database columns and instance variables in UML

I am using Ruby 1.9 and Rails 2.3. I am designing class diagrams for Model classes. I was stuck with two doubts. 1.How to differentiate database columns and instance variables in Class diagram variables section. 2.In Ruby Active record created setters and getters for database columns automatically, In this case...

How to set an initial value for an enumeration entry in Enterprise Architect using Java Automation API?

I need to be able to set the initial value of an enumeration literal using the EA Java Automation API. Unfortunately I failed in finding out how this can be achieved in the manual. As I found out an Enumeration is actually represented by an Element in the EA object...

Changing the Diagram Layout from down to up in Enterprise Architect via C# API

How can I change the layout direction of a diagram in Enterprise Architect via C# to get the same result as displayed in the picture: ...

What underlying difference makes Node Instances appear different?

I have two similar (if not identical) node instances that are appearing differently in a deployment diagram (and anywhere else that I use them). I may have done some odd things in the past while beating EA into submission. But, now ... by pulling every lever I can imagine, I...

EA - Obtain the `Local Project Path` directory in the project's `Version Control Settings`

Preface This relates directly to Enterprise Architect's API and its scripting capabilities and not so much with actual JScript/Javascript. Question How do you obtain the Local Project Path directory in the project's Version Control Settings using EA's scripting API? Note: [Package].XMLPath only provides the path relative to that location, which...

Get element background color in EA

How can I get color of element (eg. boundary) by using official API? I assume that it's save in database in t_objects -> backcolor, but I cannot find property/method in Element to get it....

How to get rid of zombie processes after using EA's Java Automation interface?

I am building an application that connects to Enterprise Architect using the Java automation interface. When the program exits, an EA process remains in the Windows Task Manager. The application is using windowClosing hooks to call .CloseFile(), .Exit(), and .destroy() on the repository object, but the EA process remains. Adding...

Anyway to debug Quicklink UML Profile in Sparx Enterprise Architect?

I'm trying to create a "Quicklink" document for customizing the allowed connector types between elements. Our UML Profile already exists like below: Big version here: http://i.stack.imgur.com/kcKQT.png And this imports as an MDG Technology just fine. However, when I add a "Quicklink" document to the profile and import it as an...

Set Deafult Language for Code Engineering

May this is not the place to ask such a thing, but there are several experts here... I cannot find the definition of default code engineering language in EA 12. In previos releases it was under Tools -> Options, on the source code engineering tab: Where it it hidden?...