• Document move automation

  • 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.
 #41820  by openkm_user
 
Hi,

I have created an Automation rule on Document creation, like with validation NameContains -> String:_default and action AddKeyword -> Keyword:default which works fine. But when I do the same on Document move, it doesn't work.

Only change is in the event (Document creation to Document move), what is wrong with this, please advice.

Thanks in advance!
 #41832  by jllort
 
On each event are saved some data to be analyzed by validations ( data is not always the same, for example on move, a relevant data is where the document will be moved ).

If you take a look at dbDocumentModule.java are saved these data into the environment:
Code: Select all
Map<String, Object> env = new HashMap<String, Object>();
env.put(AutomationUtils.DOCUMENT_UUID, docUuid); // document uuid
env.put(AutomationUtils.FOLDER_UUID, dstUuid); // folder destination uuid
if you take a look at NameContains.java implementation it evaluates the node:
Code: Select all
Object node = AutomationUtils.getNode(env);
If you look into getNode(env) implementation you'll see you are evaluating the document name, not the folder name.

I suggest configure the OpenKM portable to follow the code https://sourceforge.net/projects/openkmportabledev/

On latest version we are having a table what indicates for each event which values are saved into the map, what makes more easy understanding what's happening on validation and action. Unfortunately this table is not present in version 6.3

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.