VelocityServices.invokeTemplateFromInlineString

Invokes the Velocity template contained in parameter templateString. This provides integration with the Velocity template engine supplied by Apache.

The logging level controls the level of generated messages, and any such messages are written to the designer execution log (View > Execution log). Available log levels are:

  • 0 debug (constant LOG_LEVEL_DEBUG)
  • 1 info (constant LOG_LEVEL_INFO)
  • 2 warn (constant LOG_LEVEL_WARN)
  • 3 error (constant LOG_LEVEL_ERROR)
Further documentation.

Javascript example:

 var template = "<table border='0'> " +
   "#foreach ( $row in $ORDERS ) " +
   "<tr> " +
     "<td>Order Number: ${ORDERS-ORDER_NUMBER}</td>" +
     "<td>Order Value: ${ORDERS-ORDER_VALUE}</td> " +
   "</tr> " +
   "#end " +
   "</table>";
 fields.RESULT.value = VelocityServices.invokeTemplateFromInlineString(template, VelocityServices.LOG_LEVEL_WARN);
 

returns java.lang.String

Parameters

java.lang.String  templateString,  int  logLevel,