להמיר מטבע
שלב
currency-convertcontrolממיר סכום לפי השער היציג של בנק ישראל ליום. בסוף שבוע או בחג משתמשים בשער האחרון שפורסם.
במבט אחד
| מאפיין | ערך |
|---|---|
| שם השלב | currency-convert |
| משאב | ClusterStep (lumen.ai/v1alpha1) |
| קבוצה וקטגוריה | control, business |
| קרדיטים | 0.5 קרדיטים בכל פעם שהוא מצליח |
| השפעה חיצונית | לא |
| ההתקנה צריכה לספק | כלום |
קלט
| מאפיין | ערך |
|---|---|
| צריך | כלום |
| מפיק | fields |
| עובד על | item מסמך אחד בכל פעם |
״צריך״ ו״מפיק״ הם סוגי נתונים (file, text, fields, email). העורך מציע שלב רק במקום שבו מה שהוא צריך כבר נמצא במסלול. ראו מסמכים ונתונים.
פלט
צומת מאוחר יותר מפנה לפלט כ-{nodeId.field} בטקסט, או כ-nodeId.field בתנאי.
| פלט | סוג |
|---|---|
converted | number |
rate | number |
rateDate | date |
הגדרות
מגדירים תחת 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 |
dateMode | string | "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 |
date | string | - | 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
הדף עזר לכם?