Package org.apache.airavata.registry.api.workflow

Examples of org.apache.airavata.registry.api.workflow.WorkflowInstanceData


      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);
    List<NodeDataResource> nodeData = resource.getNodeData();
    for (NodeDataResource nodeDataResource : nodeData) {
      workflowInstanceData.getNodeDataList().add(getWorkflowInstanceNodeData(workflowInstanceId, nodeDataResource.getNodeID()));
    }
    return workflowInstanceData;
  }
View Full Code Here


  public List<XBayaWorkflowNodeElement> getWorkflowServices() {
    if (workflowServices==null){
      workflowServices=new ArrayList<XBayaWorkflowNodeElement>();
      try {
        WorkflowInstanceData workflowInstanceData = getRegistry().getWorkflowInstanceData(getWorkflowId());
        List<WorkflowInstanceNodeData> nodeDataList = workflowInstanceData.getNodeDataList();
        for (WorkflowInstanceNodeData nodeData : nodeDataList) {
          workflowServices.add(new XBayaWorkflowNodeElement(nodeData.getWorkflowInstanceNode().getNodeId(), nodeData));
        }
      } catch (RegistryException e) {
        e.printStackTrace();
View Full Code Here

      int pageSize, int pageNo) throws AiravataAPIInvocationException {
    try {
      List<WorkflowExecution> experimentIds = getClient().getRegistry().getWorkflowExecutionByUser(user, pageSize, pageNo);
      List<WorkflowInstanceData> list=new ArrayList<WorkflowInstanceData>();
      for (WorkflowExecution execution : experimentIds) {
        WorkflowInstanceData workflowInstanceData = createWorkflowInstanceData(execution);
        list.add(workflowInstanceData);
      }
      return list;
    } catch (RegistryException e) {
      throw new AiravataAPIInvocationException(e);
View Full Code Here

  }

  private WorkflowInstanceData createWorkflowInstanceData(
      WorkflowExecution execution) {
    WorkflowInstance workflowInstance = new WorkflowInstance(execution.getExperimentId(),execution.getTopic());
    WorkflowInstanceData workflowInstanceData = new WorkflowInstanceData(workflowInstance, new WorkflowInstanceName(workflowInstance, execution.getWorkflowInstanceName()),new WorkflowInstanceUser(workflowInstance,execution.getUser()), new WorkflowInstanceStatus(workflowInstance,execution.getExecutionStatus().getExecutionStatus(),execution.getExecutionStatus().getStatusUpdateTime()), new WorkflowInstanceMetadata(workflowInstance,execution.getMetadata()), null);
    Map<WorkflowInstanceNode, List<WorkflowInstanceNodePortData>> groupNodePortInputData = groupNodePortData(execution.getServiceInput());
    Map<WorkflowInstanceNode, List<WorkflowInstanceNodePortData>> groupNodePortOutputData = groupNodePortData(execution.getServiceOutput());
    for (WorkflowInstanceNode instanceNode : groupNodePortInputData.keySet()) {
      workflowInstanceData.addNodeData(new WorkflowInstanceNodeData(instanceNode, groupNodePortInputData.get(instanceNode), null));
    }
    for (WorkflowInstanceNode instanceNode : groupNodePortOutputData.keySet()) {
      WorkflowInstanceNodeData nodeData = workflowInstanceData.getNodeData(instanceNode.getNodeId());
      if (nodeData==null){
        workflowInstanceData.addNodeData(new WorkflowInstanceNodeData(instanceNode, null,groupNodePortOutputData.get(instanceNode)));
      }else{
        nodeData.setOutputData(groupNodePortOutputData.get(instanceNode));
      }
    }
    return workflowInstanceData;
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.api.workflow.WorkflowInstanceData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.