Saltar al contenido principal

Filter

Nodo de flujofilterlogic

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

De un vistazo​

PropiedadValor
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}.

Ajustes​

El valor del campo del nodo, con estos ajustes.

AjusteTipoValor por defectoDescripción
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-

El JSON Schema completo de estos ajustes: filter.schema.json.

Úsalo en un flujo​

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}