The Action Context
The context is an immutable representation of the rule's violation state. This context contains the following information related to the cause of the rule's violation:
An example substitution:
${rule.name}
This substitution causes Velocity to look up a property/entity located at the <root> of the context named rule, then within the <rule> entity, to locate a property named name. The process ends when the last element in the <property>.<property> sequence is resolved. If the element cannot be resolved, the substitution text remains in the output.
Producing a substitution for a template is a simple matter of determining the required information and navigating to it.
For example, if you want to output the start date of the diagnosis, you would first find the element you want (in this case, startDate of the diagnosis).
and then you would navigate backward to the root of the context.
Once you have the variable substitution configured, simply surround it within ${ } and use it within the template.
${diagnosis:startDate}
For further details on advanced formatting (looping, conditionals, etc.) refer to the Velocity documentation at
http://velocity.apache.org/engine/devel/getting-started.html.
Important:
A dynamic custom alert template file must end with a .vm extension for the template to be recognized and processed correctly. See
Specifying E-mail Alert Settings and
Templates for instructions on specifying a custom template.