Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: zalbina on May 29, 2013, 12:09:26 am

Title: Security Lock for all elements of a package
Post by: zalbina 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.
Title: Re:  Security Lock for all elements of a package
Post by: Geert Bellekens 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
Title: Re:  Security Lock for all elements of a package
Post by: zalbina on May 29, 2013, 04:19:22 pm
Thanks a lot. I wanted to avoid it, but your answer is very clear.