Issue with Unlock Pega API method
In a multi node environment in IAC session, developer is using Unlock API method to unlock the Workobject held by same operator id in different requester session but it fails some times, that is the lock on the Work object is not released and developer sees the lock when trying to do some actions on the Work object.
No Error Message users sees lock screen when the work object is open.
Steps to Reproduce
1.In an IAC session, access a Work object with OperatorId A in requestor session-1.
2.Login with same operator in the requestor sesssion-2.
3.Try to access the same work object after unlocking the work object by an activity using API method unLock. Observe that the lock on the Workobject is not released.
An issue in the custom application code or rules.
Developer is using a batch requestor to release the lock, and inorder to release the lock developer is passing pzInskey as parameter to the unlock API.
However developer must pass UserName and Password to release the lock.
Below is the code snippet to resolve the issue:
java.lang.Object obj = tools.getRequestor().queueBatchActivity("TeSE-SE-Work","UnlockWO",tools.getParameterPage(),null,null,false);
Note: According to the guard rail, it is not suggested to use a Batch Requestor or an agent to release the lock on work object.
0% found this useful