Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - coatie

Pages: [1]
1
Automation Interface, Add-Ins and Tools / ApplyUserLockRecursive
« on: November 13, 2018, 11:27:56 pm »
Hello,

we wanted to automate the transfer of a small package from one EA model to another one via XMI-export/import.

The target model has security enabled, therefore we lock the according target package via ApplyUserLockRecursive(true, true, true).
But we found the XMI import into the target model is failing because it seems not all elements within the target package got locked.

When analyzing we came across that apparently ApplyUserLockRecursive (via EA13.5 API) doesn't lock diagram elements like note-elements or text-elements which are part of diagrams. But then this seems to make it impossible to import a XMI file to the according package via automation API.

Anyone knows a solution / different approach to this?

Thank you
Markus

2
General Board / [SOLVED] Using SSL with CloudServer
« on: April 14, 2015, 04:42:42 pm »
Hello,

I created a self signed SSL certificated using the openSSL commands described at
http://www.sparxsystems.de/fileadmin/user_upload/pdfs/Cloudservice/Enterprise_Architect_Cloud_Services.pdf (see last page)

The server.pem is successfully generated but I am getting following error when starting the CloudServer-Service:
[WARNING]: Unable to create secure server on port 805. CA Cert file not found not found at C:\Program Files (x86)\Sparx Systems\Cloud Services\Service\cacert.pem

SSCloudServices.config contains following:
...
(
SERVER_PORT=805
REQUIRE_SSL=1
)


Do I need to create a CA certificate as well?

Regards,
Markus

3
Automation Interface, Add-Ins and Tools / Orphan locks
« on: November 20, 2015, 06:02:19 pm »
Hello,

we make use of EA's security feature and I just got curious about the number of entries within t_seclocks. So I ran query below and it gave me a lot of results, means it seems that there are a lot of orphan locks.  Did I miss something wrt my query?

Code: [Select]
SELECT l.entityid, o.Object_id, o.Name, o.Package_Id, u.userlogin, l.timestamp
FROM t_seclocks l
LEFT OUTER JOIN t_object o on o.ea_guid = l.entityid
LEFT OUTER JOIN t_secuser u on u.userid = l.userid
WHERE o.Package_id is NULL

Markus

4
Hello,

just wrote me a Powershell script to open an EA model and realized that my add-in is not enabled when running EA via the PS script.

Snippet from powershell script:
Code: [Select]
     
...
  $dbConnection = "DBType=3;Connect=Provider=OraOLEDB.Oracle.1;Password=XXXXX;Persist Security Info=True;User ID=YYYYYY;Data Source=eadb;"
  $EaApp = New-Object -ComObject "EA.App"
  $EaRepo = $EaApp.Repository
  $EaRepo.OpenFile2($dbConnection,"user","secret"))
...

After calling the OpenFile2 I expected the event EA_FileOpen to be fired and my Add-In (C# DLL) to do some action but it didn't happen. Then I added $EaRepo.ShowWindow(1) to the Powershell script and found that my Add-In is in state "disabled" within the Addin-Manager.

Any way to enabled it?

Markus

5
Automation Interface, Add-Ins and Tools / [solved] Disable security
« on: February 11, 2015, 08:25:11 pm »
Hello,

is it possible to disable project security using the automation interface?
And/Or is it possible to trigger the unlocking of all current locked elements via the automation interface?

Thank you!

Best Regards,
Markus

6
Hello,

is it somehow possible to add the "Diagram Notes" element (the element showing author, created date, changed date and version) to a diagram using the automation interface?

I prefer using the "Diagram Notes" element instead of using the "ShowDetails" properties since the "Diagram Notes" are relocatable.

Best Regards,
Markus

7
Hello,

I am trying to get an EA addin running while it is registered under HKEY_LOCAL_MACHINE in Windows7 64Bit. EA realizes it should run my plugin (it is there in the "Manage Add-Ins" dialog) but reports "Error-Missing (0x800401f3)".

Deleting the HKLM entry (leaving DLL untouched) and adding following key: "HKEY_CURRENT_USER:\Software\Sparx Systems\EAAddins" the plugin is available via the extensions menu as it should be.

For HKLM I use following key: HKLM:\Software\Wow6432Node\Sparx Systems\EAAddins
DLL is compiled to be 32bit (C#, platform target x86).
Regasm is called using the 32bit version and using parameter /codebase: C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe  my_ea_addin.dll /codebase

So how to get the plugin running when registering for HKLM?

Best Regards,
Markus

8
Hello,

we wrote a plugin to support us in cloning ports including all attached provided/required interfaces and all connections bound to that port. This is working fine on some PCs but on some others not and ends up with following error message:

"Exception occurred: ADODB.Fields [-2146825023]
Item cannot be found in the collection corresponding to the requested name or ordinal.      "

So far we found that this is only raised after calling the Update() function of a newly created connector (and only for the object of type connector). For all other items, i.e. the port element and the interface elements, the creation is successful without any error.

The implementation looks like following:
EA.Element parentElement;
EA.Element newPort;

parentElement = aRepositroy.GetElementByID(portToClone.ParentID);
// create new port
newPort = (EA.Element) parentElement.Elements.AddNew(portToClone.Name + "_CLONE", portToClone.Type);

try { newPort.Update(); }
catch { Log("Error occurred: " + newPort.GetLastError()); }
parentElement.Elements.Refresh();

// take over the connectors
foreach (EA.Connector connectorToClone in portToClone.Connectors)
{
      EA.Connector newConnector;
      
      newConnector = (EA.Connector) newPort.Connectors.AddNew("", connectorToClone.Type);
      newConnector.SupplierID = connectorToClone.SupplierID;
      
      if (portToClone.ElementID == connectorToClone.ClientID)
      {
            newConnector.SupplierID = connectorToClone.SupplierID;
      }
      else
      {
            newConnector.SupplierID = connectorToClone.ClientID;
            newConnector.Direction = "Destination -> Source";
      }
      try
      {
            /*
                  while executing this call we receive the expection:
                  ADODB.Fields [-2146825023]
                  Item cannot be found in the collection corresponding to the requested name or ordinal.            
            */
            newConnector.Update();
      }
      catch
      {
            Log("Exception occurred: " + newConnector.GetLastError());
      }
      newPort.Connectors.Refresh();
}


Our EA model is located on an OracleDB server and we are using Oracle Client 11gR2 (exact same version 11.2.0.32 on all machines).

Does anybody know how we can find out what is causing this error? (Since it only occurs on some machines)

Thank you!

Best Regards
Markus

Pages: [1]