更新时间:2024-05-27 GMT+08:00
分享

查询任务列表

功能介绍

查询任务列表。

URI

POST /services/workflow/queryTaskList/{pageSize}/{curPage}

示例接口地址:{域名(有文根需带文根)}/pdmcore/ipdcworkflowservice/services/workflow/queryTaskList/2/1

表1 路径参数

参数

是否必选

参数类型

描述

pageSize

String

分页大小

curPage

String

当前页数

请求头

使用机机认证调用接口时需传入header:Authorization,其值为机机鉴权token。

请求参数

表2 请求body,筛选条件

参数

是否必选

参数类型

描述

processInstanceStartTime

String

流程创建开始时间

processInstanceEndTime

String

流程创建结束时间

createStartTime

String

任务启动开始时间

createEndTime

String

任务启动结束时间

processDefinitionId

String

流程模板ID

businessKeys

String

业务流水号,多个以逗号隔开

processDefinitionName

String

流程模板名称

processDefinitionNameCn

String

流程模板名称中文

processDefinitionNames

String

流程模板名称

taskDefinitionKey

String

任务定义编码

taskDefinitionName

String

任务定义名称

pageSize

Integer

每页的条数

curPage

Integer

当前页数

businessKey

String

业务流水号

i18n

Integer

国际化标识

title

String

流程标题

titleCn

String

流程标题中文

titles

Array of strings

流程标题列表

createdBy

String

创建人

category

String

流程类型

lastUpdateName

String

最后修改人

taskHandler

String

任务处理人

requestSource

String

请求源

startUserId

String

发起流程的用户

lifeCycleState

String

生命周期状态

sites

String

站点查询

state

String

状态

userId

String

用户

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

orderId

String

请求跟踪流水号

msg

String

接口响应信息

code

Integer

接口返回码

data

Array of HistoricProcessInstanceVO objects

接口响应数据,JSON对象或数组

pageInfo

PageVo object

标准响应体分页信息

表4 HistoricProcessInstanceVO

参数

参数类型

描述

processInstanceId

String

流程实例ID

processDefinitionId

String

流程定义ID(拼接字段:流程模板key+版本+流程实例ID)

processDefinitionName

String

流程模板ID

processDefinitionNameCn

String

流程模板名称

businessKey

String

业务流水号

taskDefinitionKey

String

任务节点流水号

taskDefinitionName

String

任务节点名称

startTime

String

开始时间

title

String

流程标题

state

String

流程实例运行状态

lifeCycleState

String

生命周期状态

handlers

String

处理人

userIds

String

用户ID集合

lastUpdateDate

String

最后更新时间

suspensionState

String

流程暂停状态

processInstanceStartTime

String

流程实例开始时间

processInstanceEndTime

String

流程实例结束时间

createdBy

String

创建人ID

createdByName

String

创建人账号

endTime

String

结束时间

tenantId

String

租户ID

userId

String

用户ID

createStartTime

String

创建开始时间

createEndTime

String

创建结束时间

createTaskTime

String

任务创建时间

completeStartTime

String

审批结束的开始时间

category

String

流程类型

completeEndTime

String

审批结束的结束时间

transferSign

String

代办标志:0代表全部我的代办,1代表可以转审的

taskId

String

任务ID

startUserId

String

启动用户ID

startUserName

String

启动用户名字

taskUrl

String

任务的URL

filterResult

Array of strings

定制返回结果

groupIdList

Array of strings

group ID集合

sequenceCount

Integer

序列数

lastUpdateBy

String

最后更新人

lastUpdateName

String

最后更新人名称

operationState

String

流程操作状态

site

String

引擎站点标识

dueDate

String

截止日期

表5 PageVo

参数

参数类型

描述

totalRows

Integer

总共有多少条数据

curPage

Integer

当前是第几页

pageSize

Integer

一页有多少条数据

totalPages

Integer

总共有多少页

请求示例

入参包含userId则查对应user的任务,不包含则查当前登录用户的任务

{ 
  "userId" : "1008600000065234815" 
}

