Skip to main content

IfNot

Executes handlers conditionally when a condition evaluates to false.

Notesโ€‹

A flow control wrapper that executes then handlers when the condition evaluates to false, and optional else handlers when the condition evaluates to true. This is the logical inverse of the If flow control wrapper.

Examplesโ€‹

Parses everything that is not HTML โ€” the same routing as If, written from the other side.

handlers:
- ifNot:
condition:
class: TextCondition
fieldMatcher:
pattern: Content-Type
valueMatcher:
pattern: text/html
then:
- handler:
class: DefaultParser

Usageโ€‹

Full configuration skeleton, with every option and its default
condition:
class: DateCondition
conditionZoneId: string
docZoneId: string
fieldMatcher:
ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
format: string
label: string
valueMatcher:
date: string
operator: gt
zoneId: string
valueMatcherRangeEnd:
date: string
operator: gt
zoneId: string
else: []
label: string
name: string
then: []

Propertiesโ€‹

PropertyTypeRequiredDefault
conditionConditionNo-
elseDocHandler[]No-
labelstringNo-
namestringNoifNot
thenDocHandler[]No-

Property Detailsโ€‹

conditionโ€‹

The condition deciding which branch runs โ€” inverted, so then executes when it evaluates to false. Any condition component, or an AllOf/AnyOf/NoneOf grouping of several.

elseโ€‹

The handler or list of handlers to apply when the condition evaluates to true. Optional.

labelโ€‹

An optional, user-supplied label for this step in the importer pipeline. It has no effect on processing โ€” it exists purely to help identify this step, for example in large configurations or in the visual configurator.

nameโ€‹

The flow-control keyword identifying this step, ifNot. It is set for you; there is no reason to change it.

thenโ€‹

The handler or list of handlers to apply when the associated condition evaluates to true.