Difference between revisions of "Automation"
m |
(→ExecuteScripting) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{TOCright}} __TOC__ | ||
− | {{Note|Since OpenKM 6.4.2 the plug-in system of OpenKM allows you to quickly expand the functionality offered by the platform, extending the available Automation without having to rebuild the system to add/change the existing functionality. Refer to [[ | + | {{Note|Since OpenKM 6.4.2 the plug-in system of OpenKM allows you to quickly expand the functionality offered by the platform, extending the available Automation without having to rebuild the system to add/change the existing functionality. Refer to [[Extension Guide]] if you need to extend automation feature on 6.4.2.}} |
For OpenKM version older than 6.4 refer to [[Enable automation]] section to know how enable automation. By default in these versions automation is not enabled. | For OpenKM version older than 6.4 refer to [[Enable automation]] section to know how enable automation. By default in these versions automation is not enabled. | ||
Line 6: | Line 7: | ||
Refer to [[Extend automation]] to extend automation validators and actions. | Refer to [[Extend automation]] to extend automation validators and actions. | ||
− | [[File:Okm_admin_074.png|center]] | + | Refer to [[Automation events table]] to understand what can be done with each event. |
+ | |||
+ | [[File:Okm_admin_074.png|center|800px]] | ||
== Preliminar concepts == | == Preliminar concepts == | ||
Line 105: | Line 108: | ||
** Element folder with path '''/okm:root/test/temporary/folder1'''return true | ** Element folder with path '''/okm:root/test/temporary/folder1'''return true | ||
** Element folder with path '''/okm:root/test/temporary''' returns false | ** Element folder with path '''/okm:root/test/temporary''' returns false | ||
+ | |||
+ | === UserHasRole === | ||
+ | * Return '''True''' if user has '''some role''' | ||
== Actions description == | == Actions description == | ||
Line 131: | Line 137: | ||
=== ExecuteScripting === | === ExecuteScripting === | ||
− | Execute a script related with the element. | + | Execute a script related with the element. Take a look at [[Scripting_-_OpenKM_6.2]] to see involved environment variables. |
=== GrantRole === | === GrantRole === |
Latest revision as of 10:00, 5 September 2014
Since OpenKM 6.4.2 the plug-in system of OpenKM allows you to quickly expand the functionality offered by the platform, extending the available Automation without having to rebuild the system to add/change the existing functionality. Refer to Extension Guide if you need to extend automation feature on 6.4.2. |
For OpenKM version older than 6.4 refer to Enable automation section to know how enable automation. By default in these versions automation is not enabled.
Refer to Extend automation to extend automation validators and actions.
Refer to Automation events table to understand what can be done with each event.
Preliminar concepts
- Rule is composed by validators and actions.
- Validators are one or more conditions on a rule that are evaluated depending the elements which fired the automation event ( document, folder, etc... )
- Actions are some operations with element which fired the automation event ( document, folder, etc... )
- Rule is executed when all validators in a rule return true.
- When Actions are executed (all validators in rule are true ) all actions defined in the rule are executed in the element which fired the automation event ( folder, document, etc... )
Add new rule
Click icon and will be shown the add rule form:
- Order field indicates execution preference among the other rules.
- Name field is some name to identify the rule.
- Event field indicates on which type of events is evaluted the rule.
- At field has two possible values post or pre. post indicates execution before element is created at OpenKM, pre indicates execution when element is yet created. With example will be more clear, with post we can change the path where a document will be created, with pre the document is yet created but we can move to other path.
- Exclusive field enabled stop the evaluation is rule is executed. Automation can have several rules, one or more can be evaluated and executed at same time ( in order defined by field Order ), but if a rule with exclusive field enabled is executed then automation stops here ( it's similar concept than firewall rules ).
- Active indicates if rule is enabled or disabled.
Click send button and the rule will be added.
Edit a rule
Click icon and will be shown the edit rule form:
Changes values if needed and then click send button to update the rule.
Delete a rule
Click icon and will be shown the delete rule form:
Click send button and the rule will be deleted.
Edit actions and validators
Click icon will be shown a screen like this:
Click icon and add some validator:
Click send button and the validator will be added.
Click icon and add some action:
Click send button and the action will be added.
With edit icon and delete icon you can edit or delete validators and actions.
Validators description
Element can be document, folder, etc...
ContainsFolder
- Return True if element path has some folder child.
- Example
- Folder child name = test
- Element folder with path /okm:root/folder1 has a folder called /okm:root/folder1/test then return true
- Element folder with path /okm:root/folder1 has not a folder called /okm:root/folder1/test then return false
HasKeyword
- Return True if element has some keyword
HasPropertyGroup
- Return True if element has some property group
HasPropertyGroupValue
- Return True if element has some property group value
NameContains
- Return True if path element contains some string value
- Example
- Value = test
- Element folder with path /okm:root/folder1/test/temporary contains test, then return true
- Element folder with path /okm:root/folder1/temporary not contains test, then return false
PathContains
- Return True if path starts with some value
- Path starts with = /okm:root/folder1
- Element folder with path /okm:root/folder1/test/temporaryreturn true
- Element folder with path /okm:root/test/temporary returns false
PathContainsFolderName
- Return True if path contains some value
- Folder name with = folder1
- Element folder with path /okm:root/folder1/test/temporaryreturn true
- Element folder with path /okm:root/test/temporary/folder1return true
- Element folder with path /okm:root/test/temporary returns false
UserHasRole
- Return True if user has some role
Actions description
Element can be document, folder, etc...
AddCategory
Add some category to the element
AddCategoryToWizard
After uploading document will be shown the wizard ( user action needed ) to add categories.
AddDigitalSignatureToWizard
After uploading document will be shown the wizard ( user action needed ) to sign document.
AddKeyword
Add some keyword to the element.
addKeywordToWizard
After uploading document will be shown the wizard ( user action needed ) to to add keywords.
AddPropertyGroupToWizard
After uploading document will be shown the wizard ( user action needed ) to to add property groups.
AddWorkflowToWizard
After uploading document will be shown the wizard ( user action needed ) to to execute workflows.
ExecuteScripting
Execute a script related with the element. Take a look at Scripting_-_OpenKM_6.2 to see involved environment variables.
GrantRole
Add some role grant to the element.
GrantUser
Add some user grant to the element.
RevokeAllRoles
Remove all roles grants to the element.
RevokeAllUsers
Remove all user grants to the element.
RevokeCategory
Remove a category to the element.
RevokeKeyword
Remove a keyword to the element.
RevokeRole
Remove a role grant to the element.
RevokeUser
Remove a user grant to the element.
SetTextExtracted
Add text content to be indexed as document content.
SendMail
Send mail to users. Can be used the same variables than Notification_and_subscription_messages. The default subject used is notification subject.