Hello
This is my first post as I am just starting to learn OpenKM.
So far it is looking like a very promising tool
I have a folder structure like this:
Projects
---Project1
------Offer
------Order
------Specification
---Project2
------Offer
------Order
------Specification
etc.
When i upload a new document to say the "Offer" subfolder, i would like to add the category "Offer" to the document.
I have the following automation script, but I can't figure out where to go from here.
Any help would be very much appreciated !
Cheers Kurt
Edit:
OpenKM 6.3.9 build e57b626
From https://hub.docker.com/r/openkm/openkm-ce
Chrome Browser
Win10 with Docker Desktop
This is my first post as I am just starting to learn OpenKM.
So far it is looking like a very promising tool
I have a folder structure like this:
Projects
---Project1
------Offer
------Order
------Specification
---Project2
------Offer
------Order
------Specification
etc.
When i upload a new document to say the "Offer" subfolder, i would like to add the category "Offer" to the document.
I have the following automation script, but I can't figure out where to go from here.
Any help would be very much appreciated !
Code: Select all
import com.openkm.api.OKMFolder;
import com.openkm.api.OKMDocument;
import com.openkm.api.OKMRepository;
import com.openkm.api.*;
import com.openkm.util.PathUtils;
import com.openkm.bean.*;
import java.util.*;
String documentPath = OKMRepository.getInstance().getNodePath(null, uuid);
///String pathp = pathm.substring(0,pathm.lastIndexOf("/"));
if( documentPath.contains("/Offer/") )
{
//Get a pointer to the created document
Document doc = OKMDocument.getInstance().getProperties(null, uuid);
//Get current categories
Set<Folder> cats = doc.getCategories();
//Append category "Offer"
?
Cheers Kurt
Edit:
OpenKM 6.3.9 build e57b626
From https://hub.docker.com/r/openkm/openkm-ce
Chrome Browser
Win10 with Docker Desktop