use of org.apache.airavata.registry.core.workflow.catalog.resources.WorkflowInputResource in project airavata by apache.
the class WorkflowCatalogThriftConversion method getWorkflow.
public static WorkflowModel getWorkflow(WorkflowResource resource) throws WorkflowCatalogException {
WorkflowModel workflow = new WorkflowModel();
workflow.setTemplateId(resource.getWfTemplateId());
workflow.setGraph(resource.getGraph());
workflow.setName(resource.getWfName());
if (resource.getImage() != null) {
workflow.setImage(resource.getImage().getBytes());
}
WorkflowInputResource inputResource = new WorkflowInputResource();
List<WorkflowCatalogResource> resources = inputResource.get(WorkflowCatAbstractResource.WorkflowInputConstants.WF_TEMPLATE_ID, resource.getWfTemplateId());
workflow.setWorkflowInputs(getWFInputs(resources));
return workflow;
}
Aggregations