工作流程流动

概览

第一执行:在哪里,每一步骤产生什么,以及你可以对它做的四件事——等待、恢复、重试、取消。

5 methods5 statusessurvives your process
Using Python?

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

调用功能
( 刷新)重新读取状态。
等待( 选项)投票直到达到你命名的状态
(stepID, 数据)批准等待人类一步
重试( stepId)保持以前的一切 继续往前走
(取消)停止它。 停止它。 停止它。

哪些数据

run.data;
// {
//   id, workflowId, status: "running" | "waiting" | "succeeded" | "failed" | "cancelled",
//   input: { … },
//   steps: [{ id, type, status, output, credits, error, warnings, attempts, startedAt, endedAt }],
//   credits, startedAt, endedAt
// }
run.data
# {
#   "id", "workflowId", "status": "running" | "waiting" | "succeeded" | "failed" | "cancelled",
#   "input": {…},
#   "steps": [{"id", "type", "status", "output", "credits", "error", "warnings", "attempts", "startedAt", "endedAt"}],
#   "credits", "startedAt", "endedAt"
# }

五个地位地位

状态状态状态状态状态状态状态含义做你所能做的
running进行中。cancel()
waiting停留在人类的一步。resume() · cancel()
succeeded结束了—
failed一步步失败了 。retry()
cancelled停止了 。—

每个方法更新对象

refresh(), resume(), retry() 和 cancel() 全部替换 data 与那些回来的回信 和同样的事例—— 所以你认为的参考 保持时尚。

简单一点,再刷新

数据是任何上次返回的调用。在平台上运行的移动没有告诉你—— 两次阅读数据而不更新会给出相同的答案。