Skip to main content

ignore-value

Syntax

Shorthand syntax

- ignore-value: constant

Extended syntax

- ignore-value:
value: constant
default: default value

Pattern variant syntax

- ignore-value:
pattern: regular expression

Expression variant syntax

- ignore-value:
expression: expression

Description

The ignore-value operation tests the incoming value by matching it against a constant value, matching it with a regular expression, or evaluating an expression. If the test fails, the value is forwarded down the chain, and the the operation remembers the value. If the test passes, the incoming value is ignored, and the operation will repeat its previously remembered value.

This operation is a form of state holding, and the expression variant can be used to “refresh” the held state on demand.

The value parameter is a constant value, such as a string or number. Value is also supported in a shorthand format. The incoming value is tested by comparing against this value for equality.

The pattern parameter is an optional alternative to value, and should be a regular expression. Regular expressions are surrounded in forward slashes (/). The incoming value will be tested by testing the regular expression against it for a match.

The expression parameter is an optional alternative to value, and can be an arbitrary expression that references other identifiers in the script. The expression supports the this keyword to reference the incoming value, but does not need to. The expression is evaluated for each incoming value and any time one of the variables in the expression itself change.

The default parameter is optional. When specified, this will be the operation's first “remembered” value. The default value will only be seen when the script starts with the ignore test passing, as there was no previous remembered value to use.

Examples

  var1:
- source: program_name
- ignore-value: warmup
info

In the above example, program-name is an identifier from another part of the adapter script.

  var1:
- source: program_name
- ignore-value:
value: warmup
default: null
info

In the above example, program-name is an identifier from another part of the adapter script.