• Scripting and WebDAV

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #14899  by ngovinda
 
I have created a script in a certain folder, so that when a new folder is created it gets renamed, see code below:
Code: Select all
import javax.jcr.*;
import com.openkm.core.*;
import com.openkm.bean.*;
import com.openkm.api.OKMDocument;

String userID = session.getUserID();
String parentDir = com.openkm.util.FileUtils.getParent(eventNode.getPath());
String docName = com.openkm.util.FileUtils.getName(eventNode.getPath());

if (eventType.equals("CREATE_FOLDER")) {
        session.move(eventNode.getPath(), parentDir + "/" +  userID + " " + docName);
        session.save();
}
This works well when OpenKM is accessed via a web browser.

But when I use a WebDAV client (e.g. NetDrive) this script does not work.

I am using version 5.1.7, build 7085.

Any one knows why this happens.

Thanks in advance

Govinda
 #14972  by ngovinda
 
I did try the newer versions (5.1.8, 5.1.8, etc. also the night build) but the script does not run on these newer versions, see my other post related to this

Regards - Govinda

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.