}
try{
WorkflowDataResource resource = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
WorkflowExecution workflowInstance = new WorkflowExecution(resource.getExperimentID(), resource.getWorkflowInstanceID());
workflowInstance.setTemplateName(resource.getTemplateName());
WorkflowExecutionData workflowInstanceData = new WorkflowExecutionDataImpl(null, workflowInstance, new WorkflowExecutionStatus(workflowInstance, resource.getStatus()==null? null:State.valueOf(resource.getStatus()),resource.getLastUpdatedTime()), null);
List<NodeDataResource> nodeData = resource.getNodeData();
for (NodeDataResource nodeDataResource : nodeData) {
workflowInstanceData.getNodeDataList().add(getWorkflowInstanceNodeData(workflowInstanceId, nodeDataResource.getNodeID()));
}
return workflowInstanceData;
} catch (ExperimentLazyLoadedException e) {
throw new RegistryException(e);
}