REST API to get state of a running process in json response
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2016 04:55 PM
Hello,
I am trying to fetch state of a running process details using below REST call
https://docs.alfresco.com/activiti/docs/dev-guide/1.4.0/#_get_process_instance_details
api/enterprise/process-instances/{processInstanceId}
For e.g: I have a process, which is waiting at UserTask, so I expect response of REST call to provide this information.
It returns following response:
In this response, I don't see any field related to current state of the process.
Please guide if there are any other REST api to use to get useful information.
Thanks
I am trying to fetch state of a running process details using below REST call
https://docs.alfresco.com/activiti/docs/dev-guide/1.4.0/#_get_process_instance_details
api/enterprise/process-instances/{processInstanceId}
For e.g: I have a process, which is waiting at UserTask, so I expect response of REST call to provide this information.
It returns following response:
{ "id": "40026", "name": "TestProcess", "businessKey": null, "processDefinitionId": "TestProcess:1:2504", "tenantId": "tenant_1", "started": "2016-05-11T19:22:22.927+0000", "ended": null, "startedBy": { "id": 1, "firstName": null, "lastName": "Administrator", "email": "a@a.com" }, "processDefinitionName": "TestProcess", "processDefinitionDescription": "First version copy", "processDefinitionKey": "TestProcess", "processDefinitionCategory": "http://www.activiti.org/processdef", "processDefinitionVersion": 1, "processDefinitionDeploymentId": "2501", "graphicalNotationDefined": true, "startFormDefined": true, "variables": []}
In this response, I don't see any field related to current state of the process.
Please guide if there are any other REST api to use to get useful information.
Thanks
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2016 03:44 AM
Hi,
I think you want to see the task details, right?
If so, you can use - POST api/enterprise/tasks/query with a request body like {"processDefinitionId": "TestProcess:1:2504","state":"active","processInstanceId":"40026" } and if you want to see the already completed tasks for this process, you can change the parameter 'state' from active to completed.
I hope this helps.
Thanks.
I think you want to see the task details, right?
If so, you can use - POST api/enterprise/tasks/query with a request body like {"processDefinitionId": "TestProcess:1:2504","state":"active","processInstanceId":"40026" } and if you want to see the already completed tasks for this process, you can change the parameter 'state' from active to completed.
I hope this helps.
Thanks.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2016 09:01 AM
Hi,
I see there is a difference between Opensource REST response and the Enterprise REST response:
api/enterprise/process-instances/{processInstanceId}
api/runtime/process-instances/{processInstanceId}
Opensource (/runtime) response contains the activityId:, but enterprise (/enterprise) version doesn't.
Its confusing to understand the difference between Opensource and Enterprise version REST API.
Thanks.
I see there is a difference between Opensource REST response and the Enterprise REST response:
api/enterprise/process-instances/{processInstanceId}
api/runtime/process-instances/{processInstanceId}
Opensource (/runtime) response contains the activityId:, but enterprise (/enterprise) version doesn't.
Its confusing to understand the difference between Opensource and Enterprise version REST API.
Thanks.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2016 12:25 PM
It's actually pretty easy: the OSS REST API is fully there, but it should mostly be used for people that have already built stuff on the OSS API.
Otherwise, the enterprise (under api/enterprise) is the way to go?
Otherwise, the enterprise (under api/enterprise) is the way to go?
