Book a Demo

Author Topic: Update() issues in Automation Interface  (Read 9837 times)

Alin Dobre

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Update() issues in Automation Interface
« on: July 22, 2009, 09:31:51 am »
Hello Everyone,

Have any of you run into a problem where every so often when updating an element the notes field gets completey erased and you lose everything. It seems to have started since I downloaded build 846, but Im not sure. Im going to keep testing to see if its something on my end, just thought I would post the question.

Thanks in Advance.

Regards,

Alin Dobre  

kosh.iii

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Update() issues in Automation Interface
« Reply #1 on: August 17, 2009, 07:56:20 pm »
I have a probably similar problem when updating a lot of infornation on diagrams or add tons of diagram links for a connector. Sometimes the memory consumption will just skyrocket and a few seconds after that a .GetConnectorByGuid or .GetConnectorByGuid will not find the desired object any more.

Have you checked if you really only loose the notes field?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Update() issues in Automation Interface
« Reply #2 on: August 17, 2009, 09:45:32 pm »
Have you ensured that you have called Update on all new connectors? And have you called Refresh on all the collections to which the connectors have been added?

Until a parent collection has had Refresh called EA cannot 'see' new member items. Whether this extends to the repository as a whole (this covering retrieval by GUID) I cannot say.
No, you can't have it!

almacivor

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Update() issues in Automation Interface
« Reply #3 on: August 18, 2009, 06:20:24 pm »
I'm having a similar issue.
I'm creating a new connector, and I call update, and then refresh the collections as follows:

con.SetClientID(srcEl.GetElementID());
con.SetSupplierID(tgtEl.GetElementID());
con.Update();
srcEl.GetConnectors().Refresh();
tgtEl.GetConnectors().Refresh();

However, I still get a null pointer when I call getConnectorbyGUID later!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Update() issues in Automation Interface
« Reply #4 on: August 19, 2009, 12:53:17 am »
Perhaps you need to reload the project. There is a method to do that. I think it belongs to the Project class, but it could be Repository instead.
No, you can't have it!

almacivor

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Update() issues in Automation Interface
« Reply #5 on: August 19, 2009, 10:15:19 pm »
gave that a go but it didn't seem to get me anywhere.

Interestingly, the connections it's being funny with are compositions - which EA seems to insist upon drawing the wrong way round...

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Update() issues in Automation Interface
« Reply #6 on: August 19, 2009, 11:14:48 pm »
There is an option somewhere to change the direction EA draws compositions.

Geert

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Update() issues in Automation Interface
« Reply #7 on: August 20, 2009, 09:05:23 am »
Quote
...somewhere...
When the Links page of the Tools | Options dialog was added this option migrated there. I still have trouble remembering where it has moved. [But it's only been about two years...]
No, you can't have it!

almacivor

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Update() issues in Automation Interface
« Reply #8 on: August 20, 2009, 07:21:57 pm »
excellent.
thats been irritating me for about 2 years now.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Update() issues in Automation Interface
« Reply #9 on: August 21, 2009, 11:20:25 am »
Quote
gave that a go but it didn't seem to get me anywhere.

Interestingly, the connections it's being funny with are compositions - which EA seems to insist upon drawing the wrong way round...
EA Compositions are (certainly used to be) internally self inconsistent.  You can find postings by me on the subject dating 5-6 years back.

Since EA itself in reverse engineering DOESN'T use EA Compositions I took the hint and have avoided their use completely.  We use normal Asscoaitions with the aggregation set appropriately.

This seems another reason for that avoidance...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Update() issues in Automation Interface
« Reply #10 on: August 21, 2009, 12:08:16 pm »
Quote
EA Compositions are (certainly used to be) internally self inconsistent.  You can find postings by me on the subject dating 5-6 years back.

Since EA itself in reverse engineering DOESN'T use EA Compositions I took the hint and have avoided their use completely.  We use normal Asscoaitions with the aggregation set appropriately.

This seems another reason for that avoidance...

Paolo
Yes!

What Paolo says!

All of it!

The man knows of what he speaks.
No, you can't have it!