• Category Control

  • Do you want to create a native client or integrate with third party applications: webservices are the solution.
Do you want to create a native client or integrate with third party applications: webservices are the solution.
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.
 #27924  by alexandre
 
Hi,

I trying integrate openKM with a java application, but i have some bugs:

1_ When i try to create a category using:
Code: Select all
OKMProperty_Service okmPropertyService = new OKMProperty_Service();
OKMProperty okmProperty = okmPropertyService.getOKMPropertyPort();
okmProperty.addCategory(token, pathCategory, "Test");
I got an error in taxonomy. So i clear the category table using query and restores the normal condition.

2_ I finnaly create categories by using okmFolder, and in frontend woks well, but i fail to associate this category to an document:
Code: Select all
Document doc = new Document();
doc.setPath("/okm:root/Edital");
byte[] content;
try (FileInputStream fis = new FileInputStream(arquivoLocal)) {
    content = new byte[fis.available()];
    fis.read(content);
}

Folder folder = new Folder();
folder.setPath(pathCategory + "/" + categoria);
doc.getCategories().add(folder);

Document newDoc = okmDocument.create(token, doc, content);

What i doing wrong?
 #27933  by alexandre
 
I sucessfullty associate a category with a document.
I control category using Folder webservice and use Property webservice to associate a dcoment with one category.
Works well but i notice a bug.
If you delete a folder with files associated with a category you can never delete this category. The file doesn't exists anymore, but the association persists.
If exits any query to erase this associatin please inform.
 #27953  by jllort
 
Really files exists in trash. The logic is "if you got some existing association with category" in this case you still got associated files in trash, the category can not be removed. Try to purge trash and tell us if that solved the problem.
 #28044  by alexandre
 
After purge the trash i have no problem deleting the category.
Thanks for your help.
 #28242  by online100
 
I sucessfullty associate a category with a document.
I control category using Folder webservice and use Property webservice to associate a dcoment with one category.
Works well but i notice a bug.
If you delete a folder with files associated with a category you can never delete this category. The file doesn't exists anymore, but the association persists.
If exits any query to erase this associatin please inform.
 #28255  by jllort
 
It's not a bug, if a feature. Really when you delete document that goes to user trash, and finally it removes it doing empty trash or clean specific object. If you have not purged the document still exists link between document and category. Purge it and you'll get document definitively removed and will be able to delete category.

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.