Difference between revisions of "Enable automation"

From OpenKM Documentation
Jump to: navigation, search
Line 32: Line 32:
 
* NameContains
 
* NameContains
 
* PathContains
 
* PathContains
 +
* PathContainsFolderName
  
 
'''Available actions:'''
 
'''Available actions:'''
Line 51: Line 52:
 
* RevokeUser
 
* RevokeUser
 
* SetTextExtracted
 
* SetTextExtracted
 +
* SendMail
  
 
=== Enable automation validation ===
 
=== Enable automation validation ===
Line 61: Line 63:
 
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.HasPropertyGroupValue', 'HasPropertyGroupValue', 'validation', 'text', '', 'Property', 'text', '', 'Value');
 
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.HasPropertyGroupValue', 'HasPropertyGroupValue', 'validation', 'text', '', 'Property', 'text', '', 'Value');
 
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.HasPropertyGroup', 'HasPropertyGroup', 'validation', '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.validation.HasPropertyGroup', 'HasPropertyGroup', 'validation', '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.validation.PathContainsFolderName', 'PathContainsFolderName', 'validation', 'text', '', 'String', '', '', '');
 
</source>
 
</source>
  
Line 85: Line 88:
 
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 ('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 ('post','com.openkm.automation.action.ExecuteScripting', 'ExecuteScripting', 'action', 'textarea', '', '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', 'textarea', '', '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');
 
</source>
 
</source>
  
 
[[Category: Installation Guide]]
 
[[Category: Installation Guide]]

Revision as of 17:49, 21 November 2012

OpenKM automation by default is not enabled to enable it you should execute some sql queries.

Refer to Automation section to configure automation rules in your OpenKM and get full explanation of available validators and actions.

Refer to Extend automation to extend automation validators and actions.

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', '', '', '');

OpenKM professional version

Available validations:

  • ContainsFolder
  • HasKeyword
  • HasPropertyGroup
  • HasPropertyGroupValue
  • NameContains
  • PathContains
  • PathContainsFolderName

Available actions:

  • AddCategory
  • AddCategoryToWizard
  • AddDigitalSignatureToWizard
  • AddKeyword
  • AddKeywordToWizard
  • AddPropertyGroupToWizard
  • AddWorkflowToWizard
  • ExecuteScripting
  • GrantRole
  • GrantUser
  • RevokeAllRoles
  • RevokeAllUsers
  • RevokeCategory
  • RevokeKeyword
  • RevokeRole
  • RevokeUser
  • SetTextExtracted
  • SendMail

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.ContainsFolder', 'ContainsFolder', 'validation', 'text', '', 'Folder', '', '', '');
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.HasKeyword', 'HasKeyword', 'validation', '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.validation.NameContains', 'NameContains', 'validation', 'text', '', '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.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.validation.HasPropertyGroupValue', 'HasPropertyGroupValue', 'validation', 'text', '', 'Property', 'text', '', 'Value');
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.HasPropertyGroup', 'HasPropertyGroup', 'validation', '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.validation.PathContainsFolderName', 'PathContainsFolderName', 'validation', 'text', '', '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.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 ('post','com.openkm.automation.action.ExecuteScripting', 'ExecuteScripting', 'action', 'textarea', '', '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');