List of Methods


Start Flow

This API is used to start process. When user submits an application, the server calls BPMN to start the process.


URL: http://[SERVER]:[PORT]/BPMREST/service/runtime/process/[Process Name]/start

HTTP Method: POST

HTTP Request Header: Content-Type: application/json

HTTP Request Body:        {

[Object: Business Object with data]

}

HTTP Response Body:        {

                                 "data" : [String: Reference Instance ID],

                                 "code" : [Long: Code value],

                                 "timestamp" : [Long: Timestamp value],

                                 "totalRecordCount" : [Long: Total record count]

       }


Claim Task

This API is used to claim task. Users can find tasks that they want to work on and can claim task for specific user if it is not yet assigned to him.


URL: http://[SERVER]:[PORT]/BPMREST/service/runtime/tasks/[Task ID]/claim?user=[User Name]

HTTP Method: POST

HTTP Request Header: n/a

HTTP Request Body: n/a

HTTP Response Body:        {

                                 "data" : "",

                                 "code" : [Long: Code value],

                                 "timestamp" : [Long: Timestamp value],

                                 "totalRecordCount" : [Long: Total record count]

       }


Complete Task

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.


URL: http://[SERVER]:[PORT]/BPMREST/service/runtime/tasks/[Task ID]/assign?user=[User Name]&user=[User Name1]..&user=[User Name n]

HTTP Method: POST

HTTP Request Header: n/a

HTTP Request Body: n/a

HTTP Response Body:  {

                                 "data" : "",

                                 "code" : [Long: Code value],

                                 "timestamp" : [Long: Timestamp value],

                                 "totalRecordCount" : [Long: Total record count]

           }


Assign Instance

This API is used to assign all task to user by specific instance ID. When call assign by instance, incase process flow design has parallel tasks, process runtime will get all task then assign specific user to task.

 

URL: http://[SERVER]:[PORT]/BPMREST/service/runtime/instance/[Instance ID]/tasks/assign?user=[User Name]

HTTP Method: POST

HTTP Request Header: n/a

HTTP Request Body: n/a

HTTP Response Body:        {

                                 "data" :"",

                                 "code" : [Long: Code value],

                                 "timestamp" : [Long: Timestamp value],

                                 "totalRecordCount" : [Long: Total record count]

         }