use of org.wso2.carbon.bpmn.rest.model.history.HistoricVariableInstancePaginateList in project carbon-business-process by wso2.
the class BaseHistoricVariableInstanceService method getQueryResponse.
protected DataResponse getQueryResponse(HistoricVariableInstanceQueryRequest queryRequest, Map<String, String> allRequestParams) {
HistoryService historyService = BPMNOSGIService.getHistoryService();
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery();
// Populate query based on request
if (queryRequest.getExcludeTaskVariables() != null) {
if (queryRequest.getExcludeTaskVariables()) {
query.excludeTaskVariables();
}
}
if (queryRequest.getTaskId() != null) {
query.taskId(queryRequest.getTaskId());
}
if (queryRequest.getExecutionId() != null) {
query.executionId(queryRequest.getExecutionId());
}
if (queryRequest.getProcessInstanceId() != null) {
query.processInstanceId(queryRequest.getProcessInstanceId());
}
if (queryRequest.getVariableName() != null) {
query.variableName(queryRequest.getVariableName());
}
if (queryRequest.getVariableNameLike() != null) {
query.variableNameLike(queryRequest.getVariableNameLike());
}
if (queryRequest.getVariables() != null) {
addVariables(query, queryRequest.getVariables());
}
return new HistoricVariableInstancePaginateList(new RestResponseFactory(), uriInfo).paginateList(allRequestParams, query, "variableName", allowedSortProperties);
}
Aggregations