Replacement variables and context variables
While working with templates, you might want to refer to a variable that will not be resolved until the instance has been started in the runtime environment. This variable is known as a context variable, because its value is dependent upon the task context in which it is exists (or the process context for inline tasks). If you want to refer to such a context variable in a template, you must use a replacement variable.
- staff queries of tasks
- staff queries of escalations
- in the description and documentation of tasks
- in the description and documentation of escalations
- in notification emails sent by escalations.
- durations of tasks
- priority of tasks
- the type property (business category) of tasks
- custom properties of tasks
- durations of escalations
- custom properties of escalations
Use of replacement variables
Context variables might only be available during specific periods of an instance's lifecycle (a task owner is only defined once the task has been claimed) and can resolve either to single or multiple values. Multiple values are returned in a string array (which is represented as a comma separated list when used in an email) .
%signs, for example,
%htm:task.originator%.- Using percent signs within variable names is not allowed.
- If you want to use a percent sign in a string within the replacement
variable, then you will need to use two percent signs (
%%
) instead of one. - Variables can contain XPath expressions. If an XPath expression
contains a
%
sign, it must be escaped as specified by XML (using %).
The categories shown below contain specific details on which expressions can be used and when.