rest api query/historic-process-instances

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2014 03:25 AM
used api query/historic-process-instances, and body is
{
"processDefinitionId" : "myProcess:1:108",
"variables" : [ ]
},
the Response is
{
"data": [
{
"id": "109",
"url": "http://localhost:8080/activiti-explorer/service/history/historic-process-instances/109",
"businessKey": null,
"processDefinitionId": "myProcess:1:108",
"processDefinitionUrl": "http://localhost:8080/activiti-explorer/service/repository/process-definitions/myProcess%3A1%3A108",
"startTime": "2014-01-23T10:02:18.993+0000",
"endTime": "2014-01-23T10:03:00.003+0000",
"durationInMillis": 41010,
"startUserId": "test",
"startActivityId": "startevent1",
"endActivityId": "endevent1",
"deleteReason": null,
"superProcessInstanceId": null,
"variables": []
}
],
"total": 1,
"start": 0,
"sort": "processInstanceId",
"order": "asc",
"size": 1
}
but the quest body is
{
"id" : "109",
"variables" : [
]
}
the Response is
{
"errorMessage": "Unsupported Media Type",
"statusCode": 415
},
someone can tell me the reason
{
"processDefinitionId" : "myProcess:1:108",
"variables" : [ ]
},
the Response is
{
"data": [
{
"id": "109",
"url": "http://localhost:8080/activiti-explorer/service/history/historic-process-instances/109",
"businessKey": null,
"processDefinitionId": "myProcess:1:108",
"processDefinitionUrl": "http://localhost:8080/activiti-explorer/service/repository/process-definitions/myProcess%3A1%3A108",
"startTime": "2014-01-23T10:02:18.993+0000",
"endTime": "2014-01-23T10:03:00.003+0000",
"durationInMillis": 41010,
"startUserId": "test",
"startActivityId": "startevent1",
"endActivityId": "endevent1",
"deleteReason": null,
"superProcessInstanceId": null,
"variables": []
}
],
"total": 1,
"start": 0,
"sort": "processInstanceId",
"order": "asc",
"size": 1
}
but the quest body is
{
"id" : "109",
"variables" : [
]
}
the Response is
{
"errorMessage": "Unsupported Media Type",
"statusCode": 415
},
someone can tell me the reason
Labels:
- Labels:
-
Archive
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2014 08:27 PM
can someone tell me, thanks!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2014 04:10 AM
If you want to get a single historic process instance by ID, there is no need to query. Each instance represents a unique REST-resource. Just build up an URL using the ID:
GET history/historic-process-instances/{processInstanceId}

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2014 12:14 AM
thanks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2014 10:57 AM
Hi i am newbie in Activiti, I am using 5.16.1 and when i call
GET history/historic-process-instances/{processInstanceId} the variables are empty and of course history/historic-process-instances/{processInstanceId}/variables does not work (neither {variableId} or {variableId}/data).
GET history/historic-process-instances?includeProcessVariables=true returns all the process instances with the variables included but i dont want to retrieve all the process instances stored.
The solution for me was to use the following REST api
GET history/historic-variable-instances?processInstanceId={processInstanceId}
But i consider that the first one should work, am I doing something wrong?
Thanks and regards.
Carlos.
GET history/historic-process-instances/{processInstanceId} the variables are empty and of course history/historic-process-instances/{processInstanceId}/variables does not work (neither {variableId} or {variableId}/data).
GET history/historic-process-instances?includeProcessVariables=true returns all the process instances with the variables included but i dont want to retrieve all the process instances stored.
The solution for me was to use the following REST api
GET history/historic-variable-instances?processInstanceId={processInstanceId}
But i consider that the first one should work, am I doing something wrong?
Thanks and regards.
Carlos.
