<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unlock node in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/unlock-node/m-p/124699#M34073</link>
    <description>&lt;P&gt;See if this is helpful, i had a similar issue so i documented the details here:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://javaworld-abhinav.blogspot.com/2020/06/unlock-node-in-alfresco-which-could-not.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://javaworld-abhinav.blogspot.com/2020/06/unlock-node-in-alfresco-which-could-not.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Mar 2021 15:40:36 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2021-03-01T15:40:36Z</dc:date>
    <item>
      <title>Unlock node</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/unlock-node/m-p/124697#M34071</link>
      <description>&lt;P&gt;I am trying to unlock node using cancel editing but due to some error, it is not getting unlock.&lt;/P&gt;&lt;P&gt;I am not able to perform any type of operation on that node.&lt;/P&gt;&lt;P&gt;How Can I forcefully unlock?&lt;/P&gt;</description>
      <pubDate>Sun, 28 Feb 2021 07:49:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/unlock-node/m-p/124697#M34071</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2021-02-28T07:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Unlock node</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/unlock-node/m-p/124698#M34072</link>
      <description>&lt;P&gt;If you know how to create javascript webscript, you can inspire from this one:&lt;/P&gt;&lt;PRE&gt;var nodeId = url.templateArgs.id;
var workNode = null;
var workNodeStatus = null;
model.msg = "";
model.nodeId = nodeId;

workNode = search.findNode("node", ["workspace", "SpacesStore", nodeId]);

if (workNode != undefined) {
        workNodeStatus = workNode.hasAspect("cm:lockable");
}

if (workNode == undefined) {
    status.code = 404;
    status.message = "Object " + nodeId + " not found.";
    status.redirect = true;
}

if (workNode != undefined &amp;amp;&amp;amp; workNodeStatus == true) {
        workNode.properties["cm:lockOwner"]="admin";
        workNode.unlock();
        workNode.properties["cm:lockOwner"]="admin";
        workNode.removeAspect("cm:lockable");
        workNode.save();
        delete workNode.properties["webdav:opaquelocktoken"];
        delete workNode.properties["webdav:lockScope"];
        delete workNode.properties["webdav:lockDepth"];
        workNode.save();
        model.msg = "is unlocked";
} else if (workNode != undefined &amp;amp;&amp;amp; workNodeStatus == false) {
    model.msg = "is not locked";
} else {
    status.code = 500;
    status.message = "Sorry, something went wrong. See log file.";
    status.redirect = true;
}&lt;/PRE&gt;&lt;PRE&gt;&amp;lt;webscript&amp;gt;
  &amp;lt;shortname&amp;gt;Unlock document&amp;lt;/shortname&amp;gt;
  &amp;lt;description&amp;gt;Unlock document&amp;lt;/description&amp;gt;
  &amp;lt;url&amp;gt;/AdminTools/unlock/{id}&amp;lt;/url&amp;gt;
  &amp;lt;format default="xml"&amp;gt;argument&amp;lt;/format&amp;gt;
  &amp;lt;authentication&amp;gt;user&amp;lt;/authentication&amp;gt;
  &amp;lt;transaction&amp;gt;required&amp;lt;/transaction&amp;gt;
  &amp;lt;cache&amp;gt;
        &amp;lt;never&amp;gt;true&amp;lt;/never&amp;gt;
  &amp;lt;/cache&amp;gt;
&amp;lt;/webscript&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;node&amp;gt;
    &amp;lt;id&amp;gt;${nodeId?xml}&amp;lt;/id&amp;gt;
    &amp;lt;updated&amp;gt;${xmldate(date)}&amp;lt;/updated&amp;gt;
    &amp;lt;message&amp;gt;${msg}&amp;lt;/message&amp;gt;
&amp;lt;/node&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Mar 2021 01:28:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/unlock-node/m-p/124698#M34072</guid>
      <dc:creator>sufo</dc:creator>
      <dc:date>2021-03-01T01:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unlock node</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/unlock-node/m-p/124699#M34073</link>
      <description>&lt;P&gt;See if this is helpful, i had a similar issue so i documented the details here:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://javaworld-abhinav.blogspot.com/2020/06/unlock-node-in-alfresco-which-could-not.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://javaworld-abhinav.blogspot.com/2020/06/unlock-node-in-alfresco-which-could-not.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 15:40:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/unlock-node/m-p/124699#M34073</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-03-01T15:40:36Z</dc:date>
    </item>
  </channel>
</rss>

