• 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.
 #27785  by hbuus
 
I'm trying to follow these instructions from the page below in order to enable automation in the latest Community-version of OpenKM:
http://wiki.openkm.com/index.php/Enable_automation

Here's what it says on the page above:

OpenKM community version

Available validations:
PathContains
Available actions:
ExecuteScripting
Enable automation validation
Go to Administration > Database query section and execute:
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01 ) VALUES ('post','com.openkm.automation.validation.PathContains', 'PathContains', 'validation', 'text', 'okm:folder', 'String', '', '', '');
Enable automation actions
Go to Administration > Database query section and execute:
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01 ) VALUES ('post','com.openkm.automation.action.ExecuteScripting', 'ExecuteScripting', 'action', 'textarea', '', 'Script', '', '', '');


However I get an error message when I go to the Database query section and try to execute the first of the two lines above.
Attached is a screenshot which shows the error message in red.

Can anyone see what I'm doing wrong?

I love OpenKM so far. What an advanced and smart program!! :)

Thanks!

Best,
Henrik
Attachments
OpenKM Enable Automation Validation.jpg
OpenKM Enable Automation Validation.jpg (201.2 KiB) Viewed 5196 times
 #27808  by jllort
 
Add columns AMD_ID, with value 1 etc... depending the database sql could have minimal changes.

Do table select OKM_AUTO_METADATA to see all table columns.
 #27845  by hbuus
 
Thanks for looking at this - I must have made a mistake before, because now it works!

I do this:

1. Copy line 1, goto Administration->Database query, insert as text, do not press enter after text, choose Hibernate, click Execute SQL Script.
2. Copy line 2, and follow the steps in 1.

It works! Automation is now turned on :)
 #27846  by hbuus
 
Ok, I was too quick to rejoice before - Automation is indeed turned on, but I can't define any rules.

If you look at the screenshot I've attached, there is nothing to choose from the two drop-down menus Add validation and Add action.

How can that be?

PS. I defined an automation rule and named it Add Property Group.
It is set as Active.
It is when I click on this automation rule's definition that the screenshot comes up and I can't select anything from the drop-down menu there.
Attachments
OpenKM Enable Automation Validation2.jpg
OpenKM Enable Automation Validation2.jpg (157.88 KiB) Viewed 5186 times
 #27847  by hbuus
 
Here's a screenshot from when I do a Do table select as you wrote I should do.
Attachments
OpenKM Do Table Select.jpg
OpenKM Do Table Select.jpg (180.64 KiB) Viewed 5186 times
 #27858  by hbuus
 
I tried various things and found out I have to select "JDBC" from the drop-down menu Type, and then choose OKM_AUTO_METADATA from the drop-down menu Tables. Then replace the text that comes automatically with the INSERT lines from the documentation.

After doing that, I get the following (see screenshot).

But automation still doesn't work, i.e. when I click on Definition on the automation rule I've made, I can't select anything from the drop-down menus Add Validation and Add action.

Argh! :)
Attachments
OpenKM Enable Automation Validation3.jpg
OpenKM Enable Automation Validation3.jpg (200.93 KiB) Viewed 5183 times
 #27859  by hbuus
 
I get this error when trying to send the INSERT-line as described in this screenshot (see attachment).

Thank you for looking at this, I appreciate the help!
Attachments
OpenKM Enable Automation Validation4.jpg
OpenKM Enable Automation Validation4.jpg (213.05 KiB) Viewed 5182 times
 #27871  by jllort
 
Be sure you're selecting in creation the option "post" not "pre" I think that could be the cause of the problem you got.
 #27872  by hbuus
 
I changed pre to post and then went into Administration->Automation, and clicked on Definition for my automation rule.
Yes, now two options emerge from the drop-down menus:
PathContains in the validation drop-down menu, and
ExecuteScripting in the action drop-down menu.

