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
API สำหรับคืนค่า Array list ข้อมูลของ Task ที่กำลังดำเนินการอยู่ทั้งหมด แต่จะไม่รวมตัวอย่าง business object ของ Process โดยอ้างอิงจาก instance id ของ 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
API สำหรับคืนค่าตัวแปร business object จาก 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)
API นี้ใช้เพื่อกำหนด candidate ของ Task ซึ่ง API นี้จะให้ list parameter ในกรณีที่มี candidate มากกว่า 1 รายการใน Task