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

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


    public boolean saveWorkflowData(String experimentID,String workflowInstanceID,String workflowTemplateID) {
        Timestamp currentTime = new Timestamp((new java.util.Date()).getTime());
        try {
            airavataAPI.getProvenanceManager().setWorkflowInstanceTemplateName(workflowInstanceID, workflowTemplateID);
            airavataAPI.getProvenanceManager().setWorkflowInstanceStatus(new WorkflowExecutionStatus(new WorkflowExecution(experimentID, workflowInstanceID), WorkflowExecutionStatus.State.STARTED,currentTime));
        } catch (AiravataAPIInvocationException e) {
            logger.error("Error saving Workflow Data !!");
        }
        return true;
    }
View Full Code Here


        workflowExecutionName="["+getExperiment().getExperimentId()+"]";
      }
    }
      String caption=workflowExecutionName;
      try {
      WorkflowExecutionStatus workflowExecutionStatus = getRegistry().getProvenanceManager().getWorkflowInstanceStatus(getExperiment().getExperimentId(), getExperiment().getExperimentId());
      if (workflowExecutionStatus!=null && workflowExecutionStatus.getExecutionStatus()!=null){
        caption += " - <i>" + workflowExecutionStatus.getExecutionStatus().toString()+"</i>";
        if (workflowExecutionStatus.getStatusUpdateTime()!=null) {
            caption += "<i> as of " + workflowExecutionStatus.getStatusUpdateTime().toString() + "</i>";
        }
      }
    } catch (AiravataAPIInvocationException e) {
      e.printStackTrace();
    }
View Full Code Here

        }
      }
    });
    experimentMonitor.startMonitoring();
    try {
      WorkflowExecutionStatus workflowInstanceStatus = getClient().getProvenanceManager().getWorkflowInstanceStatus(experimentId, experimentId);
      if (workflowInstanceStatus.getExecutionStatus()==State.FINISHED || workflowInstanceStatus.getExecutionStatus()==State.FAILED){
        experimentMonitor.stopMonitoring();
        return;
      }
    } catch (AiravataAPIInvocationException e) {
      //Workflow may not have started yet. Best to use the monitor to follow the progress
View Full Code Here

            logger.error(response.getEntity(String.class));
            throw new RuntimeException("Failed : HTTP error code : "
                    + status);
        }

        WorkflowExecutionStatus workflowInstanceStatus = response.getEntity(WorkflowExecutionStatus.class);
        return workflowInstanceStatus;
    }
View Full Code Here

            logger.error(response.getEntity(String.class));
            throw new RuntimeException("Failed : HTTP error code : "
                    + status);
        }

        WorkflowExecutionStatus workflowInstanceStatus = response.getEntity(WorkflowExecutionStatus.class);
        return workflowInstanceStatus;
    }
View Full Code Here

        }
      }
    });
    experimentMonitor.startMonitoring();
    try {
      WorkflowExecutionStatus workflowInstanceStatus = getClient().getProvenanceManager().getWorkflowInstanceStatus(experimentId, experimentId);
      if (workflowInstanceStatus.getExecutionStatus()==State.FINISHED || workflowInstanceStatus.getExecutionStatus()==State.FAILED){
        experimentMonitor.stopMonitoring();
        return;
      }
    } catch (AiravataAPIInvocationException e) {
      //Workflow may not have started yet. Best to use the monitor to follow the progress
View Full Code Here

        }
      }
    });
    experimentMonitor.startMonitoring();
    try {
      WorkflowExecutionStatus workflowInstanceStatus = getClient().getProvenanceManager().getWorkflowInstanceStatus(experimentId, experimentId);
      if (workflowInstanceStatus.getExecutionStatus()==State.FINISHED || workflowInstanceStatus.getExecutionStatus()==State.FAILED){
        experimentMonitor.stopMonitoring();
        return;
      }
    } catch (AiravataAPIInvocationException e) {
      //Workflow may not have started yet. Best to use the monitor to follow the progress
View Full Code Here

    }
    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;
View Full Code Here

        }
      }
    });
    experimentMonitor.startMonitoring();
    try {
      WorkflowExecutionStatus workflowInstanceStatus = getClient().getProvenanceManager().getWorkflowInstanceStatus(experimentId, experimentId);
      if (workflowInstanceStatus.getExecutionStatus()==State.FINISHED || workflowInstanceStatus.getExecutionStatus()==State.FAILED){
        experimentMonitor.stopMonitoring();
        return;
      }
    } catch (AiravataAPIInvocationException e) {
      //Workflow may not have started yet. Best to use the monitor to follow the progress
View Full Code Here

        }
        if (!isWorkflowInstanceExists(instanceId, true)){
      throw new WorkflowInstanceDoesNotExistsException(instanceId);
    }
    WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(instanceId);
    return new WorkflowExecutionStatus(new WorkflowExecution(wi.getExperimentID(),wi.getWorkflowInstanceID()),wi.getStatus()==null?null:State.valueOf(wi.getStatus()),wi.getLastUpdatedTime());
  }
View Full Code Here

TOP

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

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.