use of org.activiti.rest.service.api.runtime.process.ExecutionResponse in project Activiti by Activiti.
the class RestResponseFactory method createExecutionResponseList.
public List<ExecutionResponse> createExecutionResponseList(List<Execution> executions) {
RestUrlBuilder urlBuilder = createUrlBuilder();
List<ExecutionResponse> responseList = new ArrayList<ExecutionResponse>();
for (Execution instance : executions) {
responseList.add(createExecutionResponse(instance, urlBuilder));
}
return responseList;
}
use of org.activiti.rest.service.api.runtime.process.ExecutionResponse in project Activiti by Activiti.
the class RestResponseFactory method createExecutionResponse.
public ExecutionResponse createExecutionResponse(Execution execution, RestUrlBuilder urlBuilder) {
ExecutionResponse result = new ExecutionResponse();
result.setActivityId(execution.getActivityId());
result.setId(execution.getId());
result.setUrl(urlBuilder.buildUrl(RestUrls.URL_EXECUTION, execution.getId()));
result.setSuspended(execution.isSuspended());
result.setTenantId(execution.getTenantId());
result.setParentId(execution.getParentId());
if (execution.getParentId() != null) {
result.setParentUrl(urlBuilder.buildUrl(RestUrls.URL_EXECUTION, execution.getParentId()));
}
result.setSuperExecutionId(execution.getSuperExecutionId());
if (execution.getSuperExecutionId() != null) {
result.setSuperExecutionUrl(urlBuilder.buildUrl(RestUrls.URL_EXECUTION, execution.getSuperExecutionId()));
}
result.setProcessInstanceId(execution.getProcessInstanceId());
if (execution.getProcessInstanceId() != null) {
result.setProcessInstanceUrl(urlBuilder.buildUrl(RestUrls.URL_PROCESS_INSTANCE, execution.getProcessInstanceId()));
}
return result;
}
Aggregations