Returns details of a specified active process instance.
getQueryProcesses, which uses the workflow search collection, is more performant than this function and has a range of Filters you can use to find tasks. getQueryProcesses should be your preferred choice over this function which, although still supported, primarily exists for backwards compatibility.
Parameters
Name | Type | Description |
---|---|---|
includeCanUnclaim | Boolean | If including tasks, include unclaimability of each task |
includeCurrentTasks | Boolean | Include details of any active tasks for this process instance |
includeMessageListeners | Boolean | Include details of any active message listeners in the response. Currently only supports boundary messages |
includeProcessDefinition | Boolean | Include full details of the process definition used to start the process instance |
includeProcessDescription | Boolean | Include the expanded process description (documentation field) in the response |
includeProcessVariables | Boolean | Include process variables in the response |
includeStarterDetails | Boolean | Include start time, start user ID, process definition ID |
includeTaskVariables | Boolean | Include task variables |
includeTaskDescriptions | Boolean | Include expanded task description (documentation field) |
processDefinitionKeyIn | List<String> | Only return the process instance if it has a process definition key included in the supplied list |
processInstanceBusinessKey | String | The business key of the instance to retrieve information about |
processInstanceId | String | ID of the process instance to retrieve information about |
Either processInstanceId or processInstanceBusinessKey are required. All other parameters are true by default but may be set to false to reduce the response size and make the query more efficient |
Example Request
this.callWorkerMethod("workflow", "getProcessInstance",{
"processInstanceId":"2511"
});
Response
{
"jsonrpc": "2.0",
"id": 132,
"result": {
"businessKey": null,
"isSuspended": false,
"processVariables": {},
"currentTasks": [],
"processDefinition": {
"id": "anactiveprocess:1:2509",
"formProperties": {},
"category": "http://www.gossinteractive.com/processdef",
"diagramResourceName": "an active process-V-1.anactiveprocess.png",
"description": "Starts on a timer and last for a long time",
"isSuspended": false,
"name": "an active process",
"identityLinks": [],
"deploymentId": "2506",
"resourceName": "an active process-V-1.bpmn20.xml",
"key": "anactiveprocess",
"version": 1
},
"activityId": null,
"id": "2511",
"startTime": "2017-02-01T15:44:14Z",
"startUserId": null,
"parentId": null,
"isEnded": false,
"processInstanceId": "2511",
"processDefinitionId": "anactiveprocess:1:2509",
"messageListeners": {}
}
}