Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: karindeboer on March 22, 2018, 04:21:24 am
-
Hello,
I'm new here and I'm using EA for my work. I've encountered a for me unsolvable problem. I've made some tables and mysteriously one of them became locked, without me having locked that element in the element context menu. I read that somebody had the same problem and has unlocked the element in the DB Table of EA. But I have no idea how to do that. Does anyone have a solution for my problem?
Karin
-
You can also try viewing locks from 'Manage Locks' (Configure -> Locks (in Security)), if have rights for this, you can unlock the item
-
Considering the red exclamation mark I think the two tables are locked as in locked by another user. I think the cause of the locking is that I encountered problems with my Citrix-remote EA-sessions. Our helpdesk has ended the connections in the Citrix Connection Centre. I think there are still sessions open on the server, which make that EA "thinks" that those tables are in use by another user (me).
EA-documentation (UML Model Management) says this about it:
Share Projects on Network Drive
The easiest way to share a project amongst a work group of developers and analysts is to place the project file
on a shared network drive and have people connect concurrently from their Workstation.
Note:
Enterprise Architect accepts a number of concurrent connections without issue, although there can be
occasional 'lock-outs' when one user tries to access or update something another user is in the process of
modifying.
I hope this is the information you're looking for. I've made images of the locked tables and the inactive option under Manage My Locks (all kind of locking-options are inactive), but don't know yet how to upload this to this post. It could give more information.
-
There is no automatic locking of used elements in EA.
Locking and unlocking is something you do manually, so this will not be caused by any Citrix issues.
The red exclamation indicates that another user has locked the elements.
You will not see those locks in the "Manage My Locks" dialog (shows only your locks), but you can remove the locks from the "Manage Locks" dialog (shows all locks).
Geert
-
Hello Geert,
You write there is no automatic locking of used elements in EA, but I did not lock these elements on purpose. For that reason I can’t remember how to unlock them. And you’re right that a lockout means something different than putting a lock on an element..
The red exclamation indicates that another user has locked the elements, but I’m 99,99% sure that no other user is or has been working on this project. Therefore it’s still a mystery to me. You say I can remove the locks from the "Manage Locks" dialog (shows all locks). I have searched all menus for an unlock-option and could not find an active option. Can you yell me the path where I can find that option?
-
Karin,
The option you are looking for is found at
Configure | Security | Locks (v14)
Project | Security | Manage Locks (v12)
see http://www.sparxsystems.com/enterprise_architect_user_guide/13.5/team_support/managelocks.html (http://www.sparxsystems.com/enterprise_architect_user_guide/13.5/team_support/managelocks.html)
But if security is not enabled, or there are no locks to be found in the Manage Locks dialog then you have a weird case.
The easiest way to solve it is to go into the database and remove the locks using an SQL query.
Locks are stored in the t_seclock table so a
delete from t_seclockWould do the trick.
Geert
-
Hi Geert,
I'm working with Enterprise Architect 13.5. So the option to use is Configure | Security | Locks (v14). Security is not enabled. I found the option Configure | Security | Locks, but the option 'Locks' is inactive, so I can't choose that. In fact: all the options that have to do with locking are inactive. I guess I have, as you call it, a weird case...
I don't have administrator-rights on EA, so I will pass your information about the table where locks are stored in EA to our helpdesk. I hope they can manage to solve my problem that way.
Thanks for your help!
-
Hi Karin,
In that case I guess you really have a curious case.
what you can quickly do to check if that is the problem is execute a query to find out if there are any locks in the system (although security is not turned on)
Go to the model search window, click on the edit button, select the SQL scratch pad and execute following query
select * from t_seclocks
If you have any results here then that is the culprit.
You can then write a little script to remove those locks from the database directly.
Geert
-
I ran the select statement but it returned 0 results. Maybe that's because I don't have administrator rights on the EA-database?
-
No, you don't need administrator access to query the table.
At this point I would contact Sparx support and have them look at it.
You can send an email to [email protected]
Geert
-
Hello Karin,
Please run
select * from t_secpolicies
in your database and post the results.
/Uffe
-
Hello Uffe,
I've copied the sql in the SQL Scratchpad under Start -> Search -> Search in Model -> Find in Project. I got the reply: search returned 0 results. Could it be that the search is not "reaching" the EA-data itself but only the data generated in my project. I'm just a user of EA and not the administrator of EA.
-
No, that means there is no user security configured in the project and (I'm pretty sure) there never has been. Meaning the locks shouldn't be there.
Access-wise, there's no limitation on what you can view through the GUI or select from the database, so checking this stuff does not require admin privileges. And in any case, there is no admin for this project because security is not enabled.
What you might try, after ensuring you've got backups and stuff et cetera, is enable security (http://www.sparxsystems.com/enterprise_architect_user_guide/13.5/team_support/usersecurity2.html), use the admin account to clear all locks, and then disable security again.
There is also another obscure type of lock, although it shouldn't show up with exclamation marks.
You can test for it with a project browser script (go into the Scripting window, create a 'Project Browser' script group, and create a VBScript in that group) like this:
option explicit
!INC Local Scripts.EAConstants-VBScript
sub OnProjectBrowserScript()
dim treeSelectedType
treeSelectedType = Repository.GetTreeSelectedItemType()
Repository.EnsureOutputVisible("Script")
select case treeSelectedType
case otPackage
dim package as EA.Package
set package = Repository.GetTreeSelectedObject()
Session.Output "Package '" & package.Element.Name & "' locked: " & package.Element.Locked
case otElement
dim element as EA.Element
set element = Repository.GetTreeSelectedObject()
Session.Output "Element '" & element.Name & "' locked: " & element.Locked
case else
Session.Prompt "This script does not support items of this type.", promptOK
end select
end sub
OnProjectBrowserScript
Just replace everything EA puts in the script for you with the above, then right-click one of the offending elements / packages and select Script - (whatever you called your script). If it says False, it's not locked in that way either.
/Uffe
-
Hello Uffe,
I tried to Enable Security, but EA asks for an authorization key, which I don't have. I also couldn't insert one: the OK-button stays inactive. I think our ICT-supplier does have that key, because yesterday they used one when we were trying to solve another issue with EA.
Next I ran the script on the three locked table and one table that isn't locked. It returned Waar (True) on the three locked tables and Onwaar (False) on the unlocked table. So it must be the kind of unusual lock you were mentioning in your post.
Do you know how to unlock that kind of lock?
Gr. Karin
-
Something strange is happening with locks, If I were you, I'll try to get the Security Key to Enable Security, and clear all the locks (logging in as administrator) and disable security again.
-
My 2 cent: get professional help. I would not let a rookie repair the brakes of my car.
q.
-
I tried to Enable Security, but EA asks for an authorization key, which I don't have. I also couldn't insert one: the OK-button stays inactive. I think our ICT-supplier does have that key, because yesterday they used one when we were trying to solve another issue with EA.
Next I ran the script on the three locked table and one table that isn't locked. It returned Waar (True) on the three locked tables and Onwaar (False) on the unlocked table. So it must be the kind of unusual lock you were mentioning in your post.
Do you know how to unlock that kind of lock?
Hello again,
Sorry I've been away for a few days -- Easter is a four-and-a-half day weekend in Sweden. :)
I have good news for you.
The locks I was talking about appear to have changed their behaviour some time between EA 11.1 and 13.5. I'm pretty sure they didn't use to be displayed with exclamation marks in the project browser, and that's what's got everyone on the forum confused -- myself included.
I have now verified that in 13.5 these locks are in fact always shown with red exclamation marks in the project browser. This is the case even in a project without user security, and even if you yourself are the user who has locked them. I would surmise that with this kind of lock, EA does not track which user has locked what, so there are only two possibilities -- locked or unlocked, red mark or none.
By contrast, when using EA's user security functionality, packages and elements locked by you (that is, the user running this instance of EA) are shown with blue exclamation marks, and those locked by someone else are shown with red ones. Elements which are not locked by anyone have no exclamation mark at all.
In both cases, locks are semi-permanent: they survive the session, and are not automatically released when you exit EA or close the project. They must be released explicitly.
Enabling user security requires a special key, which is available from the registered user section on Sparx' web site. You will have received login credentials for this site when you bought your license. Unfortunately, however, EA's licenses are essentially in two parts: usage and support. The usage portion is perpetual, meaning the license does not expire and you can keep using EA forever. The support portion, which is what these login credentials give you access to, requires annual renewals. It covers all upgrades released in that year (including major-version releases), as well as the user security key and several other things as well. So if you have allowed your one-year support license to expire, you can't get hold of the key required to enable user security.
But I'm including all that merely for completeness. You don't actually need the user security key, because user security is not at play here.
What's happened is simply that someone has applied these locks and then forgotten about it.
If there are only a few of these locks, the simplest solution is as follows.
For locked elements and packages:
- Locate a locked element (or package) in the project browser.
- Right-click and select "Find in All Diagrams" or hit Ctrl-U. If the element is only in one diagram, it opens; otherwise, you're presented with a list. Open any diagram in that list.1
- Locate the element in the diagram.
- Right-click the element in the diagram. About a quarter way from the bottom of the context menu, there's an item "Lock Element..." It should be ticked; select it to unlock the element.
1 If there are no results at all, the selected element/package is not shown in any diagrams. For these, simply create a temporary diagram of any type (except sequence or timing), drag the elements/packages into the diagram, unlock them and delete the diagram.
For locked diagrams:
Simply open the diagram and right-click an empty area in it. Again about a quarter way from the bottom of the context menu, the item "Lock Diagram" should be ticked. Select it to unlock the diagram.
If there are many locks in your project, create a project browser VBScript called "Release Locks" with the enclosed contents. Run it once on each root node in the project browser, then restart EA to make sure the GUI is completely refreshed.
Please note that while I'm as confident as I can be in my diagnosis, this is all done remotely and I can't offer any guarantees or accept any responsibility for things going wrong. Make sure you have a full backup of your project before you make any changes to it.
Hope this helps,
/Uffe
option explicit
!INC Local Scripts.EAConstants-VBScript
sub UnlockElement(element)
if (element.Locked) then
element.Locked = false
element.Update()
end if
dim diagram as EA.Diagram
for each diagram in element.Diagrams
UnlockDiagram diagram
next
element.Diagrams.Refresh()
dim child as EA.Element
for each child in element.Elements
UnlockElement child
next
element.Elements.Refresh()
for each child in element.EmbeddedElements
UnlockElement child
next
element.EmbeddedElements.Refresh()
end sub
sub UnlockPackage(package)
UnlockElement package.Element
dim diagram as EA.Diagram
for each diagram in package.Diagrams
UnlockDiagram diagram
next
package.Diagrams.Refresh()
dim element as EA.Element
for each element in package.Elements
UnlockElement element
next
package.Elements.Refresh()
dim child as EA.Package
for each child in package.Packages
UnlockPackage child
next
package.Packages.Refresh()
end sub
sub UnlockDiagram(diagram)
if diagram.IsLocked then
diagram.IsLocked = false
diagram.Update()
end if
end sub
sub OnProjectBrowserScript()
dim treeSelectedType
treeSelectedType = Repository.GetTreeSelectedItemType()
Repository.EnsureOutputVisible("Script")
select case treeSelectedType
case otElement
dim element as EA.Element
set element = Repository.GetTreeSelectedObject()
UnlockElement element
Session.Output "Done."
case otPackage
dim package as EA.Package
set package = Repository.GetTreeSelectedObject()
UnlockPackage package
Session.Output "Done."
case otDiagram
dim diagram as EA.Diagram
set diagram = Repository.GetTreeSelectedObject()
UnlockDiagram diagram
Session.Output "Done."
case else
Session.Prompt "This script does not support items of this type.", promptOK
end select
end sub
OnProjectBrowserScript