Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Bastian_ on January 30, 2023, 07:54:10 pm

Title: Access via Java / changes to model not represented / stale data in <model>.qea?
Post by: Bastian_ on January 30, 2023, 07:54:10 pm
Hi,
I have a problem with stale data, which happens when accessing an EA model through the Java interface while it is also opened in EA.

I see the following happening:
1. I have my <model>.qea open in Enterprise Architect v16 (Build 1604) and did some changes (usually to the model elements or diagrams-layouts). In the file system at this point, a <model>.qea-journal file exists.
2. Without closing the file in Enterprise Architect, I start a self-written Java-program (which uses org.sparx.Repository) to extract information from the <model>.qea file (export diagrams as images and export parts of the model as XMI).

Problem: the changes already done to the model in Enterprise Architect are not represented in the data I extract through the Java program.

I suspect, this might happen, as the Java is explicitly accessing the <modeL>.qea and the changes have not yet been flushed to that file but reside in the <model>.qea-journal?
Once I have closed the file in EA, the Java program extracts the corrrect data including all changes done via EA.


So my questions are:
1. Is what I suspect correct - if not, what is causing this?
If yes:
2. Is there something I can do from the Java-program's side, make EA flush changes from the Journal into the model-file?
3. Is there an interaction within EA (alas there is no "Save now" button), to make EA flush changes from the Journal into the model-file?

Any help would be greatly appreciated - thank you for reading this far
Bastian
Title: Re: Access via Java / changes to model not represented / stale data in <model>.qea?
Post by: Geert Bellekens on January 30, 2023, 08:38:30 pm
Start by trying again with the latest version. (16.1.1623)

There have been some reports of this type of weirdness using the early V16 versions

Geert
Title: Re: Access via Java / changes to model not represented / stale data in <model>.qea?
Post by: Bastian_ on January 30, 2023, 10:48:05 pm
Thank you for the quick advice! I'll try that and report back here, once I see the results.
Title: Re: Access via Java / changes to model not represented / stale data in <model>.qea?
Post by: Bastian_ on February 13, 2023, 08:20:24 pm
Hi Geert,
I've been running the latest Version of AE now for some time and the problem I had has not come up since then.
Thank's again, for your help
Bastian