Book a Demo

Author Topic: Remove Multiple Packages form Control  (Read 5008 times)

incanus

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Remove Multiple Packages form Control
« on: June 18, 2008, 05:12:55 am »
I need to know if there is a way to remove multiple packages from control at once.
I need to remove al branches from control and delete the repository but the only way i can do this is per package.
I woukd like to know if its posible to perform a "remove branche from control".
Best regards.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Remove Multiple Packages form Control
« Reply #1 on: June 19, 2008, 12:23:27 pm »
You can do it through automation.

Get a package object.
Remove VCCFG and CRC from Flags.
Set the XMLPath to an empty string.
Set IsControlled to false.
Call Update().

incanus

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Remove Multiple Packages form Control
« Reply #2 on: June 19, 2008, 09:58:03 pm »
ok, thanks for the answer.
best regards!

abruckner

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Remove Multiple Packages form Control
« Reply #3 on: February 16, 2011, 07:57:07 pm »
sorry to bring up this topic again, but it doesn't work for me.
using a c# plugin, I do the steps exactly as written above, but on package.Update EA crashes completely.

funny thing: EA crashes _after_ the changes are written to DB.

when using package.VersionControlRemove() EA tells me, the package is under project security.

using [package.Element.Locked = false;] before the update doesn't help either.


Error message at crash:
[406] System.Runtime.InteropServices.SEHException: External component has thrown an exception.
   at EA.PackageClass.Update()

Update: EA-Version is 8.0.860 Ultimate
« Last Edit: February 16, 2011, 09:16:34 pm by abruckner »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Remove Multiple Packages form Control
« Reply #4 on: February 16, 2011, 08:01:32 pm »
The other option is of course to do it directly on the database  :-/

Geert

abruckner

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Remove Multiple Packages form Control
« Reply #5 on: February 23, 2011, 08:44:24 pm »
as no other solution was postet here, I followed Geerts suggestion and did the removal by SQL.

here's what I do:
- get list of packages having IsControlled=true
- execute the update-sql to set xmlpath=null, IsControlled=0
- now loop through package-list, and remove the VCCFG & CRC flags.

step 3 allows the user to completely delete the version control setting's config afterwards.

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Remove Multiple Packages form Control
« Reply #6 on: March 09, 2011, 01:21:10 am »
Hi

thanks for the info
can you send the SQL Update query to remove only the VCCGF and CRC flags from the table PackageFlags whilst preserving the other info ?

cheers
Guillaume

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


abruckner

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Remove Multiple Packages form Control
« Reply #7 on: June 10, 2011, 07:13:16 pm »
sorry, I'm late in answering.
removal is not done by sql, but iterating through the package collection built in step 1.

everything else would be too database-specific. using EA.SQLQuery, best advice is to keep the statements as simple as possible.