1. 实例操作
1.1. 启动流程
URL: /business/start
Type: POST
Author: mr.sanq
Content-Type: application/json; charset=utf-8
Description: 启动流程
Body-parameters:
| Parameter | Type | Description | Required | Since |
|---|---|---|---|---|
processDefinitionKey | string | 流程图唯一标识 | true | - |
businessKey | string | 业务关联键 | true | - |
variables | map | 参数 | true | - |
└─any object | object | any object. | false | - |
assgnee | string | 代理人:[设置代理人接口必填] | true | - |
Request-example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i /business/start --data '{
"processDefinitionKey": "lqk87s",
"businessKey": "66tjrz",
"variables": {
"mapKey": {}
},
"assgnee": "37s2ts"
}'Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
meta | object | No comments found. | - |
└─success | boolean | No comments found. | - |
└─message | string | No comments found. | - |
└─code | int32 | No comments found. | - |
data | object | No comments found. | - |
Response-example:
{
"meta": {
"success": true,
"message": "success",
"code": 517
},
"data": true
}1.2. 设置代理人
URL: /business/assgnee
Type: POST
Author: mr.sanq
Content-Type: application/json; charset=utf-8
Description: 设置代理人
Body-parameters:
| Parameter | Type | Description | Required | Since |
|---|---|---|---|---|
processDefinitionKey | string | 流程图唯一标识 | true | - |
businessKey | string | 业务关联键 | true | - |
variables | map | 参数 | true | - |
└─any object | object | any object. | false | - |
assgnee | string | 代理人:[设置代理人接口必填] | true | - |
Request-example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i /business/assgnee --data '{
"processDefinitionKey": "xowfo0",
"businessKey": "2lnvh2",
"variables": {
"mapKey": {}
},
"assgnee": "9r3t9v"
}'Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
meta | object | No comments found. | - |
└─success | boolean | No comments found. | - |
└─message | string | No comments found. | - |
└─code | int32 | No comments found. | - |
data | object | No comments found. | - |
Response-example:
{
"meta": {
"success": true,
"message": "success",
"code": 520
},
"data": true
}1.3. 查看评论列表
URL: /business/comment
Type: GET
Author: mr.sanq
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 查看评论列表
Query-parameters:
| Parameter | Type | Description | Required | Since |
|---|---|---|---|---|
businessKey | string | 业务关联键 | true | - |
Request-example:
curl -X GET -i /business/comment?businessKey=am569xResponse-fields:
| Field | Type | Description | Since |
|---|---|---|---|
meta | object | No comments found. | - |
└─success | boolean | No comments found. | - |
└─message | string | No comments found. | - |
└─code | int32 | No comments found. | - |
data | array | No comments found. | - |
└─id | string | 编号 | - |
└─userId | string | 用户ID | - |
└─time | string | 评论时间 | - |
└─taskId | string | 实例ID | - |
└─processInstanceId | string | 引用做出此评论的流程实例 | - |
└─type | string | 对注释类型的引用 | - |
└─fullMessage | string | 完整评论消息 | - |
Response-example:
{
"meta": {
"success": true,
"message": "success",
"code": 780
},
"data": [
{
"id": "77",
"userId": "77",
"time": "2021-12-25 16:23:22",
"taskId": "77",
"processInstanceId": "77",
"type": "0bq9fr",
"fullMessage": "success"
}
]
}1.4. 提交任务
Type: POST
Author: mr.sanq
Content-Type: application/json; charset=utf-8
Description: 提交任务
Body-parameters:
| Parameter | Type | Description | Required | Since |
|---|---|---|---|---|
processDefinitionKey | string | 流程图唯一标识 | true | - |
businessKey | string | 业务关联键 | true | - |
variables | map | 参数 | true | - |
└─any object | object | any object. | false | - |
assgnee | string | 代理人:[设置代理人接口必填] | true | - |
Request-example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i /business/completeByBusinessKey --data '{
"processDefinitionKey": "1gpnav",
"businessKey": "jvlwnn",
"variables": {
"mapKey": {}
},
"assgnee": "o1vlzi"
}'Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
meta | object | No comments found. | - |
└─success | boolean | No comments found. | - |
└─message | string | No comments found. | - |
└─code | int32 | No comments found. | - |
data | object | No comments found. | - |
└─taskId | string | 实例ID | - |
└─ok | boolean | 是否提交成功 | - |
└─finished | boolean | 流程是否结束 | - |
Response-example:
{
"meta": {
"success": true,
"message": "success",
"code": 202
},
"data": {
"taskId": "77",
"ok": true,
"finished": true
}
}1.5. 待办任务
Type: GET
Author: mr.sanq
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 待办任务
Query-parameters:
| Parameter | Type | Description | Required | Since |
|---|---|---|---|---|
businessKey | string | 业务关联键 | true | - |
userId | string | 当前用户 | true | - |
isActive | boolean | 是否是活动状态 | false | - |
Request-example:
curl -X GET -i /business/getTaskListByAssignee?businessKey=iw3oti&isActive=true&userId=77Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
meta | object | No comments found. | - |
└─success | boolean | No comments found. | - |
└─message | string | No comments found. | - |
└─code | int32 | No comments found. | - |
data | array | No comments found. | - |
└─assignee | string | 拥有者 | - |
└─taskId | string | 任务ID | - |
└─taskName | string | 任务名称 | - |
└─processDefinitionId | string | 流程定义ID | - |
└─processInstanceId | string | 流程实例ID | - |
└─executionId | string | 执行对象ID | - |
└─createTime | string | 任务创办时间 | - |
└─processVariables | map | 流程参数 | - |
└─any object | object | any object. | - |
└─taskLocalVariables | map | 当前任务参数 | - |
└─any object | object | any object. | - |
Response-example:
{
"meta": {
"success": true,
"message": "success",
"code": 6
},
"data": [
{
"assignee": "jb7v51",
"taskId": "77",
"taskName": "健柏.田",
"processDefinitionId": "77",
"processInstanceId": "77",
"executionId": "77",
"createTime": "2021-12-25 16:23:22",
"processVariables": {
"mapKey": {}
},
"taskLocalVariables": {
"mapKey": {}
}
}
]
}1.6. 撤销流程
URL: /business/revokeFlow
Type: DELETE
Author: mr.sanq
Content-Type: application/json; charset=utf-8
Description: 撤销流程
Body-parameters:
| Parameter | Type | Description | Required | Since |
|---|---|---|---|---|
processDefinitionKey | string | 流程图唯一标识 | true | - |
businessKey | string | 业务关联键 | true | - |
userId | string | 用户ID | true | - |
reason | string | 撤销原因 | true | - |
Request-example:
curl -X DELETE -H 'Content-Type: application/json; charset=utf-8' -i /business/revokeFlow --data '{
"processDefinitionKey": "y2lp0d",
"businessKey": "8ec7k3",
"userId": "77",
"reason": "vmml29"
}'Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
meta | object | No comments found. | - |
└─success | boolean | No comments found. | - |
└─message | string | No comments found. | - |
└─code | int32 | No comments found. | - |
data | object | No comments found. | - |
Response-example:
{
"meta": {
"success": true,
"message": "success",
"code": 554
},
"data": true
}1.7. 历史流程
Type: GET
Author: mr.sanq
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 历史流程
Query-parameters:
| Parameter | Type | Description | Required | Since |
|---|---|---|---|---|
processDefinitionKey | string | 流程唯一标识 | false | - |
businessKey | string | 业务关联键 | false | - |
userId | string | 当前用户 | false | - |
currentIndex | int32 | 页码 | false | - |
pageSize | int32 | 当前展示条数 | false | - |
Request-example:
curl -X GET -i /business/getHistoryTaskList?businessKey=77r7yu&userId=77&pageSize=10&processDefinitionKey=feyx3q¤tIndex=1Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
meta | object | No comments found. | - |
└─success | boolean | No comments found. | - |
└─message | string | No comments found. | - |
└─code | int32 | No comments found. | - |
data | object | No comments found. | - |
└─pagination | object | No comments found. | - |
└─pageSize | int32 | No comments found. | - |
└─currentIndex | int32 | No comments found. | - |
└─sorts | array | No comments found. | - |
└─field | string | No comments found. | - |
└─sorted | string | No comments found. | - |
└─totalCount | int64 | No comments found. | - |
└─datas | array | No comments found. | - |
└─assignee | string | 拥有者 | - |
└─taskId | string | 任务ID | - |
└─taskName | string | 任务名称 | - |
└─processDefinitionId | string | 流程定义ID | - |
└─processInstanceId | string | 流程实例ID | - |
└─executionId | string | 执行对象ID | - |
└─createTime | string | 任务创办时间 | - |
└─processVariables | map | 流程参数 | - |
└─any object | object | any object. | - |
└─taskLocalVariables | map | 当前任务参数 | - |
└─any object | object | any object. | - |
└─startTime | string | 开始时间 | - |
└─endTime | string | 结束时间 | - |
└─claimTime | string | 领取任务的时间 | - |
Response-example:
{
"meta": {
"success": true,
"message": "success",
"code": 491
},
"data": {
"pagination": {
"pageSize": 10,
"currentIndex": 553,
"sorts": [
{
"field": "bmlseb",
"sorted": "m0776e"
}
],
"totalCount": 220
},
"datas": [
{
"assignee": "jy14hj",
"taskId": "77",
"taskName": "健柏.田",
"processDefinitionId": "77",
"processInstanceId": "77",
"executionId": "77",
"createTime": "2021-12-25 16:23:22",
"processVariables": {
"mapKey": {}
},
"taskLocalVariables": {
"mapKey": {}
},
"startTime": "2021-12-25 16:23:22",
"endTime": "2021-12-25",
"claimTime": "2021-12-25 16:23:22"
}
]
}
}