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

להמיר מטבע

שלבcurrency-convertcontrol

ממיר סכום לפי השער היציג של בנק ישראל ליום. בסוף שבוע או בחג משתמשים בשער האחרון שפורסם.

במבט אחד​

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

קלט​

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

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

פלט​

צומת מאוחר יותר מפנה לפלט כ-{nodeId.field} בטקסט, או כ-nodeId.field בתנאי.

פלטסוג
convertednumber
ratenumber
rateDatedate

הגדרות​

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

הגדרהסוגברירת מחדלתיאור
amountחובהstring-Amount is the number to convert.minLength 1; maxLength 64
fromחובהstring"USD"From and To are ISO 4217 codes: ILS or one the Bank of Israel publishes a rate for (fx.Currencies; a test keeps the lists in step).one of ILS, USD, EUR, GBP, JPY, CHF, AUD, CAD, DKK, NOK, SEK, ZAR, JOD, EGP, LBP
toחובהstring"ILS"To currencyone of ILS, USD, EUR, GBP, JPY, CHF, AUD, CAD, DKK, NOK, SEK, ZAR, JOD, EGP, LBP
dateModestring"latest"DateMode says which day the rate is of: latest (the default), date (the day in Date) or field (a day an earlier step found, a placeholder in Date). Left out it follows Date as before: empty is the latest, else the day Date names.one of latest, date, field
datestring-Date is the day of the rate, YYYY-MM-DD, or a placeholder for one. A day with no rate (a weekend, a holiday) takes the last one published before it.maxLength 32

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

דוגמה​

config
amount: '{amount}'
date: "2026-10-01"
dateMode: date
from: USD
to: ILS

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

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

flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: currency-convert-example
namespace: tenant-acme
spec:
displayName: "Convert a currency"
triggers:
- id: start
ref: {name: manual-run}
next: [currency-convert]
nodes:
- id: currency-convert
stepRef: {name: currency-convert}
config:
amount: '{amount}'
date: "2026-10-01"
dateMode: date
from: USD
to: ILS