Version

    Placeholders

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

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

    These fields are preprocessed by Apache Velocity templating engine. See the Velocity project URL for syntax description http://velocity.apache.org/. CloverDX is compatible with Apache Velocity v2.3.

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

    • event

    • now

    • user

    • run

    • sandbox

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

    Table 34. Placeholders useful in email templates
    Variable name Contains

    now

    Current date-time

    user

    The 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}) email:

    • user.email

    • user.username

    • user.firstName

    • user.lastName

    • user.groups (list of values)

    run

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

    tracking

    A data structure describing a status of components in a graph execution. It contains sub-properties which are accessible using the 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
    }

    sandbox

    A data structure describing a sandbox containing an executed graph. It contains sub-properties which are accessible using dot notation (i.e. ${sandbox.name})

    • sandbox.name

    • sandbox.code

    • sandbox.rootPath

    schedule

    A data structure describing a 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