Question
Centene Corporation
US
Last activity: 10 Jun 2021 12:47 EDT
Testing for locks using isPageLocked(tools, pagename)
I have been struggling with coming up with a solution for disabling a button when the case viewed in recap mode has it's lock held by another. My research thus far has drawn me to the page https://community.pega.com/knowledgebase/articles/application-development/85/object-locking
and the suggestion I see that looks to be what I want is "To test whether a lock is held on a page already on your own clipboard, call the function rule isPageLocked(tools, pagename)."
I have tested this function and the return value has been false even when the lock is definitely held by another operator.
I also noticed that the method used in the function is (tools.getDatabase().getLockManager().isLocked(aPage, info) == true) however in the resources>API Engine>Database>LockManager documentation it is indicated that isLocked is a deprecated method.
There is a suggestion to use lockExists(String, StringMap)
instead. is there an OOTB function that uses this method instead? How does one call such a method outside of using a function if that is possible.