סינון
Flow node
filterlogicההרצה ממשיכה רק כשזה נכון. אחרת היא נעצרת בשקט, בלי להיכשל.
במבט אחד
| מאפיין | ערך |
|---|---|
| Node field | filter (set instead of stepRef on a FlowNode) |
| Side effects | no |
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}.
הגדרות
The value of the node field, with these settings.
| הגדרה | סוג | ברירת מחדל | תיאור |
|---|---|---|---|
when | object | - | 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.expr | string | - | 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.field | string | - | Field is <nodeId>.<field>: a node or trigger upstream on every path to this one, and one of its outputs. |
when.op | string | - |
ה-JSON Schema המלא של ההגדרות: filter.schema.json.
שימוש בתהליך
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}
הדף עזר לכם?