Variables by automation event
Events can be pre (before) or post (after). For example, a pre document creation event will be executed before document creation, and several event variables can then be changed to modify the parent folder, document name, and other properties. In the case of a post document creation event, it will be executed after document creation. In this case, there are no associated variables for the event; you’ll get a NodeDocument object to apply any changes directly via the OpenKM API.
Available environment variables
Section titled “Available environment variables”| Variable | Object class | Description |
|---|---|---|
| AutomationUtils.TENANT | long | Tenant |
| AutomationUtils.CATEGORIES | Set |
List of categories |
| AutomationUtils.CREATION_DATE | Calendar | Creation date |
| AutomationUtils.DESTINATION_NODE | NodeFolder | Destination folder |
| AutomationUtils.DOCUMENT_NODE | NodeDocument | Document node |
| AutomationUtils.DOCUMENT_FILE | File | Document File |
| AutomationUtils.DOCUMENT_NAME | String | Document name |
| AutomationUtils.DOCUMENT_VERSION | String | Document version |
| AutomationUtils.EVENT | AutomationRule.EnumEvents | Event |
| AutomationUtils.EVENT_AT | String | Event at |
| AutomationUtils.FOLDER_NODE | NodeFolder | Folder node |
| AutomationUtils.KEYWORDS | Set |
List of keywords |
| AutomationUtils.NODE_BASE | NodeBase - NodeDocument - NodeFolder - NodeMail - NodeRecord These nodes extend NodeBase. |
Node base |
| AutomationUtils.NODE_BASE_LIST | List - NodeDocument - NodeFolder - NodeMail - NodeRecord These nodes extend NodeBase. |
Node base list |
| AutomationUtils.NOTES | List |
List of notes |
| AutomationUtils.MAIL_BCC | String[] | Mail bcc |
| AutomationUtils.MAIL_CC | String[] | Mail cc |
| AutomationUtils.MAIL_CONTENT | String | Mail content |
| AutomationUtils.MAIL_FROM | String | Mail from |
| AutomationUtils.MAIL_NODE | NodeMail | Mail node |
| AutomationUtils.MAIL_RECEIVED_DATE | Calendar | Mail received date |
| AutomationUtils.MAIL_REPLY | String[] | Mail reply |
| AutomationUtils.MAIL_SENT_DATE | Calendar | Mail sent date |
| AutomationUtils.MAIL_SUBJECT | String | Mail subject |
| AutomationUtils.MAIL_TO | String[] | Mail to |
| AutomationUtils.MIME_TYPE | String | MIME type |
| AutomationUtils.NAME | String | Name |
| AutomationUtils.PROPERTY_GROUP_NAME | String | Property group name |
| AutomationUtils.PROPERTY_GROUP_PROPERTIES | Map<String, String> | Property group properties |
| AutomationUtils.PROPERTY_GROUPS | Set |
List of property groups (metadata groups) |
| AutomationUtils.ALL_PROPERTY_GROUPS | List |
List of property groups (metadata groups) |
| AutomationUtils.RECORD_NODE | NodeRecord | Record node |
| AutomationUtils.SOURCE_PATH | String | Original repository path of a node before it was moved |
| AutomationUtils.TEXT_EXTRACTED | String | Extracted document text |
| AutomationUtils.TEXT_EXTRACTOR | String | TextExtractor object |
| AutomationUtils.LANGUAGE_DETECTED | String | Language detected |
| AutomationUtils.TITLE | String | Title |
| AutomationUtils.NODE_CLASS | Long | The NodeClass ID |
| AutomationUtils.NEW_NODE_CLASS | Long | The new NodeClass |
| AutomationUtils.OLD_NODE_CLASS | Long | The old NodeClass |
| AutomationUtils.TASK_ID | Long | The Task ID |
| AutomationUtils.TASK_OBJECT | TaskManagerTask | Task object |
| AutomationUtils.USER | com.openkm.bean.CommonUser | User |
| AutomationUtils.DOCUMENT_SIZE | Long | Document size |
| AutomationUtils.HTTP_SERVLET_REQUEST | jakarta.servlet.http.HttpServletRequest | HTTP servlet request |
| AutomationUtils.HTTP_SERVLET_RESPONSE | jakarta.servlet.http.HttpServletResponse | HTTP servlet response |
| AutomationUtils.AUTHENTICATION | org.springframework.security.core.Authentication | Spring Security authentication object |
Document
Section titled “Document”Create Document
Section titled “Create Document”| At Pre |
|---|
| Variable |
| AutomationUtils.CATEGORIES |
| AutomationUtils.CREATION_DATE |
| AutomationUtils.NAME |
| AutomationUtils.MIME_TYPE |
| AutomationUtils.KEYWORDS |
| AutomationUtils.NOTES |
| AutomationUtils.NODE_CLASS |
| AutomationUtils.DESTINATION_NODE |
| AutomationUtils.PROPERTY_GROUPS |
| AutomationUtils.TITLE |
| AutomationUtils.DOCUMENT_SIZE |
| At Post |
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| AutomationUtils.DOCUMENT_FILE |
Update Document
Section titled “Update Document”| At Pre |
|---|
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| At Post |
| Variable |
| AutomationUtils.DOCUMENT_NODE |
Delete Document
Section titled “Delete Document”| At Pre |
|---|
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| At Post |
| Variable |
| AutomationUtils.DOCUMENT_NODE |
Rename Document
Section titled “Rename Document”| At Pre |
|---|
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| At Post |
| Variable |
| AutomationUtils.DOCUMENT_NODE |
Purge Document
Section titled “Purge Document”| At Pre |
|---|
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| AutomationUtils.TENANT |
| At Post |
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| AutomationUtils.TENANT |
Move Document
Section titled “Move Document”| At Pre |
|---|
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| AutomationUtils.DESTINATION_NODE |
| At Post |
| Variable |
| AutomationUtils.DOCUMENT_NODE |
Restore Version Document
Section titled “Restore Version Document”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.DOCUMENT_VERSION |
| At Post |
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.DOCUMENT_VERSION |
Download Document from UI
Section titled “Download Document from UI”| At Pre |
|---|
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| AutomationUtils.DOCUMENT_VERSION |
| AutomationUtils.DOCUMENT_NAME |
| AutomationUtils.DOCUMENT_NODE |
| At Post |
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| AutomationUtils.DOCUMENT_VERSION |
| AutomationUtils.DOCUMENT_NAME |
| AutomationUtils.DOCUMENT_NODE |
Download Document from UI for preview
Section titled “Download Document from UI for preview”| At Pre |
|---|
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| AutomationUtils.DOCUMENT_NAME |
| AutomationUtils.DOCUMENT_VERSION |
| At Post |
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| AutomationUtils.DOCUMENT_NAME |
| AutomationUtils.DOCUMENT_VERSION |
Print Document
Section titled “Print Document”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.DOCUMENT_NODE |
| At Post |
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.DOCUMENT_NODE |
Stamp Document
Section titled “Stamp Document”| At Pre |
|---|
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| At Post |
| Variable |
| AutomationUtils.DOCUMENT_NODE |
Virus Detected Document
Section titled “Virus Detected Document”| At Pre |
|---|
| Variable |
| AutomationUtils.USER |
| AutomationUtils.DOCUMENT_NAME |
| AutomationUtils.VIRUS_INFO |
Set Node Class Document
Section titled “Set Node Class Document”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_CLASS |
| AutomationUtils.OLD_NODE_CLASS |
| AutomationUtils.NEW_NODE_CLASS |
| AutomationUtils.DOCUMENT_NODE |
| At Post |
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| AutomationUtils.NODE_CLASS |
Folder
Section titled “Folder”Create Folder
Section titled “Create Folder”| At Pre |
|---|
| Variable |
| AutomationUtils.CATEGORIES |
| AutomationUtils.CREATION_DATE |
| AutomationUtils.DESTINATION_NODE |
| AutomationUtils.NAME |
| AutomationUtils.NOTES |
| AutomationUtils.KEYWORDS |
| AutomationUtils.PROPERTY_GROUPS |
| At Post |
| Variable |
| AutomationUtils.FOLDER_NODE |
Delete Folder
Section titled “Delete Folder”| At Pre |
|---|
| Variable |
| AutomationUtils.FOLDER_NODE |
| At Post |
| Variable |
| AutomationUtils.FOLDER_NODE |
Purge Folder
Section titled “Purge Folder”| At Pre |
|---|
| Variable |
| AutomationUtils.FOLDER_NODE |
| At Post |
| Variable |
| AutomationUtils.FOLDER_NODE |
Move Folder
Section titled “Move Folder”| At Pre |
|---|
| Variable |
| AutomationUtils.FOLDER_NODE |
| AutomationUtils.DESTINATION_NODE |
| At Post |
| Variable |
| AutomationUtils.FOLDER_NODE |
Rename Folder
Section titled “Rename Folder”| At Pre |
|---|
| Variable |
| AutomationUtils.FOLDER_NODE |
| At Post |
| Variable |
| AutomationUtils.FOLDER_NODE |
Export Folder as ZIP
Section titled “Export Folder as ZIP”| At Pre |
|---|
| Variable |
| AutomationUtils.FOLDER_NODE |
| At Post |
| Variable |
| AutomationUtils.FOLDER_NODE |
Export Folder as JAR
Section titled “Export Folder as JAR”| At Pre |
|---|
| Variable |
| AutomationUtils.FOLDER_NODE |
| At Post |
| Variable |
| AutomationUtils.FOLDER_NODE |
Create Mail
Section titled “Create Mail”| At Pre |
|---|
| Variable |
| AutomationUtils.CATEGORIES |
| AutomationUtils.CREATION_DATE |
| AutomationUtils.DESTINATION_NODE |
| AutomationUtils.MAIL_FROM |
| AutomationUtils.MAIL_REPLY |
| AutomationUtils.MAIL_TO |
| AutomationUtils.MAIL_CC |
| AutomationUtils.MAIL_BCC |
| AutomationUtils.MAIL_SENT_DATE |
| AutomationUtils.MAIL_RECEIVED_DATE |
| AutomationUtils.MAIL_SUBJECT |
| AutomationUtils.MAIL_CONTENT |
| AutomationUtils.NAME |
| AutomationUtils.KEYWORDS |
| AutomationUtils.MIME_TYPE |
| AutomationUtils.TITLE |
| At Post |
| Variable |
| AutomationUtils.MAIL_NODE |
Move Mail
Section titled “Move Mail”| At Pre |
|---|
| Variable |
| AutomationUtils.MAIL_NODE |
| AutomationUtils.DESTINATION_NODE |
| At Post |
| Variable |
| AutomationUtils.MAIL_NODE |
Download Mail from UI
Section titled “Download Mail from UI”| At Pre |
|---|
| Variable |
| AutomationUtils.MAIL_NODE |
| At Post |
| Variable |
| AutomationUtils.MAIL_NODE |
Download Mail from UI for preview
Section titled “Download Mail from UI for preview”| At Pre |
|---|
| Variable |
| AutomationUtils.MAIL_NODE |
| At Post |
| Variable |
| AutomationUtils.MAIL_NODE |
Set Node Class Mail
Section titled “Set Node Class Mail”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_CLASS |
| AutomationUtils.OLD_NODE_CLASS |
| AutomationUtils.NEW_NODE_CLASS |
| AutomationUtils.MAIL_NODE |
| At Post |
| Variable |
| AutomationUtils.MAIL_NODE |
| AutomationUtils.NODE_CLASS |
Import Mail Attachments
Section titled “Import Mail Attachments”| At Post |
|---|
| Variable |
| AutomationUtils.MAIL_NODE |
Delete Mail
Section titled “Delete Mail”| At Pre |
|---|
| Variable |
| AutomationUtils.MAIL_NODE |
| At Post |
| Variable |
| AutomationUtils.MAIL_NODE |
Purge Mail
Section titled “Purge Mail”| At Pre |
|---|
| Variable |
| AutomationUtils.MAIL_NODE |
| At Post |
| Variable |
| AutomationUtils.MAIL_NODE |
Record
Section titled “Record”Create Record
Section titled “Create Record”| At Pre |
|---|
| Variable |
| AutomationUtils.DESTINATION_NODE |
| AutomationUtils.NAME |
| AutomationUtils.NODE_CLASS |
| AutomationUtils.TITLE |
| At Post |
| Variable |
| AutomationUtils.RECORD_NODE |
Delete Record
Section titled “Delete Record”| At Pre |
|---|
| Variable |
| AutomationUtils.RECORD_NODE |
| At Post |
| Variable |
| AutomationUtils.RECORD_NODE |
Purge Record
Section titled “Purge Record”| At Pre |
|---|
| Variable |
| AutomationUtils.RECORD_NODE |
| At Post |
| Variable |
| AutomationUtils.RECORD_NODE |
Move Record
Section titled “Move Record”| At Pre |
|---|
| Variable |
| AutomationUtils.RECORD_NODE |
| AutomationUtils.DESTINATION_NODE |
| At Post |
| Variable |
| AutomationUtils.RECORD_NODE |
Rename Record
Section titled “Rename Record”| At Pre |
|---|
| Variable |
| AutomationUtils.RECORD_NODE |
| At Post |
| Variable |
| AutomationUtils.RECORD_NODE |
Set Node Class Record
Section titled “Set Node Class Record”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_CLASS |
| AutomationUtils.OLD_NODE_CLASS |
| AutomationUtils.NEW_NODE_CLASS |
| AutomationUtils.RECORD_NODE |
| At Post |
| Variable |
| AutomationUtils.RECORD_NODE |
| AutomationUtils.NODE_CLASS |
Property Group (metadata)
Section titled “Property Group (metadata)”Add property group
Section titled “Add property group”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.PROPERTY_GROUP_NAME |
| AutomationUtils.PROPERTY_GROUP_PROPERTIES |
| At Post |
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.PROPERTY_GROUP_NAME |
| AutomationUtils.PROPERTY_GROUP_PROPERTIES |
Get all property groups
Section titled “Get all property groups”| At Post |
|---|
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.ALL_PROPERTY_GROUPS |
Set property group
Section titled “Set property group”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.PROPERTY_GROUP_NAME |
| AutomationUtils.PROPERTY_GROUP_PROPERTIES |
| At Post |
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.PROPERTY_GROUP_NAME |
| AutomationUtils.PROPERTY_GROUP_PROPERTIES |
Remove property group
Section titled “Remove property group”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.PROPERTY_GROUP_NAME |
| At Post |
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.PROPERTY_GROUP_NAME |
Create User
Section titled “Create User”| At Pre |
|---|
| Variable |
| AutomationUtils.USER |
| At Post |
| Variable |
| AutomationUtils.USER |
User Login
Section titled “User Login”| At Pre |
|---|
| Variable |
| AutomationUtils.USER |
| AutomationUtils.HTTP_SERVLET_REQUEST |
| AutomationUtils.HTTP_SERVLET_RESPONSE |
| AutomationUtils.AUTHENTICATION |
| At Post |
| Variable |
| AutomationUtils.USER |
User Logout
Section titled “User Logout”| At Pre |
|---|
| Variable |
| AutomationUtils.USER |
Create Task
Section titled “Create Task”| At Pre |
|---|
| Variable |
| AutomationUtils.TASK_OBJECT |
| At Post |
| Variable |
| AutomationUtils.TASK_OBJECT |
Update Task
Section titled “Update Task”| At Pre |
|---|
| Variable |
| AutomationUtils.TASK_OBJECT |
| At Post |
| Variable |
| AutomationUtils.TASK_OBJECT |
Delete Task
Section titled “Delete Task”| At Pre |
|---|
| Variable |
| AutomationUtils.TASK_ID |
| At Post |
| Variable |
| AutomationUtils.TASK_ID |
Create Note
Section titled “Create Note”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.NOTE_TEXT |
| At Post |
| Variable |
| AutomationUtils.NOTE_UUID |
Update Note
Section titled “Update Note”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.NOTE_TEXT |
| AutomationUtils.NOTE_UUID |
| At Post |
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.NOTE_TEXT |
| AutomationUtils.NOTE_UUID |
Delete Note
Section titled “Delete Note”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.NOTE_UUID |
| At Post |
| Variable |
| AutomationUtils.NODE_BASE |
| AutomationUtils.NOTE_UUID |
General
Section titled “General”Text extraction
Section titled “Text extraction”| At Pre |
|---|
| Variable |
| AutomationUtils.DOCUMENT_NODE |
| AutomationUtils.TENANT |
| AutomationUtils.TEXT_EXTRACTOR |
| At Post |
| Variable |
| AutomationUtils.TEXT_EXTRACTED |
| AutomationUtils.LANGUAGE_DETECTED |
Export Nodes to ZIP
Section titled “Export Nodes to ZIP”| At Pre |
|---|
| Variable |
| AutomationUtils.NODE_BASE_LIST |
| At Post |
| Variable |
| AutomationUtils.NODE_BASE_LIST |