Substitution Parameters
You use substitution parameters in specific objects to insert dynamic values, like a file name or a process ID. Depending on the repository object, specific substitution parameters can be used. Substitution parameters are specified using the Ant syntax ${<parameter_name>}
; these parameters are also exposed to Redwood Expression Language (REL) contexts as <parameter_name>
variables.
Substitution Parameters and REL Contexts
In fields that support REL expressions you can specify the substitution parameters using either REL variables or Ant syntax, the latter inside string literals. Note that the substitution parameters will be replaced after the REL expression has been evaluated; this means that REL will only see the substitution parameter names, not their values.
Example
In the Subject field of an email sent for a process server alert, the following expression has been specified:
='Process Server ${ProcessServer} went from ${oldStatus} to ${newStatus} at ' + Time.now()
This will first be evaluated as REL:
Process Server ${ProcessServer} went from ${oldStatus} to ${newStatus} at 12:00:00pm Tuesday 22 September 2015
Then the Ant substitutions are applied:
Process Server MSLN_UNIXS3 went from Running to PartiallyRunning at 12:00:00pm Tuesday 22 September 2015
This expression can also also be specified using REL syntax only:
='Process Server '+ProcessServer+' went from '+oldStatus+' to '+newStatus+' at ' + Time.now()
Since the Ant substitution is performed after the REL expression has been evaluated, the following example will not return UNIXS3
but cessServer}
instead:
=String.substring('${ProcessServer}', 5)
Substitution Parameters
The following core substitution parameters are available, the complete list can be found in the RedwoodExpressionLanguage Contexts topic.
Process Definitions
The following substitution parameters can be used in some process definitions:
${date[:<format]}
- date using format 'format'. The format is any valid Java SimpleDateFormat.${SystemId}
- system ID with all characters except A-Z, a-z and 0-9 replaced with underscores.
Platform agent
The platform agent log file can contain a filename pattern, stderr.log
, or - (for stderr). May contain any of the following substitution parameters:
${DataRootDirectory}
- Base directory for platform agent files.${FileSeparator}
- Character(s) between directory and file (for example/
on UNIX and\
on Windows).${InstallDirectory}
- install directory.${ProcessId}
- Process ID of the process${ProcessName}
- Process name (network-processor, ...)${ProcessType}
- Process type (standalone, service, ...)${ProcessServer}
- Name of the process server that the agent is configured for.${TraceDirectory}
- ${DataRootDirectory}/trc.
Events
Raiser Comments
The following substitution parameters are available for raiser comments in processes and chain definitions:
${jobid}
- The ID of the raiser process.${jobdescription}
- the raiser process name, as displayed by the chain definitions monitor at the time of raising the event.${jobstatus}
- The status of the process at the time it raised the event.
The default raiser comment is the following:
Event raised by process:${jobid} (${jobdescription}) going to status ${jobstatus}.
File Event Raiser Comments
Events can also be raised by files on servers with a platform agent or on AS/400 systems.
The following substitution parameters are available for raiser comments of file events:
All DateTime
variables use the format yyyyMMddHHmmss
; you can specify a JavaDateFormat using the ${FileDateTime:HHmmss}
syntax.
${CurrentDateTime}
- agent date & time when the file was detected.${CurrentTimeStamp}
- agent timestamp at which the file was detected, in a numeric format containing the milliseconds since 1970, usually referred to as epoch or UNIX time.${FileDateTime}
- File modification date & time.${FileTimeStamp}
- File modification time in epoch.${ServerDateTime}
- Central server date & time when the event was raised.${ServerTimeStamp}
- Central server time in epoch when the event was raised.${processServer
- name of the process server.${server}
- Platform agent name.${filename}
- path of the detected file (before any move).${finalPath}
- new path of the detected file (after any move).
note
${DateTime}
and ${TimeStamp}
have been deprecated and should not be used anymore, the equivalents are ${CurrentDateTime}
and ${CurrentTimeStamp}
, respectively.
The default file event raiser comment is the following:
File event raised by "${filename}" on "${server}"
The following topics cover file events in more details:
File Event Move Directory
All DateTime
variables use the format yyyyMMddHHmmss
; you can specify a JavaDateFormat using the ${FileDateTime:HHmmss}
syntax.
${BaseDirectory}
- path to the directory containing the detected file.${BaseName}
- base filename of the detected file.${Name}
- filename of the detected file.${Dot}
- dot (``.) such as found in filenames before the extension.${Extension}
- extension of the detected file.${CurrentDateTime}
- agent date & time when the file was detected.${CurrentTimeStamp}
- agent timestamp at which the file was detected, in a numeric format containing the milliseconds since 1970, usually referred to as epoch or UNIX time.${DateTime}
- deprecated in favor ofCurrentDateTime
.${TimeStamp}
- deprecated in favor ofCurrentTimeStamp
.${FileDateTime}
- File modification date & time.${FileTimeStamp}
- File modification time in epoch.${fileName}
- filename (full path of file) of the detected file.${UniqueId}
- the unique ID of the file event.
note
${DateTime}
and ${TimeStamp}
have been deprecated and should not be used anymore, the equivalents are ${CurrentDateTime}
and ${CurrentTimeStamp}
, respectively.
Clearer Comments
The following substitution parameters are available for clearer comments in processes and chain definitions:
${jobid}
- The ID of the clearer job.${jobdescription}
- the raiser process name, as displayed by the processes monitor at the time of clearing the event.
Queries
The columnFormat parameters of the Table.formatRow(table, key, rowStart, columnFormat, columnSeparator, rowEnd) function takes the following substitution parameters:
- {0} - column header
- {1} - value
- {2} - columnSeparator (should always be the first)