When user claim task and work on their task is finished, process runtime provides method to complete task. Application need to acknowledge the process runtime to move to next node.
URL: http://[SERVER]:[PORT]/BPMREST/service/runtime/tasks/[Task ID]/complete?user=[User Name]
HTTP Method: POST
HTTP Request Header: Content-Type : application/json
HTTP Request Body: {
[Object: Business Object with data]
}
HTTP Response Body: {
"data" : "",
"code" : [Long: Code value],
"timestamp" : [Long: Timestamp value],
"totalRecordCount" : [Long: Total record count]
}
Get Task By Instance ID
This API returns an array list of all active task information not including the business object in the process instance by referencing the instance id from method "Start Flow"
URL: http://[SERVER]:[PORT]/BPMREST/service/runtime/instance/[Instance ID]/tasks
HTTP Method: GET
HTTP Request Header: Content-Type : application/json
HTTP Request Body: N/A
HTTP Response Body: {
"data" : [ {
"createBy" : [String: Created by username],
"createTime" : [Long: Created timestamp],
"instanceId" : [String: Reference process instanct ID],
"parentTaskId" : [String: Reference parent task ID],
"dueDate" : [Long: Due date],
"loadlinkEntityId" : [String: Link to reference entity],
"definitionId" : [String: Reference Process definition ID],
"assignee" : [String: User Name],
"loadlinkParam" : [String: Load link parameter by default : "="],
"owner" : [String: Owner User Name],
"description" : [String: Node description],
"processName" : [String: Reference process name],
"name" : [String: Reference Node name],
"priority" : [Long: Task priority start from 1 to 99],
"id" : [String: Reference task ID]
} ],
"code" : [Long: Code value],
"timestamp" : [Long: Timestamp value],
"totalRecordCount" : [Long: Total record count]
}
Get Task By User/Role
URL: http://[SERVER]:[PORT]/BPMREST/service/runtime/tasks?[group/role/user]=[User Name/Role Name/Group Name]
HTTP Method: GET
HTTP Request Header: Content-Type : application/json
HTTP Request Body: N/A
HTTP Response Body: {
"data" : [ {
"createBy" : [String: Created by username],
"createTime" : [Long: Created timestamp],
"instanceId" : [String: Reference process instanct ID],
"parentTaskId" : [String: Reference parent task ID],
"dueDate" : [Long: Due date],
"loadlinkEntityId" : [String: Link to reference entity],
"definitionId" : [String: Reference Process definition ID],
"assignee" : [String: User Name],
"loadlinkParam" : [String: Load link parameter by default : "="],
"owner" : [String: Owner User Name],
"description" : [String: Node description],
"processName" : [String: Reference process name],
"name" : [String: Reference Node name],
"priority" : [Long: Task priority start from 1 to 99],
"id" : [String: Reference task ID]
} ],
"code" : [Long: Code value],
"timestamp" : [Long: Timestamp value],
"totalRecordCount" : [Long: Total record count]
}
Get Task Variables
This API returns business object variable from process runtime.
URL: http://[SERVER]:[PORT]/BPMREST/service/runtime/tasks/[Task ID]/variables
HTTP Method: GET
HTTP Request Header: N/A
HTTP Request Body: N/A
HTTP Response Body: {
"data" : {[Object: Business Object with data]},
"code" : [Long: Code value],
"timestamp" : [Long: Timestamp value],
"totalRecordCount" : [Long: Total record count]
}
Assign Task(by users)
This API is used to set candidates to task. API provides parameter list incase more then one candidate is applicable for a single task.