Author Topic: Deleting Packages  (Read 596 times)

JenniferS

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Deleting Packages
« on: May 17, 2018, 02:00:11 am »
I'm getting an error when trying to delete an old Package that states "The selected item is currently locked, or contains items that are currently locked.  It cannot be deleted at this time."  The issue is that this package doesn't have any items that are locked by anyone but myself, and I have admin privileges, so this shouldn't be an issue.  This package only contains empty folders.

My team is currently using EA 13, but this particular model has been through multiple upgrades (first EA 10, then EA12).  Has anyone else encountered this issue and know how to fix it?

qwerty

  • EA Guru
  • *****
  • Posts: 9495
  • Karma: +156/-144
  • I'm no guru at all
    • View Profile
Re: Deleting Packages
« Reply #1 on: May 17, 2018, 02:19:27 am »
Whether you're admin or not is irrelevant here. What kind of locking do you have? If RULtE then lock the package, else unlock ist. Eventually run the reverse operation prior to that.

q.

JenniferS

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Deleting Packages
« Reply #2 on: May 17, 2018, 03:46:08 am »
This is a case of EA acting in a way it shouldn't.  Normally to delete a package, I would lock the model, then lock the package and its children, then delete it.  Unfortunately, I keep getting told that there are locked elements in the package when I'm the only person who has anything locked.  For grins, I've tried it with the package and its children unlocked and the same message shows up.

I mentioned being an admin because non-admin users tried deleting these packages and were told they did not have the necessary permissions.

I've also tried repairing the model to see if would help, and it didn't.

qwerty

  • EA Guru
  • *****
  • Posts: 9495
  • Karma: +156/-144
  • I'm no guru at all
    • View Profile
Re: Deleting Packages
« Reply #3 on: May 17, 2018, 06:12:13 am »
As an admin you can force lock/unlock elements. I guess there are elements locked to someone else. You need to unlock them first.

q.

JenniferS

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Deleting Packages
« Reply #4 on: May 17, 2018, 06:36:26 am »
I've forced all elements from other users to be unlocked and locked them myself.  I've also had all other users exit the model.  Unfortunately, the problem persists despite these actions.

qwerty

  • EA Guru
  • *****
  • Posts: 9495
  • Karma: +156/-144
  • I'm no guru at all
    • View Profile
Re: Deleting Packages
« Reply #5 on: May 17, 2018, 06:49:37 am »
You might run a SQL to find out the locked elements -and eventually force unlock the same way. Can't look today, but will check tomorrow (unless anyone else comes up with a brilliant idea).

q.

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6381
  • Karma: +54/-5
    • View Profile
Re: Deleting Packages
« Reply #6 on: May 17, 2018, 08:40:46 am »
At a guess, locked note/text/boundary elements on a diagram inside that package.
Simon

support@sparxsystems.com

Nizam

  • EA User
  • **
  • Posts: 301
  • Karma: +8/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Deleting Packages
« Reply #7 on: May 17, 2018, 09:37:07 am »
I've forced all elements from other users to be unlocked and locked them myself.  I've also had all other users exit the model.  Unfortunately, the problem persists despite these actions.

Your error message usually reports the element name / diagram name that is causing this behavior. But if you have empty packages and the error is still showing up.
You can also consider to disable security (retaining locks) briefly and perform the necessary cleanup and re-enable security.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8264
  • Karma: +198/-23
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Deleting Packages
« Reply #8 on: May 17, 2018, 01:54:28 pm »
And run a project integrity check to get rid of any rogue elements that might be causing this issue.

Geert

VKN

  • EA User
  • **
  • Posts: 187
  • Karma: +9/-1
    • View Profile
Re: Deleting Packages
« Reply #9 on: May 17, 2018, 03:24:33 pm »
Did you try this method?
http://www.sparxsystems.com/enterprise_architect_user_guide/14.0/team_support/managelocks.html

Do you have any diagrams in that package with note or other elements which don't appear in the Project Browser?
If those elements are locked by other user then you won't be able to delete them.

qwerty

  • EA Guru
  • *****
  • Posts: 9495
  • Karma: +156/-144
  • I'm no guru at all
    • View Profile
Re: Deleting Packages
« Reply #10 on: May 17, 2018, 07:40:11 pm »
Run this query in the SQL Scratch Pad (Ctrl-F; Edit Icon somewhere top right); right tab):
Code: [Select]
select * from t_object where style like "*Locked=true*"It will list all locked elements. Note that this is for EAP files. Other RDBMS want a % rather than a * in the above search.

Further
Code: [Select]
select * from t_diagram where locked = truewill list all locked diagrams.

Not sure about locks for other things, but that might do as start.

q.

JenniferS

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Deleting Packages
« Reply #11 on: May 18, 2018, 01:16:52 am »
I was not able to locate the mystery locked elements with the SQL searches.  However, disabling security did allow me to perform the necessary cleanup, and I was able to enable security again without any issue.

Thank you all so much for your responses!  :)

qwerty

  • EA Guru
  • *****
  • Posts: 9495
  • Karma: +156/-144
  • I'm no guru at all
    • View Profile
Re: Deleting Packages
« Reply #12 on: May 18, 2018, 06:48:41 am »
I was about suggesting that, but then thought that setting up security groups once again wouldn't weigh up this step.

q.

Nizam

  • EA User
  • **
  • Posts: 301
  • Karma: +8/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Deleting Packages
« Reply #13 on: May 21, 2018, 10:08:04 am »
I was not able to locate the mystery locked elements with the SQL searches.  However, disabling security did allow me to perform the necessary cleanup, and I was able to enable security again without any issue.

Thank you all so much for your responses!  :)

Glad it helped!