Skip to main content
Version: 4.0

Get User Pending Tasks

Path
http://{supOS ip:port}/open-api/p/workflow/v2/tasks/pending
Query parameter
  • appId: App ID.
  • username: Required username.
  • current: Page number.
  • pageSize: Items on the page.
Response
  • 200: Successful.
{
"list": [
{
"initiator": "zhangsan",
"processId": "1000492908536528",
"processName": "leave note-001",
"startTime": "2020-09-22T07:38:13.893+0800",
"status": 88,
"taskId": "1000492908536529",
"taskName": "Edit",
"url": "Page_0a4f3b38124142cbae4dae62f6664f5a"
}
],
"pagination": {
"current": 0,
"pageSize": 0,
"total": 0
}
}
  • 400
{
"code": 100108503,
"message": "username cannot be empty"
}
    • 100108502: pageSize exceeds 500.
    • 100108320: User does not exist.
  • 500
{
"code": 100000001,
"message": "internal service exception"
}

Submit Pending Tasks

Path
http://{supOS ip:port}/open-api/p/workflow/v2/tasks/pending
Request body
{
"taskId": "1000492908536529", //required. String
"username": "test", //required. String
"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": "{}"
}
Response
  • 200: Successful.
  • 400
{
"code": 100108502,
"message": "username cannot be empty"
}
    • 100108504: taskId cannot be empty.
    • 100108230: User does not exist.
    • 100108240: Permission verification error.
    • 100108237: Pending task does not exist.
    • 100108213: Pending task executor cannot be empty.
  • 500
{
"code": 100000001,
"message": "internal service exception"
}

Save Form Data Linked with Pending Tasks

Path
http://{supOS ip:port}/open-api/p/workflow/v2/tasks/pending
Request body
{
"taskId": "1000492908536529", //required. Pending task ID
"username": "test", //required
"formData": "{}"
}
Response
  • 200: Successful.
  • 400
{
"code": 100108502,
"message": "username cannot be empty"
}
    • 100108504: taskId cannot be empty.
    • 100108230: User does not exist.
    • 100108240: No permission.
    • 100108237: Pending task does not exist.
  • 500
{
"code": 100000001,
"message": "internal service exception"
}

Get Details of Pending Tasks

Path
http://{supOS ip:port}/open-api/p/workflow/v2/tasks/{taskId}/pending
Query parameter

username: Required.

Response
  • 200: Successful.
{
"companyId": "1000",
"assigns": [
{
"seqKey": "edge_123",
"taskDefKey": "userTask_123",
"name": "review"
}
],
"audits": [
{
"id": "K1236",
"name": "branch name",
"order": 1,
"value": "1",
"type": 0
}
],
"enableComment": true,
"formData": "{}",
"formTempData": "{}",
"initiator": "zhangsan",
"processId": "1000492908536528",
"processName": "leave note-001",
"readonly": true,
"showlog": true,
"multiCompany": false,
"addInstance": false,
"startTime": "2020-09-22T07:38:13.893+0800",
"status": 88,
"taskId": "1000492908536529",
"taskName": "Edit",
"url": "Page_0a4f3b38124142cbae4dae62f6664f5a"
}
  • 400
{
"code": 100108502,
"message": "username cannot be empty"
}
    • 100108504: taskId cannot be empty.
    • 100108230: User does not exist.
    • 100108240: No permission.
    • 100108237: Pending task does not exist.
  • 500
{
"code": 100000001,
"message": "internal service exception"
}

Get Total Number of Pending Tasks

Path
http://{supOS ip:port}/open-api/p/workflow/v2/tasks/pending/total
Query parameter
  • appId: App ID.
  • username: Required username.
  • current: Page number.
  • pageSize: Items on the page.
Response
  • 200: Returns the total number of pending tasks.
  • 400
{
"code": 100108502,
"message": "username cannot be empty"
}
    • 100108504: taskId cannot be empty.
    • 100108230: User does not exist.
    • 100108240: No permission.
    • 100108237: Pending task does not exist.
  • 500
{
"code": 100000001,
"message": "internal service exception"
}

Get Complete Tasks

Path
http://{supOS ip:port}/open-api/p/workflow/v2/tasks/completive
Query parameter

username: Required.

Response
  • 200: Returns the complete tasks.
{
"list": [
{
"initiator": "zhangsan",
"processId": "1000492908536528",
"processName": "leave note-001",
"reject": false,
"startTime": "2020-09-22T07:38:13.893+0800",
"endTime": "2020-09-22T07:38:13.893+0800",
"taskId": "1000492908536529",
"taskName": "Edit",
"url": "Page_0a4f3b38124142cbae4dae62f6664f5a"
}
],
"pagination": {
"current": 0,
"pageSize": 0,
"total": 0
}
}
  • 400
{
"code": 100108502,
"message": "username cannot be empty"
}
    • 100108503: pageSize exceeds the maximum 500.
    • 100108230: User does not exist.
  • 500
{
"code": 100000001,
"message": "internal service exception"
}

Get Details of Complete Tasks

Path
http://{supOS ip:port}/open-api/p/workflow/v2/tasks/{taskId}/completive
Query parameter

username: Required.

Response
  • 200: Successful.
{
"initiator": "zhangsan",
"processId": "1000492908536528",
"processName": "leave note-001",
"formData": "{}",
"reject": false,
"revoke": false,
"showlog": true,
"startTime": "2020-09-22T07:38:13.893+0800",
"endTime": "2020-09-22T07:38:13.893+0800",
"taskId": "1000492908536529",
"taskName": "Edit",
"url": "Page_0a4f3b38124142cbae4dae62f6664f5a"
}
  • 400
{
"code": 100108502,
"message": "username cannot be empty"
}
    • 100108230: User does not exist.
    • 100108238: Complete task does not exist.
    • 100108214: No permission.
  • 500
{
"code": 100000001,
"message": "internal service exception"
}

Delegate Pending Tasks

Path
http://{supOS ip:port}/open-api/p/workflow/v2/tasks/entrust
Request body
{
"mandatary": "zhangsan", //required. Entrustee
"username": "test", //required. Entruster
"reason": "business trip",
"taskId": "1000492908536529"
}
Response
  • 200: Successful.
  • 400
{
"code": 100108502,
"message": "username cannot be empty"
}
    • 100108504: taskId cannot be empty.
    • 100108505: mandatary cannot be empty.
    • 100108230: User does not exist.
    • 100108237: Pending task does not exist.
    • 100108231: Unauthorized delegation.
    • 100108218: Cannot delegate repeatedly.
    • 100108220: The other party already has permission to perform this pending task.
  • 500
{
"code": 100000001,
"message": "internal service exception"
}

Recall Pending Tasks

Path
http://{supOS ip:port}/open-api/p/workflow/v2/tasks/revocation
Request body
{
"taskId": "1000492908536529",
"username": "test" //required
}
Response
  • 200: Successful.
  • 400
{
"code": 100108502,
"message": "username cannot be empty"
}
    • 100108504: taskId cannot be empty.
    • 100108230: User does not exist.
    • 100108222: The process has ended.
    • 100108232: Cannot withdraw at parallel steps.
    • 100108236: The process status has been changed and cannot be withdrawn.
    • 100108238: Task does not exist.
    • 100108239: No prmission.
  • 500
{
"code": 100000001,
"message": "internal service exception"
}