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.


Messages - ea0921

Pages: [1] 2 3 ... 7
1
We have a package named "cappm".

In the t_package table, there is a valid entry for this package.

For the same GUID, there is also an entry in the t_object table.

However, when accessing this package through the EA API, Package.Element returns null.

2
I have validated following:

1. GUID is correct, before saving image diagram to file, I am fetching entity before to validate entity is not deleted.
2. Similarly, before saving diagram to file, I am validating file path exists. If it does not exists then I create file path before hand

3
Hello all,
I am getting following error: "The remote procedure call failed. (Exception from HRESULT: 0x800706BE) at EA.ProjectClass.PutDiagramImageToFile(String DiagramGUID, String FilePath, Int32 Type)"

I am using the above method "PutDiagramImageToFile" to store EA diagram to file system, but when I am trying to execute the same method, EA application becomes non-responsive and EA does not respond. Becuase of this API call goes into waiting state for 60 minutes and after that I get an error of "remote procedure call failed (Exception from HRESULT: 0x800706BE)"

Machine configurations I am using:
RAM: 20 GB
EA version: 16.1

How can I resolve this error ?. Also, the size of diagram is of small size.

Thank you for help

4
I will check for the sleep().

There is one more case,
Thread1: Created connection with user1
Thread2: Created connection with user2 and added new elements
Now Again Thread1: is active and it fetches all elements from DB then, new elements are not found, unless package reload is done.

Also, I have performed these 2 commands before reusing the older connection:
1. repository.Models.Refresh();
//Refresh view for all packages
2. repository.RefreshModelView(0);

Still, new elements are not found

5
Getting data with SQL is not working, if explicit refresh is not done.
But just as package reloads are done, we get this data for newly added elements.


My usecase is such that:

Thread1: creates connection and creates an element
Thread2: reuses connection, and now when looking for all elements, it is not able to find Thread1 created element. Even if it is visible on ui as well if logged in with another user. Once, package reload is done, then I am able to find newly created elements

6
I am working with multiple threads and all of them uses the same connection and user as well, so when I am reusing the thread, I am performing below operations to refresh the connection object state:

repository.Models.Refresh();
//Refresh view for all packages
repository.RefreshModelView(0);

However, if Thread1 has created an element E1. And even after above refresh statements, if thread2 gets data of elements with sql query, then also E1 is not found in the data state.

Now, in case I explicitly refresh all packages using below code, then only I am able to find E1 element in Thread2 as expected.

public void ReloadAllPackages(EA.Repository repository)
        {
            foreach (EA.Package rootPackage in repository.Models)
            {
                ReloadPackageRecursive(rootPackage, repository);
            }
        }

        public void ReloadPackageRecursive(EA.Package package, EA.Repository repo)
        {
            if (package == null) return;

            // Reload this package
            repo.ReloadPackage(package.PackageID);

            // Recursively reload all subpackages
            foreach (EA.Package subPackage in package.Packages)
            {
                ReloadPackageRecursive(subPackage, repo);
            }
        }


But this will take too much time if too many packages are there and too many elements and diagrams.

Is there any alternate way for refreshing state of connection in different threads when reusing the same connection?

7
General Board / Provide reason to connect to EA application using DLL
« on: October 14, 2024, 06:54:12 pm »
Hello,

I am using Interop.dll to connect to EA application using API. I want to provide reason for opening the connection with EA application similar to hibernate where we can provide reason of opening a new connection.

Is there any way in EA api where i can provide reason for opening the connection ?

Thanks

8
General Board / Re: Get history of API calls made to EA
« on: September 24, 2024, 06:06:58 pm »
Thanks Geert, this will surely help me with my task

9
General Board / Re: Get history of API calls made to EA
« on: September 24, 2024, 04:40:16 pm »
Is there any for sqllite3 or MS Access which we can do, because (.qea) and (.eapx) uses them internally.

Thanks

10
General Board / Get history of API calls made to EA
« on: September 24, 2024, 04:12:48 pm »
Hello,

I have an application which communicates with EA using API to read/create/update entity in EA.

I want to know the history of API request which has been made in the API, along with their execution time from EA.

Is there any way to find out the following:
1. History of API request which has been made to EA
2. Execution time taken to process the given request

Thanks

11
General Board / EA behavior for multi-threaded environment
« on: September 23, 2024, 11:10:33 pm »
Hello,

I have created a multi-threaded application that communicates with EA system. Set-up for my application is as follows:

There are 5 threads: T1 to T5 which parallelly make request to EA system using API.

Out of all the above 5 threads, suppose request of third thread T3 is wrong request which results into pop-up to be displayed from EA application.
Because of pop-up, my EA application stops its processing for other threads request and all the remaining thread gets halted until the pop-up is not closed.

I want to perform following operation:
1. Fetch the text from pop-up and close the pop-up from the program.(Done)
2. Pass the pop-up to the thread which caused the pop-up. In my case third thread (T3)

I want to know about the following:
1. Is my understanding of EA stops processing further request until pop-up is not closed correct? I want the actual behavior of EA in multi-threaded environment.
2. Is there any way to identify which thread cause the pop-up to occur so that I can get to know which thread caused the issue?

Thanks

12
General Board / Pop-Up: Operation is not allowed when object is closed
« on: September 20, 2024, 04:41:08 pm »
Hello,

I am having a version-controlled package in EA which is syncing from source to other project of EA.
Operations I am performing,

1. While writing any create/update, first take check out of the package
2. Perform create/update operation
3. Perform check in of the package.

While performing this I am getting pop-up of operation is not allowed when object is closed..
Also, there are many requests going on parallelly on the same project at the same time.

Why do I get this type of error in version-controlled package, and how to solve this error or how to avoid this error?

Thanks

13
General Board / Re: API calls limit error from EA
« on: September 20, 2024, 04:31:58 pm »
Thank you Geert

14
Thank you Geert

15
General Board / API calls limit error from EA
« on: September 20, 2024, 03:18:23 pm »
Hello,

I have an integration in which I am integrating multiple projects of EA from to other projects of EA.

Projects used are: .qea(file based), and .eap(mysql database)

There are multiple read and write operations being performed on the projects at the same time parallelly for each entity that is present in the project. Each project has around 3 root nodes and 50 packages in each root node. And each package around 20-30 elements/diagrams in it.

I am getting pop-up of database lock on too many API calls on same project for the (.qea) file.

I want to understand why am i getting this pop-up for (.qea) file. Does EA internally apply some locking mechanism??

Thanks

Pages: [1] 2 3 ... 7