Hello!
I'm currently experimenting with an implementation of OpenKM 6.2 on Ubuntu 12.10. So far it seems like a great system, though I'm stuck at the "ExecuteScripting" action under the Automation tab. I'm using the Community version, so I don't have access to some of the fancier, pre-made scripts available with Professional.
What I'm trying to do is when a user uploads a document to a particular folder, automatically tag that new file with a keyword and default category (with the hopes that the wizard can still prompt the user for additional metadata, but there will at least be 1 default keyword and 1 default category set by the system). More importantly, I would also like to be able to assign a particular Property Group based on whatever folder the new file is going into (for example, for a folder containing Invoices, I'd like to assign a property group containing appropriate fields for filing invoices). I could accomplish this on an implementation of OpenKM 5.10 (by assigning a script at the folder level in Repository view), but Repository view doesn't seem to be an option in 6.2. My script thus far is:
I'm currently experimenting with an implementation of OpenKM 6.2 on Ubuntu 12.10. So far it seems like a great system, though I'm stuck at the "ExecuteScripting" action under the Automation tab. I'm using the Community version, so I don't have access to some of the fancier, pre-made scripts available with Professional.
What I'm trying to do is when a user uploads a document to a particular folder, automatically tag that new file with a keyword and default category (with the hopes that the wizard can still prompt the user for additional metadata, but there will at least be 1 default keyword and 1 default category set by the system). More importantly, I would also like to be able to assign a particular Property Group based on whatever folder the new file is going into (for example, for a folder containing Invoices, I'd like to assign a property group containing appropriate fields for filing invoices). I could accomplish this on an implementation of OpenKM 5.10 (by assigning a script at the folder level in Repository view), but Repository view doesn't seem to be an option in 6.2. My script thus far is:
Code: Select all
Is there something different about how the scripts work in 6.2? Should I be importing from a different package? I've been checking out the Doxygen documentation, but I'm honestly a bit puzzled by it. Any help would be appreciated!import com.openkm.api.*;
OKMProperty.getInstance().addKeyword(session.getUserID(),eventNode.getPath(),"zebra");
eventNode.setProperty("okm:keywords", new String[]{"maligno"});
OKMPropertyGroup.getInstance().addGroup(session.getUserID(), eventNode.getPath(), "okg:technology");
eventNode.save();