return result;
}
public ExecutionResponse createExecutionResponse(Execution execution, String serverRootUrl) {
ExecutionResponse result = new ExecutionResponse();
result.setActivityId(execution.getActivityId());
result.setId(execution.getId());
result.setUrl(formatUrl(serverRootUrl, RestUrls.URL_EXECUTION, execution.getId()));
result.setSuspended(execution.isSuspended());
result.setTenantId(execution.getTenantId());
result.setParentId(execution.getParentId());
if(execution.getParentId() != null) {
result.setParentUrl(formatUrl(serverRootUrl, RestUrls.URL_EXECUTION, execution.getParentId()));
}
result.setProcessInstanceId(execution.getProcessInstanceId());
if(execution.getProcessInstanceId() != null) {
result.setProcessInstanceUrl(formatUrl(serverRootUrl, RestUrls.URL_PROCESS_INSTANCE, execution.getProcessInstanceId()));
}
return result;
}