Zum Hauptinhalt springen

Filter

Flow-Knotenfilterlogic

The run goes on only when this holds. Otherwise it stops quietly, without failing.

Auf einen Blick​

EigenschaftWert
Node fieldfilter (set instead of stepRef on a FlowNode)
Side effectsno

A FlowNode sets exactly one of stepRef, branch, filter, forEach, wait and approval.

Conditions use the expression language: a field, an operator and a value, as in {field: details.total, op: gte, value: 10000}.

Einstellungen​

Der Wert des Knotenfelds, mit diesen Einstellungen.

EinstellungTypStandardwertBeschreibung
whenobject-When may be left out while the filter is not set up yet, as in a branch case; the webhook reports the Flow incomplete.
when.exprstring-Expr is the condition as text. Every field in it is a node or trigger upstream on every path to this one, and one of its outputs.
when.fieldstring-Field is <nodeId>.<field>: a node or trigger upstream on every path to this one, and one of its outputs.
when.opstring-

Das vollständige JSON Schema dieser Einstellungen: filter.schema.json.

Im Flow verwenden​

flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Connector
metadata:
name: my-email-forward
namespace: tenant-acme
spec:
classRef: {name: email-forward}
config: {}
---
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: filter-example
namespace: tenant-acme
spec:
displayName: "Filter"
triggers:
- id: start
ref: {name: email-arrives}
connectorRef: {name: my-email-forward}
next: [from-suppliers]
nodes:
- id: from-suppliers
filter:
when: {field: start.from, op: contains, value: "@supplier.example"}
next: [text]
- id: text
stepRef: {name: read-text}