更新时间:2024-10-21 GMT+08:00
分享

查询工作流实例

功能介绍

本接口用于查询指定工作流实例详细。

请求消息样式

GET /v2/workflowexecutions/{execution_name}?x-workflow-graph-name={graph_name} HTTP/1.1
Host: obs.cn-north-4.myhuaweicloud.com 
Authorization: authorization
Content-Type: application/json
Content-Length: length
Date: date

请求消息参数

表1 参数说明

名称

是否必选

参数类型

说明

约束

execution_name

string

工作流实例名称。

是已存在的工作流实例名称。

x-workflow-graph-name

string

工作流名称。

是已存在的工作流。

请求消息头

该请求使用公共消息头,具体参见表3

请求消息元素

该请求消息中不使用消息参数。

响应消息样式

HTTP/1.1 status_code 
Date: date 
Content-Length: length 
Content-Type: type
X-Request-ID: obs request id

响应消息头

该请求的响应消息使用公共消息头,具体请参考表1

响应消息元素

表2 响应元素

名称

参数类型

说明

execution_info

json

实例信息。

错误响应消息

无特殊错误,所有错误已经包含在表2中。

请求示例

GET /v2/workflowexecutions/{execution_name}?x-workflow-graph-name={graph_name} HTTP/1.1
Host: obs.cn-north-4.myhuaweicloud.com 
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:sc2PM13Wlfcoc/YZLK0MwsI2Zpo=
Content-Type: application/json
Content-Length: 0
Date: Thu, 27 Aug 2020 12:38:10 GMT

响应示例

HTTP/1.1 200 OK 
Date: Thu, 27 Aug 2020 12:38:10 GMT 
Content-Length: 100 
Content-Type: application/json
X-Request-ID: 6a63a18b8bab40ffb71ebd9cb80d0085
{
    "execution_info": {
        "input": "[{\"x\":123,\"y\":321},{\"x\":586}]",
        "isTest": true,
        "graph_urn": "urn:fgs:<region_id>:<project_id>:graph:<graph_name>",
        "execution_urn": "urn:fgs:<region_id>:<project_id>:execution:<graph_name>:<execution_name>:<domain_id>",
        "execution_name": "<execution_name>",
        "started_at": "2017-11-13T07:14:04.849Z",
        "state_map": {
            "next1": {
                "state_name": "next1",
                "status": "NOTRUNNING",
                "type": "NOOP"
            },
            "end1": {
                "state_name": "end1",
                "status": "NOTRUNNING",
                "type": "END"
            },
            "hello": {
                "state_name": "hello",
                "status": "RUNNING",
                "started_at": "2017-11-13T07:14:04.893Z",
                "type": "DELAY",
                "input": "[{\"x\":123,\"y\":321},{\"x\":586}]"
            }
        },
        "start_state": "hello",
        "execution_state": "RUNNING",
        "execution_type": "APICALL"
    }
}

相关文档