Variables by automation event

Events can be pre ( previously ) and post ( posterior ). For example pre document creation event, will be executed before document creation and then can be changed several event vars to change parent folder, document name among others. In case post document creation event, will be executed after document creation. In this case there're no associated vars to the event you'll get NodeDocument object to apply directly any change across OpenKM API.  

Available environment variables

Variable Object classDescription

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

  • NodeDocument
  • NodeFolder
  • NodeMail
  • NodeRecord   

These nodes extends from NodeBase.

 

Node base

AutomationUtils.NODE_BASE_LIST

List<NodeBase>

  • NodeDocument
  • NodeFolder
  • NodeMail
  • NodeRecord

These nodes extends 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 Document text extracted

AutomationUtils.LANGUAGE_DETECTED

String Language detected

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 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

At Pre

Variable

For changing

AutomationUtils.FOLDER_NODE

No

At post

Variable

For changing

AutomationUtils.FOLDER_NODE

No

 

Move Folder

At Pre

Variable

For changing

AutomationUtils.FOLDER_NODE

No

AutomationUtils.DESTINATION_NODE

Yes

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

 

Mail

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 Mail

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

At Pre

Variable

For changing

AutomationUtils.RECORD_NODE

No

At post

Variable

For changing

AutomationUtils.RECORD_NODE

No

 

Move Record

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