更新时间:2023-06-21 GMT+08:00

异步执行工作流

功能介绍

以异步执行方式启动工作流,暂不支持国际站局点调用

URI

POST /v2/{project_id}/fgs/workflows/{workflow_id}/executions

表1 路径参数

参数

是否必选

参数类型

描述

project_id

是

String

项目ID,获取方式请参见获取项目ID。

最小长度:1

最大长度:64

workflow_id

是

String

工作流定义ID

最小长度:1

最大长度:512

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Create-Time

否

String

workflowRun task create time

X-WorkflowRun-ID

否

String

workflowRun id

X-WorkflowRun-MergeFnParameters

否

String

Combines the output of the previous node with the input of the next node into an input.

表3 请求Body参数

参数

是否必选

参数类型

描述

headers

否

Object

执行时需要的Header

input

是

Object

定义执行时的入参,支持使用JSONPATH进行映射,以及指定默认值

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

execution_id

String

错误码

最小长度:1

最大长度:64

状态码: 400

表5 响应Body参数

参数

参数类型

描述

error_code

String

错误码

最小长度:1

最大长度:36

error_msg

String

错误描述

最小长度:2

最大长度:512

状态码: 404

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码

最小长度:1

最大长度:36

error_msg

String

错误描述

最小长度:2

最大长度:512

状态码: 500

表7 响应Body参数

参数

参数类型

描述

error_code

String

错误码

最小长度:1

最大长度:36

error_msg

String

错误描述

最小长度:2

最大长度:512

请求示例

开始执行工作流。

POST /v2/{project_id}/fgs/workflows/{workflow_id}/executions

{
  "headers" : {
    "tenantId" : "user1"
  },
  "input" : {
    "arg1" : "argument_1",
    "arg2" : "argument_2"
  }
}

响应示例

状态码: 200

Success

{
  "execution_id" : "48aff955-ea10-4ffd-b426-190bc192dc14"
}

状态码

状态码

描述

200

Success

400

Bad Request

404

Bad Request

500

Internal Server Error

错误码

请参见错误码。