خطوات سير العمل

(الحلقة الرابعة)

type: "human"

توقف التشغيل وانتظار شخص ما، إنها الطريقة الوحيدة التي يمكن لتدفق العمل أن يفعل أي شيء يترك الحساب

the run waitsno timeoutits data feeds the chain
Using Python?

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

{ id: "approve", type: "human", config: { title: "Send this digest?" } }
{"id": "approve", "type": "human", "config": {"title": "Send this digest?"}}

ما يحدث

  • حالة التشغيل waitingو الخطوة هي أيضاً
  • لا شيء في النهاية يجري.
  • resume(stepId, data) approves it.
  • ما تمرره يصبح ناتج الخطوة، مقروءاً ببقية السلسلة.
await run.resume("approve", { approved: true, recipient: "team@example.com" });

// Downstream
{ id: "send", type: "mail.send", config: {
    box: "ops@example.com",
    to: "{{steps.approve.output.recipient}}",
    subject: "Digest", text: "{{steps.write.output.text}}" } }
run.resume("approve", {"approved": True, "recipient": "team@example.com"})

# Downstream
{"id": "send", "type": "mail.send", "config": {
    "box": "ops@example.com",
    "to": "{{steps.approve.output.recipient}}",
    "subject": "Digest", "text": "{{steps.write.output.text}}"}}

الأنواع الثلاثة التي تتطلب واحداً

mail.send, hosting.deploy and domain.records

في محادثة تُسأل هذه في كل مرة ولا يفتحها أي نمط. لا يوجد من يطلبها من الركض، لذا فإن الموافقة مطلوبة في الرسم البياني - ويُرفض تعريف بدونه عندما تنقذه.

"الخطوة الرئيسية" تعني على الطريق الذي يصل إليه، والخطوة البشرية على فرع آخر لا تغطي خطوة يمكن أن تصل إليها الركض دون المرور عبره.

" " " " " " " إلى أجل أجل " " " " " " " " " " " إلى أجل أجل أجل أجل " "

الموافقة التي تُسقط من تلقاء نفسها من شأنها أن تسمح بسلسلة من الممازات مع لا أحد يُقال له - لذلك فإن الجولة التي لن يوافق عليها أحد مغلقة مع إلغاء ()و السجل يقول أنه تم إلغاؤه

مبنى IF

const waiting = (await workflow.runs()).filter((r) => r.data.status === "waiting");
waiting = [r for r in workflow.runs() if r.data["status"] == "waiting"]

لا يمكن اختبارها

( (أ) لا ينطبق على النص العربي. step_not_executableلا يوجد شيء للتنفيذ فقط شيء للموافقة عليه