Get Task¶
Get the details of a task.
Request Format¶
GET https://{apigw-address}/enos-bpm-service/v2.0/work/tasks
Request Parameters (Header)¶
Name  | 
Location  | 
Mandatory/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|---|
Authorization  | 
Header  | 
Mandatory  | 
String  | 
The access token, which is represented by the bearer token. It can be obtained by invoking the Log In or Refresh Access Token API.  | 
Request Parameters (URI)¶
Name  | 
Location (Path/Query)  | 
Mandatory/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|---|
taskId  | 
Query  | 
Mandatory  | 
String  | 
The task ID.  | 
Response Parameters¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
data  | 
Data Struct  | 
The details of the task.  | 
Data Struct¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
id  | 
String  | 
The task ID.  | 
name  | 
String  | 
The task name.  | 
description  | 
String  | 
The task description.  | 
category  | 
String  | 
The task type.  | 
assignee  | 
UserRepresentation Struct  | 
Information about the current task assignee.  | 
created  | 
Timestamp  | 
The task creation time.  | 
dueDate  | 
Timestamp  | 
The task due time.  | 
endDate  | 
Timestamp  | 
The task end time.  | 
duration  | 
Long  | 
The task duration.  | 
priority  | 
Integer  | 
The task priority for task ordering.  | 
processInstanceId  | 
String  | 
The process instance ID.  | 
processInstanceName  | 
String  | 
The process instance name.  | 
processDefinitionId  | 
String  | 
The process definition ID.  | 
processDefinitionName  | 
String  | 
The process definition name.  | 
processDefinitionDescription  | 
String  | 
The process definition description.  | 
processDefinitionKey  | 
String  | 
The process definition key.  | 
processDefinitionCategory  | 
String  | 
The process definition type.  | 
processDefinitionVersion  | 
Integer  | 
The process definition version number.  | 
processDefinitionDeploymentId  | 
String  | 
The deployment resource ID corresponding to the process definition.  | 
scopeId  | 
String  | 
The scope ID.  | 
scopeType  | 
String  | 
The scope type.  | 
caseInstanceName  | 
String  | 
The CMMN instance name.  | 
scopeDefinitionId  | 
String  | 
The scope definition ID.  | 
caseDefinitionName  | 
String  | 
The CMMN definition name.  | 
caseDefinitionDescription  | 
String  | 
The CMMN definition description.  | 
caseDefinitionKey  | 
String  | 
The CMMN definition key.  | 
caseDefinitionCategory  | 
String  | 
The CMMN definition type.  | 
caseDefinitionVersion  | 
String  | 
The CMMN definition version number.  | 
caseDefinitionDeploymentId  | 
String  | 
The deployment resource ID corresponding to the CMMN definition.  | 
parentTaskId  | 
String  | 
The parent task ID (previous task).  | 
parentTaskName  | 
String  | 
The parent task name.  | 
formKey  | 
String  | 
The task form key.  | 
processInstanceStartUserId  | 
String  | 
The user ID of the process instance starter.  | 
candidateUsers  | 
UserRepresentation Struct Array  | 
Information about the candidate users for the task.  | 
candidateGroups  | 
String array  | 
The candidate user group names for the task.  | 
canClaim  | 
Boolean  | 
Whether the current user can claim this task.  | 
canOperate  | 
Boolean  | 
Whether the current user can execute this task.  | 
taskName  | 
String  | 
The name of current task.  | 
createdTime  | 
Timestamp  | 
The task creation time.  | 
completedTime  | 
Timestamp  | 
The task completion time.  | 
taskStatus  | 
String  | 
The task status (inProgress, completed, unclaimed).  | 
processName  | 
String  | 
The process name.  | 
UserRepresentation Struct¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
id  | 
String  | 
The user ID.  | 
firstName  | 
String  | 
The user’s first name.  | 
lastName  | 
String  | 
The user’s last name.  | 
String  | 
The user’s email.  | 
|
fullName  | 
String  | 
The user’s full name.  | 
tenantId  | 
String  | 
The organization ID.  | 
groups  | 
UserRepresentation Struct Array  | 
The user group.  | 
privileges  | 
String array  | 
The user permissions.  | 
GroupRepresentation Struct¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
id  | 
String  | 
The user group ID.  | 
name  | 
String  | 
The user group name.  | 
type  | 
String  | 
The user group type.  | 
Error Codes¶
Code  | 
Description  | 
|---|---|
33404  | 
The task ID does not exist.  | 
33432  | 
More than one process record exists.  | 
Samples¶
Request Sample¶
url: https://{apigw-address}/enos-bpm-service/v2.0/work/tasks?taskId={your_task_id}
method: GET
headers: {"Authorization":"Bearer {your_access_token}"}
Return Sample¶
{
  "code": 0,
  "msg": "",
  "data": {
    "id": "7407ff63-e5f9-11ea-b677-0214d9689c6b",
    "name": "固件升级审批",
    "description": null,
    "category": null,
    "assignee": {
      "id": "u15977401032981",
      "firstName": null,
      "lastName": null,
      "email": "john.smith@univers.com",
      "fullName": "john.smith",
      "tenantId": "o15874765326651",
      "groups": [],
      "privileges": []
    },
    "created": 1598267014452,
    "dueDate": null,
    "endDate": null,
    "duration": null,
    "priority": 50,
    "processInstanceId": "7407b133-e5f9-11ea-b677-0214d9689c6b",
    "processInstanceName": "0730升级tag",
    "processDefinitionId": "936272d4-e2d7-11ea-aa05-3ed0af00f194",
    "processDefinitionName": "0730升级tag",
    "processDefinitionDescription": null,
    "processDefinitionKey": "afa317d3cd22d11ea8c5296a6822e2ce4",
    "processDefinitionCategory": "http://flowable.org/test",
    "processDefinitionVersion": 4,
    "processDefinitionDeploymentId": "9259dc71-e2d7-11ea-aa05-3ed0af00f194",
    "scopeId": null,
    "scopeType": null,
    "caseInstanceName": null,
    "scopeDefinitionId": null,
    "caseDefinitionName": null,
    "caseDefinitionDescription": null,
    "caseDefinitionKey": null,
    "caseDefinitionCategory": null,
    "caseDefinitionVersion": 0,
    "caseDefinitionDeploymentId": null,
    "parentTaskId": null,
    "parentTaskName": null,
    "formKey": "approve0730",
    "processInstanceStartUserId": null,
    "candidateUsers": null,
    "candidateGroups": null,
    "canClaim": false,
    "canOperate": false,
    "taskName": "固件升级审批",
    "createdTime": 1598267014452,
    "processName": "0730升级tag",
    "taskStatus": "inProgress",
    "completedTime": null
  }
}