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

בקשת אישור

Flow nodeapprovallogicהשפעה חיצונית

שולח למישהו טופס במייל ומחכה לתשובה שלו. בתשובות אפשר להשתמש בשלבים שאחריו.

במבט אחד​

מאפייןערך
Node fieldapproval (set instead of stepRef on a FlowNode)
Side effectsyes

A FlowNode sets exactly one of stepRef, branch, filter, forEach, wait and approval.

הגדרות​

The value of the node field, with these settings.

הגדרהסוגברירת מחדלתיאור
toחובהstring-To is the address the form is sent to. It may use {<nodeId>.<field>} placeholders, e.g. {email.from}.
subjectstring-Subject of the email; placeholders allowed.
messagestring-Message is shown above the form; placeholders allowed.
attachboolean-Attach emails the files the run holds here with the form, so the person reads the change list and opens the file in one email. Files over the email limit are named in it instead.
fieldsחובהlist of object-Fields are what the person fills in.
fields[].nameחובהstring-Name is the output's name, <nodeId>.<name>.
fields[].labelstring-Label is what the person reads; defaults to the name.
fields[].typeחובהstring-
fields[].requiredboolean-
fields[].optionslist of string-Options a select field offers.
fields[].defaultstring-Default prefills the field; placeholders allowed.
timeoutstring-Timeout is how long the form stays open; unanswered by then, the run fails. Defaults to 72h.pattern `^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$`
timeZonestring-TimeZone is the IANA time zone the form's closing time is shown in, instead of the workspace's.
remindersobject-Reminders are sent in the form email's thread while nobody has answered.
reminders.afterlist of string-How long after the email went out, such as 24h. Each one sends a reminder if nobody answered by then; at most three, each shorter than the timeout.
reminders.messagestring-Empty is Lumen's own text, in the email's language.
onTimeoutobject-OnTimeout says who is told when the form closes unanswered and the run fails here.
onTimeout.notifylist of string-Addresses told when nobody answered in time; {email.from} is the sender of the email that started the run.
onTimeout.messagestring-Empty is Lumen's own text, in the email's language.

ה-JSON Schema המלא של ההגדרות: approval.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: approval-example
namespace: tenant-acme
spec:
displayName: "Ask for approval"
triggers:
- id: start
ref: {name: email-arrives}
connectorRef: {name: my-email-forward}
next: [text]
nodes:
- id: text
stepRef: {name: read-text}
next: [approve]
- id: approve
approval:
to: approvals@yourcompany.co.il
subject: "Approve the invoice from {start.from}?"
timeout: 48h
fields:
- {name: approved, label: Approve payment, type: boolean, required: true}
- {name: comment, type: text}
next: [keep]
- id: keep
stepRef: {name: save-file}
config: {destination: lumen}