Remembering that I executed the following two lines in the Database query section:
Code: Select all
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01 ) VALUES ('post','com.openkm.automation.validation.PathContains', 'PathContains', 'validation', 'text', 'okm:folder', 'String', '', '', '');

INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01 ) VALUES ('post','com.openkm.automation.action.ExecuteScripting', 'ExecuteScripting', 'action', 'textarea', '', 'Script', '', '', '');
- I thought to myself: What if I actually have to execute all these lines, as described in the Wiki:
Code: Select all
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.AddKeyword', 'AddKeyword', 'action', 'text', '', 'Keyword', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.AddCategory', 'AddCategory', 'action', 'text', 'okm:folder', 'Category', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('pre', 'com.openkm.automation.action.AddCategoryToWizard', 'AddCategoryToWizard', 'action', '', '', '', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.AddCategoryToWizard', 'AddCategoryToWizard', 'action', '', '', '', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('pre', 'com.openkm.automation.action.AddKeywordToWizard', 'AddKeywordToWizard', 'action', '', '', '', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.AddKeywordToWizard', 'AddKeywordToWizard', 'action', '', '', '', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.AddPropertyGroupToWizard', 'AddPropertyGroupToWizard', 'action', 'text', '', 'Property group', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.GrantRole', 'GrantRole', 'action', 'text', '', 'Role name', 'integer', '', 'Privileges');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.GrantUser', 'GrantUser', 'action', 'text', '', 'User name', 'integer', '', 'Privileges');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.RevokeRole', 'RevokeRole', 'action', 'text', '', 'Role name', 'integer', '', 'Privileges');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.RevokeUser', 'RevokeUser', 'action', 'text', '', 'User name', 'integer', '', 'Privileges');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.RevokeKeyword', 'RevokeKeyword', 'action', 'text', '', 'Keyword', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.RevokeCategory', 'RevokeCategory', 'action', 'text', 'okm:folder', 'Category', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.AddWorkflowToWizard', 'AddWorkflowToWizard', 'action', 'text', '', 'Workflow', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.AddDigitalSignatureToWizard', 'AddDigitalSignatureToWizard', 'action', '', '', '', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.SetTextExtracted', 'SetTextExtracted', 'action', 'text', '', 'Text', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.RevokeAllRoles', 'RevokeAllRoles', 'action', 'boolean', '', 'Recursive', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.RevokeAllUsers', 'RevokeAllUsers', 'action', 'boolean', '', 'Recursive', 'boolean', '', 'Preserve creator');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('pre', 'com.openkm.automation.action.ExecuteScripting', 'ExecuteScripting', 'action', 'code', '', 'Script', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.ExecuteScripting', 'ExecuteScripting', 'action', 'code', '', 'Script', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01, AMD_TYPE02, AMD_SRC02, AMD_DESC02) VALUES ('post', 'com.openkm.automation.action.SendMail', 'SendMail', 'action', 'textarea', '', 'Message', 'user', '', 'Users', 'role', '', 'Roles');
I tried executing those lines in the Database query-section and got an error message for each line.
When do a Select from AUTO_META_DATA, I get this screen:
OpenKM Select from OKM_AUTO_METADATA.jpg
OpenKM Select from OKM_AUTO_METADATA.jpg (364.47 KiB) Viewed 5176 times
Sure enough, when I go to Administration->Automation and click on Definition for my automation rule, now all options in the Action drop-down menu are available to me.

I pick AddPropertyGroupToWizard and enter the name of my property group, which is Info.
Then I go out into Desktop and add a document.
However instead of getting the Add Property Group Wizard, I get this error message:
OpenKM Error add property group.jpg
OpenKM Error add property group.jpg (210.81 KiB) Viewed 5176 times
Can you see what I'm doing wrong?

I hope my explanation is understandable, otherwise please just ask, I will try to explain it better.
I really hope you can help!

Thanks.
 #27886  by hbuus
 
Ok! Thanks for all the help :)

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.