The Automation is a pervasive aspect of the LogicalDOC platform and represents the way you have to program things using a simple scripting language. Sometimes you wish LogicalDOC to execute your own logic when something special happens during a workflow or in reaction to specific events occurrend inside the repository: with the Automation you can inject your own algorithm to take the proper actions automatically. Many objects support Automation and allow you to define custom Automation's scripts(folders, workflows, emails, etc.)

Please look at the Automation Syntax Guide to familiarize with the syntax. You may also look at the Automation Snippets.

In your automation scripts you can reference the following variables(some of them are only available in certain scopes):

Variable Java Class Description
nl   represents the new line
product   name of the product
locale   current locale
CURRENT_DATE   current date
tenantId   identifier of the current tenant
dictionary   map with all the variables(variable_name > value)
keys   set of all the keys in the dictionary
log LogTool gives access to the system's log
I18N I18NTool handles the translations
DateTool DateTool manipulation and formatting of dates
NumberTool NumberTool formats a number using the given format
DocTool DocTool handles documents and related resources
FolderTool FolderTool handles folders and related resources
ClassTool ClassTool creates new instances of the given class
SystemTool SystemTool
functions for interacting with the Operative System
MailTool MailTool functions to send e-mails
BarcodeTool BarcodeTool class to extract barcode contents from documents
StampTool StampTool applies stamps into documents
SignTool SignTool digitally signs a document with the user's digital certificate
AutomationTool AutomationTool executes an automation routine in the same execution thread or a new one
ContextTool ContextTool methods to access the Application context
SplitTool SplitTool allows the splitting of a PDF in segments using different policies
SecurityTool SecurityTool handles some security related operations
event History the current event
document Document the document associated to the current event(if any)
folder Folder the folder associated to the current event(if any)
candidates User list of the current task's candidate users
documents Document list of the attached documents
task   the current task
taskName   name of the current task
initiator User the user that started the workflow
workflow   name of the workflow
processId   identifier of the current process
definitionId   identifier of the process definition
actions   list of possible actions(transitions) declared for the current task
assignee   user assigned to the current task
WorkflowTool WorkflowTool methods to handle workflows and interact with them
AVAILABLE IN CustomID / Auto naming / Auto folding
document Document the document being currently saved
user User the currently logged in user
session Session the current session
user User the currently logged in user
session Session the current session
dashlet Dashlet the dashlet object
user User the currently logged in user
session Session the current session
document Document the selected document
folder Folder the selected folder