Variables by automation event
Events can be pre (previous) and post (posterior). 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 attributes. 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
Variable | Object class | Description |
---|---|---|
AutomationUtils.TENANT |
long | Tenant |
AutomationUtils.CATEGORIES |
Set<String> |
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<String> | List of keywords |
AutomationUtils.NODE_BASE |
NodeBase
These nodes extend from NodeBase. |
Node base |
AutomationUtils.NODE_BASE_LIST |
List<NodeBase>
These nodes extend from NodeBase. |
Node base list |
AutomationUtils.NOTES |
List<NodeNote> |
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 sent 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<NodeProperty> |
List of property groups (metadata groups) |
AutomationUtils.RECORD_NODE |
NodeRecord | Record node |
AutomationUtils.TEXT_EXTRACTED |
String | Extracted document text |
AutomationUtils.LANGUAGE_DETECTED |
String | Detected language |
AutomationUtils.UPLOAD_RESPONSE |
String | Upload response |
AutomationUtils.TITLE |
String | Title |
AutomationUtils.WIKIPAGE |
wikiPage | The wiki page |
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 |
Document
Create Document
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.CATEGORIES |
Yes |
AutomationUtils.CREATION_DATE |
No |
AutomationUtils.NAME |
Yes |
AutomationUtils.MIME_TYPE |
Yes |
AutomationUtils.KEYWORDS |
Yes |
AutomationUtils.NOTES |
Yes |
AutomationUtils.NODE_CLASS |
Yes |
AutomationUtils.DESTINATION_NODE |
Yes |
AutomationUtils.PROPERTY_GROUPS |
Yes |
AutomationUtils.TITLE |
Yes |
AutomationUtils.WIKIPAGE |
Yes |
AutomationUtils.DOCUMENT_SIZE |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
AutomationUtils.DOCUMENT_FILE |
No |
Update Document
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
Delete Document
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
Rename Document
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
Purge Document
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
AutomationUtils.TENANT |
No |
At Post | |
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
AutomationUtils.TENANT |
No |
Move Document
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
AutomationUtils.DESTINATION_NODE |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
Restore Version Document
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.DOCUMENT_VERSION |
No |
At Post | |
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.DOCUMENT_VERSION |
No |
Download Document from UI
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
AutomationUtils.DOCUMENT_VERSION |
No |
AutomationUtils.DOCUMENT_NAME |
Yes |
AutomationUtils.DOCUMENT_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
AutomationUtils.DOCUMENT_VERSION |
No |
AutomationUtils.DOCUMENT_NAME |
No |
AutomationUtils.DOCUMENT_NODE |
No |
Download Document from UI for preview
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
AutomationUtils.DOCUMENT_NAME |
Yes |
AutomationUtils.DOCUMENT_VERSION |
No |
At Post | |
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
AutomationUtils.DOCUMENT_NAME |
No |
AutomationUtils.DOCUMENT_VERSION |
No |
Print Document
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.DOCUMENT_NODE |
|
At Post | |
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.DOCUMENT_NODE |
No |
Stamp Document
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
Virus-detected Document
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.USER |
No |
AutomationUtils.DOCUMENT_NAME |
No |
AutomationUtils.VIRUS_INFO |
No |
Set Node Class Document
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_CLASS |
No |
AutomationUtils.OLD_NODE_CLASS |
No |
AutomationUtils.NEW_NODE_CLASS |
Yes |
AutomationUtils.DOCUMENT_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
AutomationUtils.NODE_CLASS |
No |
Folder
Create Folder
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.CATEGORIES |
Yes |
AutomationUtils.CREATION_DATE |
No |
AutomationUtils.DESTINATION_NODE |
Yes |
AutomationUtils.NAME |
Yes |
AutomationUtils.NOTES |
Yes |
AutomationUtils.KEYWORDS |
Yes |
AutomationUtils.PROPERTY_GROUPS |
Yes |
AutomationUtils.WIKIPAGE |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
Delete Folder
The event is only triggered on the root node. If the node has subnodes, an event will not be generated from them.
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
Purge Folder
The event is only triggered on the root node. If the node has subnodes, an event will not be generated from them.
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
Move Folder
The event is only triggered on the root node and the destination node. If the node has subnodes, an event will not be generated from them.
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
AutomationUtils.DESTINATION_NODE |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
Rename Folder
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
Export Folder as ZIP
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
Export Folder as JAR
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.FOLDER_NODE |
No |
Create mail
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.CATEGORIES |
Yes |
AutomationUtils.CREATION_DATE |
No |
AutomationUtils.DESTINATION_NODE |
Yes |
AutomationUtils.MAIL_FROM |
No |
AutomationUtils.MAIL_REPLY |
No |
AutomationUtils.MAIL_TO |
No |
AutomationUtils.MAIL_CC |
No |
AutomationUtils.MAIL_BCC |
No |
AutomationUtils.MAIL_SENT_DATE |
No |
AutomationUtils.MAIL_RECEIVED_DATE |
No |
AutomationUtils.MAIL_SUBJECT |
No |
AutomationUtils.MAIL_CONTENT |
No |
AutomationUtils.NAME |
Yes |
AutomationUtils.KEYWORDS |
Yes |
AutomationUtils.MIME_TYPE |
No |
AutomationUtils.TITLE |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.MAIL_NODE |
No |
Move Mail
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.MAIL_NODE |
No |
AutomationUtils.DESTINATION_NODE |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.MAIL_NODE |
No |
Download mail from UI
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.MAIL_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.MAIL_NODE |
No |
Set Node Class Mail
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_CLASS |
No |
AutomationUtils.OLD_NODE_CLASS |
No |
AutomationUtils.NEW_NODE_CLASS |
Yes |
AutomationUtils.MAIL_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.MAIL_NODE |
No |
AutomationUtils.NODE_CLASS |
No |
Mail import attachments
At Post | |
---|---|
Variable |
For changing |
AutomationUtils.MAIL_NODE |
No |
Delete Mail
The event is only triggered on the root node. If the node has subnodes, an event will not be generated from them.
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.MAIL_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.MAIL_NODE |
No |
Purge Mail
The event is only triggered on the root node. If the node has subnodes, an event will not be generated from them.
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.MAIL_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.MAIL_NODE |
No |
Record
Create record
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.DESTINATION_NODE |
Yes |
AutomationUtils.NAME |
Yes |
AutomationUtils.NODE_CLASS |
Yes |
AutomationUtils.TITLE |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.RECORD_NODE |
No |
Delete record
The event is only triggered on the root node. If the node has subnodes, an event will not be generated from them.
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.RECORD_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.RECORD_NODE |
No |
Purge record
The event is only triggered on the root node. If the node has subnodes, an event will not be generated from them.
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.RECORD_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.RECORD_NODE |
No |
Move Record
The event is only triggered on the root node and the destination node. If the node has subnodes, an event will not be generated from them.
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.RECORD_NODE |
No |
AutomationUtils.DESTINATION_NODE |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.RECORD_NODE |
No |
Set Node Class Record
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_CLASS |
No |
AutomationUtils.OLD_NODE_CLASS |
No |
AutomationUtils.NEW_NODE_CLASS |
Yes |
AutomationUtils.RECORD_NODE |
No |
At Post | |
Variable |
For changing |
AutomationUtils.RECORD_NODE |
No |
AutomationUtils.NODE_CLASS |
No |
Property Group (metadata)
Add property group
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.PROPERTY_GROUP_NAME |
No |
AutomationUtils.PROPERTY_GROUP_PROPERTIES |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.PROPERTY_GROUP_NAME |
No |
AutomationUtils.PROPERTY_GROUP_PROPERTIES |
No |
Set property group
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.PROPERTY_GROUP_NAME |
No |
AutomationUtils.PROPERTY_GROUP_PROPERTIES |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.PROPERTY_GROUP_NAME |
No |
AutomationUtils.PROPERTY_GROUP_PROPERTIES |
No |
Remove property group
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.PROPERTY_GROUP_NAME |
No |
At Post | |
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.PROPERTY_GROUP_NAME |
No |
Auth
Create user
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.USER |
No |
At Post | |
Variable |
For changing |
AutomationUtils.USER |
No |
User login
At Post | |
---|---|
Variable |
For changing |
AutomationUtils.USER |
No |
User logout
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.USER |
No |
Task
Create Task
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.TASK_OBJECT |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.TASK_OBJECT |
No |
Update Task
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.TASK_OBJECT |
Yes |
At Post | |
Variable |
For changing |
AutomationUtils.TASK_OBJECT |
No |
Delete Task
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.TASK_ID |
No |
At Post | |
Variable |
For changing |
AutomationUtils.TASK_ID |
No |
Note
Create Note
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.NOTE_TEXT |
No |
At Post | |
Variable |
For changing |
AutomationUtils.NOTE_UUID |
No |
Update Note
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.NOTE_TEXT |
No |
AutomationUtils.NOTE_UUID |
No |
At Post | |
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.NOTE_TEXT |
No |
AutomationUtils.NOTE_UUID |
No |
Delete Note
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.NOTE_UUID |
No |
At Post | |
Variable |
For changing |
AutomationUtils.NODE_BASE |
No |
AutomationUtils.NOTE_UUID |
No |
General
Text extraction
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.DOCUMENT_NODE |
No |
AutomationUtils.TENANT |
No |
At Post | |
Variable |
For changing |
AutomationUtils.TEXT_EXTRACTED |
Yes |
AutomationUtils.LANGUAGE_DETECTED |
Yes |
Export nodes to ZIP
At Pre | |
---|---|
Variable |
For changing |
AutomationUtils.NODE_BASE_LIST |
No |
At Post | |
Variable |
For changing |
AutomationUtils.NODE_BASE_LIST |
No |