描述

获取工作流模板列表。

请求

名称 是否必需 类型 描述
fields String 返回字段,多个字段用半角逗号分割(例如:Id,Name),fields允许包含的字段(Id, Name, Status, ReportType, CreatorName, CreateTime)。
filter String 筛选条件。
如果值是时间格式,则查询创建时间在 时间值 至 时间值 + 1天 之内的工作流模板。
- 未提交 未提交
- 已提交 已提交
- 激活 激活
start Integer 分页开始索引,默认值0
limit Integer 每页数据,默认值20
sort String 排序字段(只支持单个字段),降序前面加-(例如:-CreateTime 表示单据模板列表按创建时间降序)。
count bool 返回总数,总数字段在Response的Header里,名为Total-Count。

响应

  • 返回参数

返回工作流模板列表,列表数据项参数说明:

名称 类型 描述
Id String 工作流模板Id。
Name String 工作流模板名称。
Status Integer 工作流模板状态:
- 1 未提交
- 2 测试
- 3 已提交
WorkflowType Integer 工作流模板类型,
- 1 普通工作流
- 2 自由工作流
HasInstance Boolean 是否有实例数据。
CreatorName String 创建者名称。
CreateTime Date 创建时间。

示例

请求示例

HTTP/1.1
GET  /v1/workflow/templates?fields=Id,Name,Status,ReportType,CreatorName,CreateTime&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": "cc65a060-5361-4d64-918e-ef8f85c5a492",
      "Name": "销售折扣流程",
      "Status": 1,
      "WorkflowType": 1,
      "HasInstance": false,
      "CreatorName": "系统管理员",
      "CreateTime": "2015-05-28T05:55:30.960Z"
  },
  {
      "Id": "efac0313-34c1-481c-9376-cea8cb37340b",
      "Name": "项目任务安排",
      "Status": 3,
      "WorkflowType": 1,
      "HasInstance": false,
      "CreatorName": "系统管理员",
      "CreateTime": "2015-05-28T05:55:30.960Z"
  },
  ...
]

异常返回示例

``` HTTP HTTP/1.1 500 Internal Server Error Date: Thu, 30 Aug 2018 02:55:22 GMT Content-Type: application/json; charset=utf-8

{ "Code": "Invalid_Param", "Message": "验证参数fields不合法" }

results matching ""

    No results matching ""