Author Topic: Security Lock for all elements of a package  (Read 7689 times)

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Security Lock for all elements of a package
« on: May 29, 2013, 12:09:26 am »
Hello,

Is this a simple way to apply security lock on all elements of the selected package using API? I don't want to use recursion, loop by and so on.

Thanks.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13287
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re:  Security Lock for all elements of a package
« Reply #1 on: May 29, 2013, 03:38:49 pm »
I think the simplest (and most elegant) way would be to create an operation to lock all elements of a packages, and call that on all subpackages recursively.

You could of course first get a flat list of elementIDs using query of some kind, and then get all those elements and lock them in a plain (non resursive) iteration.
Or you could even insert all the necesarry records in t_seclocks yourself, but that would all be much more complicated then a simple recursive operation call.

Geert

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Re:  Security Lock for all elements of a package
« Reply #2 on: May 29, 2013, 04:19:22 pm »
Thanks a lot. I wanted to avoid it, but your answer is very clear.