描述
获取工作流实例列表。
请求
URL
HTTP请求方式
GET
HTTP请求参数
名称 | 是否必需 | 类型 | 描述 |
---|---|---|---|
filter | 否 | String | 筛选条件。参考下文 filter 参数说明 |
start | 否 | Integer | 分页开始索引,此处的默认值0 |
limit | 否 | Integer | 每页数据,此处的默认值20 |
sort | 否 | String | 排序字段(只支持单个字段),降序前面加-(例如:-CreateTime 表示单据模板列表按创建时间降序)。 |
count | 否 | bool | 返回总数,总数字段在Response的Header里,名为Total-Count。 |
- filter 参数说明:
名称 | 是否必需 | 类型 | 描述1 |
---|---|---|---|
Id | 是 | String | 查询字段Id。 |
Operator | 是 | String | 运算参数: - = 等于 - <> 不等于 - like 包含 - not like 不包含 - > 大于 - > 大于 - >= 大于等于 - < 小于 - range 范围 |
Value1 | 是 | String | 比较值(使用范围条件时的较小值)。 |
Value2 | 否 | String | 使用范围条件时的较大值。 |
响应
- 返回参数
返回工作流实例列表,列表数据项参数说明:
名称 | 类型 | 描述 |
---|---|---|
Id | String | 工作流实例Id。 |
Title | String | 工作流实例标题。 |
IsImportant | Boolean | 是否重要。 |
IsUrgent | Boolean | 是否紧急。 |
Status | Integer | 工作流运行状态 1-完成,2-暂停,3-停止,4-创建,5-运行。 |
WFTplId | String | 流程模板Id。 |
CurrentNodeId | String | 当前执行节点Id。 |
CurrentNodeName | String | 当前执行节点名称。 |
CreatorPositionId | String | 流程创建者岗位Id。 |
Creator | String | 流程创建者Id。 |
CreatorName | String | 流程创建者名称。 |
CreateTime | String | 流程创建时间。 |
示例
请求示例
HTTP/1.1
GET /v1/workflow/templates/8c50cd03-905b-8dd1-d7a9-1bbf35b868f1/instances?filter=xxx&start=0&limit=20&sort=-CreateTime&count=false
Host: api.dadayun.cn
Date: Thu, 30 Aug 2018 02:55:22 GMT
正常返回示例
HTTP/1.1 200 OK
Date: Thu, 30 Aug 2018 02:55:22 GMT
Content-Type: application/json; charset=utf-8
[
{
"Id": "8c50cd03-905b-8dd1-d7a9-1bbf35b868f1",
"Title": "深圳瑞祥贸易有限公司_业务管理员_2015-10-19",
"IsImportant": false,
"IsUrgent": false,
"Status": 5,
"WFTplId": "8ac78f4c-a7eb-4d0c-ab8e-19930fa4ec6f",
"CurrentNodeId": "f4d24690-07b2-4887-a2a1-2046d28b8ea0",
"CurrentNodeName": "采购经理审批",
"CurrentActors": "采购部经理-叶小玲",
"CreatorPositionId": "56d16567-2b0f-48a3-ba17-bbd902df1ad8",
"Creator": "0647154d-c87c-4b91-9553-7e7025e24545",
"CreatorName": "业务管理员",
"CreateTime": "2015-10-14T02:09:20.447Z"
},
...
]
异常返回示例
HTTP/1.1 500 Internal Server Error
Date: Thu, 30 Aug 2018 02:55:22 GMT
Content-Type: application/json; charset=utf-8
{
"Code": "InternalError",
"Message": "未知错误"
}