Get Process Start Details
Path
http://{supOS ip:port}/open-api/p/workflow/v2/processes/{processKey}/startInfo
Response
- 200: Successful.
{
"companyId": "1000",
"assigns": [
{
"seqKey": "edge_123",
"name": "review"
}
],
"audits": [
{
"seqKey": "edge_123",
"name": "agree",
"order": 1,
"value": "1",
"type": 0
}
],
"enableComment": true,
"multiCompany": true,
"enableSave": false,
"processName": "leave workflow",
"readOnly": false,
"firstTaskName": "Edit",
"url": "Page_0a4f3b38124142cbae4dae62f6664f5a"
}
- 400
{
"code": 100108112,
"message": "process is not published"
}
- 100108002: Process design does not exist.
- 100108112: Process is not published.
- 500
{
"code": 100000001,
"message": "internal service exception"
}
Get Process Details
Path
http://{supOS ip:port}/open-api/p/workflow/v2/processes/{processId}
Query parameter
username: Required.
Response
- 200: Successful.
{
"appId": "App_325ea305252fe5d0d1f78b1c2efe2413",
"processId": "1000492908536528",
"processName": "leave workflow",
"endTime": "2020-09-22T07:38:13.893+0800",
"startTime": "2020-09-22T07:38:13.893+0800",
"status": 88,
"tasks": [
{
"username": "test",
"taskId": "1000492908536528",
"taskName": "review"
}
]
}
- 400
{
"code": 100108227,
"message": "process instance does not exist"
}
- 100108502: username cannot be empty.
- 100108230: User does not exist.
- 100108214: No permission.
- 500
{
"code": 100000001,
"message": "internal service exception"
}
Get Process Logs
Path
http://{supOS ip:port}/open-api/p/workflow/v2/processes/{processId}/logs
Response
- 200: Successful.
[
{
"auditResult": "agree",
"comment": "business trip",
"createTime": "2020-09-22T07:38:13.893+0800",
"operateDesc": "reviewed by zhangsan",
"operator": "test",
"taskName": "review",
"type": "TASK_COMPLETE"
}
]
- 400
{
"code": 100108227,
"message": "process instance does not exist"
}
- 500
{
"code": 100000001,
"message": "internal service exception"
}
Get Reminder Information
Path
http://{supOS ip:port}/open-api/p/workflow/v2/processes/{processId}/urgeInfo
Response
- 200: Successful.
[
{
"taskId": "1000711857627856",
"taskName": "review",
"url": "Page_3d5f89e8578f4d3796f6fb6d4bda49b6",
"users": [
{
"username": "test",
"showName": "test user"
}
]
}
]
- 400
{
"code": 100108227,
"message": "process instance does not exist"
}
100108506: processId cannot be empty.
- 500
{
"code": 100000001,
"message": "internal service exception"
}
Get Processes Initiated by User
Path
http://{supOS ip:port}/open-api/p/workflow/v2/processes
Query parameter
- appId: App ID.
- status: String. 88-ongoing/77-pause/99-void/66-completed
- username: Required username.
- current: Page number.
- pageSize: Items on the page.
Response
- 200: Successful.
{
"list": [
{
"appId": "App_325ea305252fe5d0d1f78b1c2efe2413",
"processId": "1000492908536528",
"processName": "leave workflow",
"endTime": "2020-09-22T07:38:13.893+0800",
"startTime": "2020-09-22T07:38:13.893+0800",
"status": 88,
"tasks": [
{
"username": "test",
"taskId": "1000492908536528",
"taskName": "review"
}
]
}
],
"pagination": {
"current": 0,
"pageSize": 0,
"total": 0
}
}
- 400
{
"code": 100108501,
"message": "process status code does not exist"
}
- 100108502: username cannot be empty.
- 100108230: User does not exist.
- 100108503: pageSize exceeds the maximum value of 500.
- 500
{
"code": 100000001,
"message": "internal service exception"
}
Save Process Startup Page
After clicking Save, the process will start and pause at the first user.
Path
http://{supOS ip:port}/open-api/p/workflow/v2/processes
Request body
{
"appId": "App_eab56959eef74c1ea2e1a5fbe7b38ddf",
"formData": "{}",
"processKey": "K2002018123456789", //required. Process code
"username": "test" //required
}
Response
- 200: Successful.
{
"processId": "1000492908536528",
"taskId": "1000492908536529"
}
- 400
{
"code": 100108112,
"message": "process is not published"
}
- 100108502: username cannot be empty.
- 100108230: User does not exist.
- 100108507: processKey cannot be empty.
- 100108002: Workflow configuration does not exist.
- 500
{
"code": 100000001,
"message": "internal service exception"
}
Initiate a Process
Path
http://{supOS ip:port}/open-api/p/workflow/v2/processes
Request body
{
"appId": "App_eab56959eef74c1ea2e1a5fbe7b38ddf",
"assigns": [ //assignee list
{
"taskDefKey": "userTask_123", //node ID
"users": [ //user list
"test1",
"test2"
]
}
],
"audit": {
"seqKey": "edge_123", //flow arrow ID
"value": "1"
},
"comment": "Duration exceeded 5 days, dismiss"",
"formData": "{}",
"processKey": "K2002018123456789",
"processName": "leave note 001 process",
"username": "test"
}
Response
- 200: Successful.
{
"processId": "1000492908536528"
}
- 400
{
"code": 100108112,
"message": "process is not published"
}
- 100108230: User does not exist.
- 100108502: username cannot be empty.
- 100108507: processKey cannot be empty.
- 100108002: Workflow configuration does not exist.
- 100108112: Workflow is not published.
- 500
{
"code": 100000001,
"message": "internal service exception"
}
Cancel a Process
info
Presently only available for general user.
Path
http://{supOS ip:port}/open-api/p/workflow/v2/processes/{processId}/cancellation
Request body
{
"username": "test" //required
}
Response
- 200: Successful.
- 400
{
"code": 100108227,
"message": "process instance does not exist"
}
- 100108230: User does not exist.
- 100108502: username cannot be empty.
- 100108240: No permission.
- 500
{
"code": 100000001,
"message": "internal service exception"
}