Support Article
Work object locked when assignment opened from email link
SA-5670
Summary
When a user with supervisory role opens an assignment through an email link (to review the work object), the assignment is opened in a browser (IE) but close option is not provided in the UI. As the user closes the browser using the close window button the lock remains on the work object. The lock will remain for the next 2 hours, preventing other users to process the assignment accordingly.
Error Messages
No error message. Observed an undesirable behavior where the work object is locked eventhough the end user has closed the browser session.
Steps to Reproduce
The scenario details:
1. Director click on email link to open a case in Review mode
2. Director click on the assignment task to open in perform mode
3. At this point Director is not going to complete the assignment, just reviewing the details or require further clarification
4. Director can only close IE session by clicking the 'X' (top RH corner - close button of the browser)
5. Case is still locked with the Director, no other use can work on the case until 2 hours timeout
6. This 2 hours may cause SLA violation and is very critical to certain case types
Root Cause
The handling of the unlocking of a work object is done at the close button. Since the harness does not have a close work object button, the lock remains there.
Resolution
The following local change has been suggested to the customer, to add an event listener onbeforeunload, and close the session then.
- Open Code-Security.EndSession and save as Code-Security.EndSessionExternal.
- Change the first step of EndSessionExternal from Show-HTML to Show-Property. (The Show-Property step will just return "GOOD").
- Add a .js file to the perform harness rule used to open the work object from the link in the email. Put this in the JS below.
window.onbeforeunload = logoff_onbeforeunload;
function logoff_onbeforeunload() {
if (window.event.clientY < 0 && (window.event.clientX > (document.documentElement.clientWidth - 5) || window.event.clientX < 15)) {
var oXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
oXmlHttp.Open("POST", document.forms[0].action, false);
oXmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
oXmlHttp.Send("pyActivity=Code-Security.EndSessionExternal&ReviewFormName=ConfirmExternal");
}
}
function logoff_onbeforeunload() {
if (window.event.clientY < 0 && (window.event.clientX > (document.documentElement.clientWidth - 5) || window.event.clientX < 15)) {
var oXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
oXmlHttp.Open("POST", document.forms[0].action, false);
oXmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
oXmlHttp.Send("pyActivity=Code-Security.EndSessionExternal&ReviewFormName=ConfirmExternal");
}
}
The local change has been used by some projects but under a different scenario. This local change is considered a suggestion and have not been confirmed accepted.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.