use of org.activiti.rest.service.api.history.HistoricActivityInstanceResponse in project Activiti by Activiti.
the class RestResponseFactory method createHistoricActivityInstanceResponse.
public HistoricActivityInstanceResponse createHistoricActivityInstanceResponse(HistoricActivityInstance activityInstance, RestUrlBuilder urlBuilder) {
HistoricActivityInstanceResponse result = new HistoricActivityInstanceResponse();
result.setActivityId(activityInstance.getActivityId());
result.setActivityName(activityInstance.getActivityName());
result.setActivityType(activityInstance.getActivityType());
result.setAssignee(activityInstance.getAssignee());
result.setCalledProcessInstanceId(activityInstance.getCalledProcessInstanceId());
result.setDurationInMillis(activityInstance.getDurationInMillis());
result.setEndTime(activityInstance.getEndTime());
result.setExecutionId(activityInstance.getExecutionId());
result.setId(activityInstance.getId());
result.setProcessDefinitionId(activityInstance.getProcessDefinitionId());
result.setProcessDefinitionUrl(urlBuilder.buildUrl(RestUrls.URL_PROCESS_DEFINITION, activityInstance.getProcessDefinitionId()));
result.setProcessInstanceId(activityInstance.getProcessInstanceId());
result.setProcessInstanceUrl(urlBuilder.buildUrl(RestUrls.URL_HISTORIC_PROCESS_INSTANCE, activityInstance.getId()));
result.setStartTime(activityInstance.getStartTime());
result.setTaskId(activityInstance.getTaskId());
result.setTenantId(activityInstance.getTenantId());
return result;
}
use of org.activiti.rest.service.api.history.HistoricActivityInstanceResponse in project Activiti by Activiti.
the class RestResponseFactory method createHistoricActivityInstanceResponseList.
public List<HistoricActivityInstanceResponse> createHistoricActivityInstanceResponseList(List<HistoricActivityInstance> activityInstances) {
RestUrlBuilder urlBuilder = createUrlBuilder();
List<HistoricActivityInstanceResponse> responseList = new ArrayList<HistoricActivityInstanceResponse>();
for (HistoricActivityInstance instance : activityInstances) {
responseList.add(createHistoricActivityInstanceResponse(instance, urlBuilder));
}
return responseList;
}
Aggregations