Placeholders

Placeholder may be used in some fields of tasks. They are especially useful for e-mail tasks, where you can generate content of e-mail according to context variables.

Note: In most cases, you can avoid this by using e-mail templates (See E-mail task for details)

These fields are preprocessed by Apache Velocity templating engine. See Velocity project URL for syntax description http://velocity.apache.org/

There are several context variables, which you can use in placeholders and even for creating loops and conditions.

Some of them may be empty depending on type of event. E.g., if task is processed because of graph event, then run and sandbox variables contain related data, otherwise they are empty.

Table 20.2. Placeholders useful in e-mail templates

Variable nameContains
nowCurrent date-time
user User, who caused this event. It may be an owner of a schedule, or someone who executed a graph. It contains sub-properties, which are accessible using dot notation (i.e. ${user.email}) e-mail:
  • user.email
  • user.username
  • user.firstName
  • user.lastName
  • user.groups (list of values)
runData structure describing one single graph execution. It contains sub-properties, which are accessible using dot notation (i.e. ${run.jobFile})
  • job.jobFile
  • job.status
  • job.startTime
  • job.stopTime
  • job.errNode
  • job.errMessage
  • job.errException
  • job.logLocation
trackingA data structure describing status of components in graph execution. It contains sub-properties, which are accessible using Velocity syntax for loops and conditions.
#if (${tracking})
<table border="1" cellpadding="2" cellspacing="0">
#foreach ($phase in $tracking.trackingPhases)
<tr><td>phase: ${phase.phaseNum}</td>
    <td>${phase.executionTime} ms</td>
    <td></td><td></td><td></td></tr>
   #foreach ($node in $phase.trackingNodes)
      <tr><td>${node.nodeName}</td>
          <td>${node.result}</td>
          <td></td><td></td><td></td></tr>
      #foreach ($port in $node.trackingPorts)
         <tr><td></td><td></td>
             <td>${port.type}:${port.index}</td>
             <td>${port.totalBytes} B</td>
             <td>${port.totalRows} rows</td></tr>
      #end
   #end
#end
</table>
#end
}
sandboxData structure describing a sandbox containing the executed graph. It contains sub-properties, which are accessible using dot notation (i.e. ${sandbox.name})
  • sandbox.name
  • sandbox.code
  • sandbox.rootPath
scheduleData structure describing schedule which triggered this task. It contains sub-properties, which are accessible using dot notation (i.e. ${schedule.description})
  • schedule.description
  • schedule.startTime
  • schedule.endTime
  • schedule.lastEvent
  • schedule.nextEvent
  • schedule.fireMisfired