Book a Demo

Author Topic: package.update() exception  (Read 5873 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
package.update() exception
« on: November 19, 2013, 05:43:25 am »
Hi,

I'm running a loop on a selection of packages from an EA project to update a number of attributes.
To do so, I executed a SQL query to retrieve my packages and loaded them into an XmlNoteList via an XMLDoc.
I'm looping through the XmlNoteList, retrieving the EA.Package based on the guid, updating some attributes, and finally running package.update().
It works for a number of packages until it hits a package that throws the following exception :

StackTrace ... EA.IDualPackage.Update()
-            Keys      {System.Collections.ListDictionaryInternal.NodeKeyValueCollection}      System.Collections.ICollection

Any idea of what's going wrong? Do you need additional info ? (I'm running in debug mode)

thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: package.update() exception
« Reply #1 on: November 19, 2013, 10:23:12 am »
How does your update code look like? Is it GetPackageByGuid / edit / Update? If so, have you checked the Get returns a valid object?

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: package.update() exception
« Reply #2 on: November 19, 2013, 06:05:45 pm »
Also make sure you run the Project Integrity Check to make sure there are not inconsistencies in the package you are trying to update.

Geert