15. 【App】WorkFlow-Process
15.1. 获取我的流程
其中以ended字段区分进行中和已完成
Type: GET
Author: Timothy
Content-Type: application/x-www-form-urlencoded
Description: 获取我的流程
其中以ended字段区分进行中和已完成
Request-example:
curl -X GET -i '/flow/process/listMine'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
id |
string |
ID |
- |
definitionId |
string |
Definition Id |
- |
instanceId |
string |
Instance Id |
- |
activityId |
string |
ActivityId |
- |
activityName |
string |
ActivityName |
- |
key |
string |
Key |
- |
caseId |
string |
CaseInstanceId |
- |
name |
string |
名称 |
- |
deployId |
string |
部署ID |
- |
version |
int32 |
版本 |
- |
revision |
int32 |
修订 |
- |
firstVersion |
boolean |
是否首版 |
- |
started |
boolean |
是否开始 |
- |
suspended |
boolean |
是否暂停 |
- |
active |
boolean |
是否活动 |
- |
ended |
boolean |
是否完成 |
- |
tenantId |
string |
承租人ID |
- |
timeToLive |
int32 |
生存时间 |
- |
description |
string |
描述 |
- |
businessKey |
string |
Business Key |
- |
title |
string |
标题 |
- |
content |
string |
内容 |
- |
amount |
int32 |
数量 |
- |
initiator |
string |
发起人 |
- |
variables |
object |
User Variables |
- |
└─mapKey |
object |
A map key. |
- |
└─any object |
object |
any object. |
- |
formFields |
array |
Form Fields |
- |
└─id |
string |
No comments found. |
- |
└─label |
string |
No comments found. |
- |
└─type |
object |
No comments found. |
- |
└─name |
string |
Name for the form type. |
- |
└─typeName |
string |
No comments found. |
- |
└─defaultValue |
object |
No comments found. |
- |
└─value |
object |
No comments found. |
- |
└─value |
object |
The actual value. May be null in case the value is null. |
- |
└─type |
object |
The type of the value. See ValueType for a list of built-in ValueTypes. |
- |
└─name |
string |
Returns the name of the variable type |
- |
└─primitiveValueType |
boolean |
Indicates whether this type is primitive valued. Primitive valued types can be handled |
- |
└─parent |
object |
Gets the parent value type. |
- |
└─abstract |
boolean |
Returns whether the value type is abstract. This is <b>not related |
- |
└─transient |
boolean |
Indicator for transience of the value |
- |
└─validationConstraints |
array |
No comments found. |
- |
└─name |
string |
No comments found. |
- |
└─configuration |
object |
No comments found. |
- |
└─properties |
object |
No comments found. |
- |
└─mapKey |
string |
A map key. |
- |
└─businessKey |
boolean |
No comments found. |
- |
Response-example:
[{"id":"","definitionId":"","instanceId":"","activityId":"","activityName":"","key":"","caseId":"","name":"","deployId":"","version":0,"revision":0,"firstVersion":true,"started":true,"suspended":true,"active":true,"ended":true,"tenantId":"","timeToLive":0,"description":"","businessKey":"","title":"","content":"","amount":0,"initiator":"","variables":{"mapKey":{"warning":"Using java.util.Object as a Map value is not recommended. Smart-doc cannot process it properly. Please use a specific type for better documentation generation."}}"formFields":[{"id":"","label":"","type":{"name":""},"typeName":"","defaultValue":{},"value":{"value":{},"type":{"name":"","primitiveValueType":true,"parent":{"$ref":"..."},"abstract":true},"transient":true},"validationConstraints":[{"name":"","configuration":{}}],"properties":{"mapKey1":"","mapKey2":""}"businessKey":true}]}]
15.2. 列表流程的历史任务
Type: GET
Author: Timothy
Content-Type: application/x-www-form-urlencoded
Description: 列表流程的历史任务
Query-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
processId |
string |
No comments found. |
false |
- |
Request-example:
curl -X GET -i '/flow/process/listProcessTask?=54gyom'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
id |
string |
ID |
- |
parentId |
string |
父ID |
- |
name |
string |
任务名称 |
- |
processName |
string |
流程名称 |
- |
taskKey |
string |
任务键值 |
- |
userId |
string |
发起者用户ID |
- |
username |
string |
发起者用户名 |
- |
nickname |
string |
发起者用户昵称 |
- |
owner |
string |
所有者 |
- |
assignee |
string |
委派人 |
- |
executionId |
string |
执行ID |
- |
instanceId |
string |
进程实例ID |
- |
definitionId |
string |
进程定义ID |
- |
tenantId |
string |
承租人ID |
- |
suspended |
boolean |
是否暂停 |
- |
state |
string |
任务状态 |
- |
deleted |
boolean |
是否已删除 |
- |
description |
string |
描述 |
- |
duration |
int64 |
持续时间(Millis) |
- |
startTime |
string |
发起时间 |
- |
createTime |
string |
创建时间 |
- |
endTime |
string |
完成时间 |
- |
updateTime |
string |
最后更新时间 |
- |
removalTime |
string |
最后期限 |
- |
variables |
object |
User Variables |
- |
└─mapKey |
object |
A map key. |
- |
└─any object |
object |
any object. |
- |
Response-example:
[
{
"id": "",
"parentId": "",
"name": "",
"processName": "",
"taskKey": "",
"userId": "",
"username": "",
"nickname": "",
"owner": "",
"assignee": "",
"executionId": "",
"instanceId": "",
"definitionId": "",
"tenantId": "",
"suspended": true,
"state": "",
"deleted": true,
"description": "",
"duration": 0,
"startTime": "yyyy-MM-dd HH:mm:ss",
"createTime": "yyyy-MM-dd HH:mm:ss",
"endTime": "yyyy-MM-dd HH:mm:ss",
"updateTime": "yyyy-MM-dd HH:mm:ss",
"removalTime": "yyyy-MM-dd HH:mm:ss",
"variables": {
"mapKey": {
"warning": "Using java.util.Object as a Map value is not recommended. Smart-doc cannot process it properly. Please use a specific type for better documentation generation."
}
}
}
]
15.3. 开始流程
URL: /flow/process/start
Type: POST
Author: Timothy
Content-Type: application/x-www-form-urlencoded
Description: 开始流程
Query-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
key |
string |
流程定义Key |
false |
- |
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
mapKey |
object |
A map key. |
false |
- |
└─any object |
object |
any object. |
true |
- |
Request-example:
curl -X POST -i '/flow/process/start' --data 'params=&=6vsuem'
15.4. 撤销流程
URL: /flow/process/revoke
Type: DELETE
Author: Timothy
Content-Type: application/x-www-form-urlencoded
Description: 撤销流程
Query-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
instanceId |
string |
流程实例ID |
false |
- |
Request-example:
curl -X DELETE -i '/flow/process/revoke?=dropkr'
Response-example:
true