عدد العمل

resume()

run.resume(stepId, data) → Promise<WorkflowRun>

توافق على خطوة إنسانية في انتظارها ودع السلسلة تستمر. ما تمرره يصبح ناتج تلك الخطوة، بحيث تستطيع بقية السلسلة قراءتها.

the approvaldata becomes outputrun_not_waiting
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

const step = run.data.steps.find((s) => s.status === "waiting");

await run.resume(step.id, { approved: true, note: "Checked the figures." });
// Downstream steps can read {{steps.<id>.output.approved}}
step = next(s for s in run.data["steps"] if s["status"] == "waiting")

run.resume(step["id"], {"approved": True, "note": "Checked the figures."})
# Downstream steps can read {{steps.<id>.output.approved}}
stepIdstringمطلوب

خطوة الانتظار

dataobject{}

يتحول إلى ناتج الخطوة، يمكن قراءته من قبل بقية السلسلة.

لماذا توجد خطوات بشرية

دال - الإرسال والنشر والكتابة DNS طلب واحد

هناك تدفق للعمل مع لا أحد يراقب، لذا لا يمكن سؤال هؤلاء الثلاثة عنهم أثناء التشغيل. الموافقة مطلوبة في الرسم البياني بدلاً من ذلك، و التعريف بدونه يرفض عندما يتم حفظه.

البيانات جزء من السلسلة

ليس مجرد نعم. يمكن للمستعرض أن يغير سطر الموضوع، يختار المتلقي، يختار فرعاً - والخطوات بعد قراءته تلك القيم من خلال قوالب، نفس ناتج أي خطوة أخرى.

// The human step
{ id: "approve", type: "human", config: { title: "Send this?" } }

// A step after it
{ id: "send", type: "mail.send", config: {
    box: "ops@example.com",
    to: "{{steps.approve.output.recipient}}",
    subject: "{{steps.approve.output.subject}}",
    text: "{{steps.draft.output.text}}" } }
# The human step
{"id": "approve", "type": "human", "config": {"title": "Send this?"}}

# A step after it
{"id": "send", "type": "mail.send", "config": {
    "box": "ops@example.com",
    "to": "{{steps.approve.output.recipient}}",
    "subject": "{{steps.approve.output.subject}}",
    "text": "{{steps.draft.output.text}}"}}

الأخطاء

الرمزمتى
run_not_waitingالركض لم يتوقف عند خطوة بشرية
step_not_foundلا خطوة من هذا القبيل في هذا المسعى.

يمكن الموافقة عليها من أي مكان

تحصل علىRunR(RR(ed) يعطي كائن تشغيل كامل من محدد الهوية وحده - لذلك واجهة الموافقة لا تحتاج إلا إلى هوية.