Category: Velocity

Velocity Syntax

This article summarizes the usage of Velocity template language, for more details please refer to Apache Velocity User Guide Variables Format: $ [ ! ][ { ][ a..z, A..Z ][ a..z, A..Z, 0..9, -, _ ][ } ] Examples: Regular notation: $imauselessvariable Silent notation: $!imauselessvariable Formal notation: ${imauselessvariable} Silent notation means, if the variable isn’t […]

Arithmetic operations in Velocity

Problem: What arithmetic operations are supported by Velocity? Solution: The math tool can be accessed via the $math variable. See for a complete list.

Global variables

Global variables can be accessed within workflow items and templates. This article gives you an overview, how to insert global variables. 1) Configuration The following global variables can be used with “insert::” : APPLICATION_VERSION APPLICATION_NAME COMPANY_NAME DAY HOSTNAME HOUR ID (=TRANSACTIONID) MILLISECONDS MINUTE MODE MONTH TIMESTAMP TRANSACTIONID SECONDS SYSTEMID WEEKDAY (1=Monday, 2=Tuesday,…,7=Sunday) WORKFLOWNAME WORKFLOWNAMES (since […]

Insert date and time stamps in Velocity

Note: There is also access to the global date and time variables of ET-Connector. See  for more information. Support for date formats is implemented through Velocity Generic Tools. See for a complete overview. The Date Tool can be accessed via the $date variable: Example uses: $date -> Oct 19, 2003 9:54:50 PM $date.long -> […]

Check for null values in Velocity templates

Problem: How to check for null (empty) values in Velocity templates? Solution: The following example demonstrates the check for null values: #if (! $a ) #set ($b = “This value is empty/null”) #else #set ($b = “This value is $a”) #end

© 2017 SCHAEFER B.S. GmbH / Erich-Steinfurth-Str. 6 - 10243 Berlin / +49 (0)30 9700386 - 0 /