响应示例

{
    "msg": null,
    "code": 0,
    "data": [
        {
            "processInstanceId": "bf04e6fb-06c8-11ef-9d67-fa163e227a9b",
            "processDefinitionName": "Interface_show",
            "processDefinitionNameCn": "接口showcase",
            "businessKey": "P10001721",
            "title": "Interface_show_2024-04-30T16:07:53.811+0800",
            "category": "http://bpmn.io/schema/bpmn",
            "createdByName": "xxx@ipdcenter203.huaweiapaas.com",
            "processInstanceStartTime": 1714464473978,
            "processInstanceEndTime": null,
            "state": "ACTIVE",
            "lifeCycleState": null,
            "taskList": [
                {
                    "processInstanceId": "bf04e6fb-06c8-11ef-9d67-fa163e227a9b",
                    "taskId": "bf075807-06c8-11ef-9d67-fa163e227a9b",
                    "taskDefinitionKey": "Activity_0c3pfp1",
                    "taskDefinitionName": "用户任务",
                    "handlers": "xxx@ipdcenter203.huaweiapaas.com",
                    "userIds": "1008600000026143011",
                    "groupIds": "",
                    "ccuserIds": "",
                    "ccUserNames": null,
                    "startTime": 1714464473993,
                    "endTime": null,
                    "status": "doing",
                    "createdBy": "1008600000026143011",
                    "createName": null,
                    "approvalUserName": null
                }
            ],
            "site": null
        },
        {
            "processInstanceId": "1d2fe857-06b9-11ef-9d67-fa163e227a9b",
            "processDefinitionName": "New_EC",
            "processDefinitionNameCn": "新EC流程",
            "businessKey": "P10001720",
            "title": "Py_New_EC_2024-04-30T14:15:59.689+0800",
            "category": "http://bpmn.io/schema/bpmn",
            "createdByName": "xxx@ipdcenter203.huaweiapaas.com",
            "processInstanceStartTime": 1714457760018,
            "processInstanceEndTime": null,
            "state": "ACTIVE",
            "lifeCycleState": null,
            "taskList": [
                {
                    "processInstanceId": "1d2fe857-06b9-11ef-9d67-fa163e227a9b",
                    "taskId": "2106ba08-06b9-11ef-9d67-fa163e227a9b",
                    "taskDefinitionKey": "Activity_1pxq6vg",
                    "taskDefinitionName": "项目经理审核",
                    "handlers": "xxx@ipdcenter203.huaweiapaas.com",
                    "userIds": "1008600000026143011",
                    "groupIds": "",
                    "ccuserIds": "",
                    "ccUserNames": null,
                    "startTime": 1714457766458,
                    "endTime": null,
                    "status": "doing",
                    "createdBy": "1008600000026143011",
                    "createName": null,
                    "approvalUserName": null
                },
                {
                    "processInstanceId": "1d2fe857-06b9-11ef-9d67-fa163e227a9b",
                    "taskId": "1d331cbc-06b9-11ef-9d67-fa163e227a9b",
                    "taskDefinitionKey": "Activity_120d57p",
                    "taskDefinitionName": "修改变更对象",
                    "handlers": "xxx@ipdcenter203.huaweiapaas.com",
                    "userIds": "1008600000026143011",
                    "groupIds": "",
                    "ccuserIds": "",
                    "ccUserNames": null,
                    "startTime": 1714457760038,
                    "endTime": 1714457766435,
                    "status": "finished",
                    "createdBy": "1008600000026143011",
                    "createName": null,
                    "approvalUserName": "xxx@ipdcenter203.huaweiapaas.com"
                }
            ],
            "site": null
        }
    ],
    "pageInfo": {
        "totalRows": 1307,
        "curPage": 1,
        "pageSize": 2,
        "totalPages": 654
    },
    "orderID": "9769704e48794f4694460d642deaad05"
}

状态码

状态码

描述

200

带分页的标准响应体

错误码

请参见错误码

分享:

    相关文档

    相关产品