Substitution Parameters

You can use substitution parameters in specific objects to insert dynamic values, such as file names or process IDs. Different substitution parameters can be used with different types of objects. Specify parameters using the syntax ${<parameter_name>}. Substitution parameters are also exposed to Redwood Expression Language (REL) contexts as <parameter_name> variables.

In fields that support REL expressions, you can specify substitution parameters using either REL variables or the syntax ${<parameter_name>} in a string literals.

Note: Note that the substitution parameters are replaced after the REL expression has been evaluated. This means that REL will only see the substitution parameter names, not their values.

Examples

In the Subject field of an email sent for a Process Server alert, you could use an expression like the following.

='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 ${<parameter_name>} 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()

You might expect the following example will not return UNIXS3, but because the ${<parameter_name>}substitution is performed after the REL expression has been evaluated, it will actually return cessServer}.

=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 DateTimeFormatter.
  • ${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 Platform 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 Java DateTimeFormatter using the ${FileDateTime:HHmmss} syntax.

  • ${CurrentDateTime} - Platform Agent date & time when the file was detected.
  • ${CurrentTimeStamp} - Platform 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 Java DateTimeFormatter 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} - Platform Agent date & time when the file was detected.
  • ${CurrentTimeStamp} - Platform 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 of CurrentDateTime.
  • ${TimeStamp} - deprecated in favor of CurrentTimeStamp.
  • ${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)