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. You can 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 Job Server alert, you could use an expression like the following.

=' Job Server ${ProcessServer} went from ${oldStatus} to ${newStatus} at ' + Time.now()

This will first be evaluated as REL:

Job Server ${ProcessServer} went from ${oldStatus} to ${newStatus} at 12:00:00pm Tuesday 22 September 2015

Then the ${<parameter_name>} substitutions are applied:

Job Server MSLN_UNIXS3 went from Running to PartiallyRunning at 12:00:00pm Tuesday 22 September 2015

This expression can also be specified using REL syntax only:

=' Job 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" section of the REL Functions and Implicit Objects topic.

Job Definitions

The following substitution parameters can be used in some Job 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}: ID of the process
  • ${ProcessName}: Process name (for example, network-processor).
  • ${ProcessType}: Process type (standalone, service, etc.).
  • ${ProcessServer}: Name of the Job Server that the Platform Agent is configured for.
  • ${TraceDirectory}: ${DataRootDirectory}/trc.

Events

Raiser Comments

The following substitution parameters are available for raiser comments in Jobs .

  • ${jobid}: The ID of the raiser Job .
  • ${jobdescription}: The name of the raiser Job , as displayed in the Monitor screen at the time of raising the Event.
  • ${jobstatus}: The status of the Job 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.

Note: All DateTime variables use the format yyyyMMddHHmmss; you can specify a Java DateTimeFormatter using the ${FileDateTime:HHmmss} syntax.

  • ${CurrentDateTime}: Platform Agent date and 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 and time.
  • ${FileTimeStamp}: File modification time in epoch.
  • ${ServerDateTime}: Central server date and time when the Event was raised.
  • ${ServerTimeStamp}: Central server time in epoch when the Event was raised.
  • ${processServer: The name of the Job Server.
  • ${server}: The name of the Platform Agent.
  • ${filename}: The path of the detected file (before any move).
  • ${finalPath}: The new path of the detected file (after any move).

The default File Event raiser comment is the following:

File Event raised by "${filename}" on "${server}"

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 detail.

File Event Move Directory

All DateTime variables use the format yyyyMMddHHmmss. You can specify a Java DateTimeFormatter using the ${FileDateTime:HHmmss} syntax.

  • ${BaseDirectory}: The path to the directory containing the detected file.
  • ${BaseName}: The base filename of the detected file.
  • ${Name}: The filename of the detected file.
  • ${Dot}: A dot (.), such as found in filenames before the extension.
  • ${Extension}: The extension of the detected file.
  • ${CurrentDateTime}: The Platform Agent date and time when the file was detected.
  • ${CurrentTimeStamp}: The 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 and time.
  • ${FileTimeStamp}: File modification time in epoch.
  • ${fileName}: The full path 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 Workflow Definitions:

  • ${jobid}: The ID of the clearer job.
  • ${jobdescription}: Yhe raiser process name, as displayed in the Monitor screen 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)