protected DataResponse getQueryResponse(HistoricTaskInstanceQueryRequest queryRequest, Map<String,String> allRequestParams, String serverRootUrl) {
HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();
// Populate query based on request
if (queryRequest.getTaskId() != null) {
query.taskId(queryRequest.getTaskId());
}
if (queryRequest.getProcessInstanceId() != null) {
query.processInstanceId(queryRequest.getProcessInstanceId());
}
if (queryRequest.getProcessBusinessKey() != null) {