@Override
public WorkflowInstanceData getWorkflowInstanceData(
String workflowInstanceId) throws RegistryException {
if (!isWorkflowInstanceExists(workflowInstanceId,true)){
throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
}
WorkflowDataResource resource = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
WorkflowInstance workflowInstance = new WorkflowInstance(resource.getExperimentID(), resource.getWorkflowInstanceID());
workflowInstance.setTemplateName(resource.getTemplateName());
WorkflowInstanceData workflowInstanceData = new WorkflowInstanceData(null, workflowInstance, new WorkflowInstanceStatus(workflowInstance, resource.getStatus()==null? null:ExecutionStatus.valueOf(resource.getStatus()),resource.getLastUpdatedTime()), null);