use of org.activiti.rest.service.api.history.HistoricVariableInstanceResponse in project Activiti by Activiti.
the class RestResponseFactory method createHistoricVariableInstanceResponse.
public HistoricVariableInstanceResponse createHistoricVariableInstanceResponse(HistoricVariableInstance variableInstance, RestUrlBuilder urlBuilder) {
HistoricVariableInstanceResponse result = new HistoricVariableInstanceResponse();
result.setId(variableInstance.getId());
result.setProcessInstanceId(variableInstance.getProcessInstanceId());
if (variableInstance.getProcessInstanceId() != null) {
result.setProcessInstanceUrl(urlBuilder.buildUrl(RestUrls.URL_HISTORIC_PROCESS_INSTANCE, variableInstance.getProcessInstanceId()));
}
result.setTaskId(variableInstance.getTaskId());
result.setVariable(createRestVariable(variableInstance.getVariableName(), variableInstance.getValue(), null, variableInstance.getId(), VARIABLE_HISTORY_VARINSTANCE, false, urlBuilder));
return result;
}
use of org.activiti.rest.service.api.history.HistoricVariableInstanceResponse in project Activiti by Activiti.
the class RestResponseFactory method createHistoricVariableInstanceResponseList.
public List<HistoricVariableInstanceResponse> createHistoricVariableInstanceResponseList(List<HistoricVariableInstance> variableInstances) {
RestUrlBuilder urlBuilder = createUrlBuilder();
List<HistoricVariableInstanceResponse> responseList = new ArrayList<HistoricVariableInstanceResponse>();
for (HistoricVariableInstance instance : variableInstances) {
responseList.add(createHistoricVariableInstanceResponse(instance, urlBuilder));
}
return responseList;
}
Aggregations