דלג לתוכן הראשי

לקבוע שדות

שלבset-fieldscontrol

קובע, משנה שם או מחשב שדות בלי קוד. ערך יכול לשלב טקסט עם פרטים שנמצאו, או להיות חישוב כמו הסכום כפול 1.17. תאריך יכול לקבל תבנית, כמו {email.receivedAt:MM/yyyy} ל 10/2026.

במבט אחד​

מאפייןערך
שם השלבset-fields
משאבClusterStep (lumen.ai/v1alpha1)
קבוצה וקטגוריהcontrol, logic
קרדיטים0.5 קרדיטים בכל פעם שהוא מצליח
השפעה חיצוניתלא
ההתקנה צריכה לספקכלום

קלט​

מאפייןערך
צריךכלום
מפיקfields
עובד עלitem מסמך אחד בכל פעם

״צריך״ ו״מפיק״ הם סוגי נתונים (file, text, fields, email). העורך מציע שלב רק במקום שבו מה שהוא צריך כבר נמצא במסלול. ראו מסמכים ונתונים.

פלט​

More outputs are declared in the setting `fields`.

הגדרות​

מגדירים תחת config: בצומת של התהליך. הגדרות טקסט יכולות להכיל מצייני מקום כמו {nodeId.field}.

הגדרהסוגברירת מחדלתיאור
fieldsחובהlist of object-FieldsminItems 1; maxItems 50
fields[].nameחובהstring-Name is the field, for the steps after this one. A name already there is replaced, so this also renames: set the new name to {old}.minLength 1; maxLength 64; pattern `^[^{}.]+$`
fields[].valueחובהstring-A date can be written with a layout: {read.date:MM/yyyy} gives 10/2026. Layouts use yyyy, yy, MM and dd, and MMM for the month name in English (Oct).maxLength 500
fields[].typestring-Type is what the value is. Unset, it follows the value: a calculation over number fields is a number, anything else is text.one of string, number, date, boolean

ה-JSON Schema המלא של ההגדרות: set-fields.schema.json.

דוגמה​

config
fields:
- name: priceWithVat
type: number
value: '{price} * 1.18'

שימוש בתהליך​

צומת שמריץ את set-fields נכנס תחת spec.nodes של Flow. תנו לו כל מזהה, ורשמו ב-next את מזהי הצמתים הבאים.

flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: set-fields-example
namespace: tenant-acme
spec:
displayName: "Set fields"
triggers:
- id: start
ref: {name: manual-run}
next: [set-fields]
nodes:
- id: set-fields
stepRef: {name: set-fields}
config:
fields:
- name: priceWithVat
type: number
value: '{price} * 1.18'