Search in sources :

Example 1 with WorkflowInputResource

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;
}
Also used : WorkflowInputResource(org.apache.airavata.registry.core.workflow.catalog.resources.WorkflowInputResource) WorkflowModel(org.apache.airavata.model.WorkflowModel) WorkflowCatalogResource(org.apache.airavata.registry.core.workflow.catalog.resources.WorkflowCatalogResource)

Aggregations

WorkflowModel (org.apache.airavata.model.WorkflowModel)1 WorkflowCatalogResource (org.apache.airavata.registry.core.workflow.catalog.resources.WorkflowCatalogResource)1 WorkflowInputResource (org.apache.airavata.registry.core.workflow.catalog.resources.WorkflowInputResource)1