Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: RonStein on July 04, 2007, 02:41:22 am

Title: Java API - Connector End Problem
Post by: RonStein on July 04, 2007, 02:41:22 am
Using the latest beta 3 and the Java API, I do always get back an empty string when trying to access the role name, role type or other information of a connector end object.
Here is the code snippet (elem is a class object):

...
for (Connector link : elem.GetConnectors())
{
 ConnectorEnd clientElement = link.GetClientEnd();
 ConnectorEnd supplierElement = link.GetSupplierEnd();
 String eaStartType = clientElement.GetRoleType();
...

eaStartType is always empty.

Any suggestions?
Ronald
Title: Re: Java API - Connector End Problem
Post by: thomaskilian on July 04, 2007, 01:51:58 pm
I'm not using the Java API but I would try stepping through by accessing "simple" things first, like the connector Name (need to set that in EA of course) and Type. Sometimes it's just a simple thing missing...
Title: Re: Java API - Connector End Problem
Post by: RonStein on July 04, 2007, 06:40:32 pm
Thanks for replying, but the code (and the model) worked before. I have used GroovyCOM before and now that the Java API is available I would like to take advantage of typed access and changed the code only to follow the new API (in fact I had to change only a few things). So I still think it might be a bug in the API.
Ronald
Title: Re: Java API - Connector End Problem
Post by: thomaskilian on July 05, 2007, 05:38:09 am
Then you should submit a bug report to the beta-bug page (found in the beta 1 release notes)
Title: Re: Java API - Connector End Problem
Post by: RonStein on July 18, 2007, 07:16:37 am
My assumption about getRoleType() was wrong. To get the connection end type (class) of a role end, I have to query by the ID. Therefore - my mistake, no API bug here.