Examples of WorkflowExecutionStatus


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

        return isSaved;
    }

    public WorkflowExecutionStatus getWorkflowExecutionStatus(String experimentId)throws RegistryException{
      Session session = null;
      WorkflowExecutionStatus property = null;
        try {
            session = getSession();
            Node workflowDataNode = getWorkflowExperimentDataNode(experimentId, session);
            ExecutionStatus status = null;
      if (workflowDataNode.hasProperty(WORKFLOW_STATUS_PROPERTY)) {
        status = ExecutionStatus.valueOf(workflowDataNode.getProperty(
            WORKFLOW_STATUS_PROPERTY).getString());
      }
            Date date = null;
      if (workflowDataNode.hasProperty(WORKFLOW_STATUS_TIME_PROPERTY)) {
        Property prop = workflowDataNode
            .getProperty(WORKFLOW_STATUS_TIME_PROPERTY);
        date = null;
        if (prop != null) {
          Long dateMiliseconds = prop.getLong();
          Calendar cal = Calendar.getInstance();
          cal.setTimeInMillis(dateMiliseconds);
          date = cal.getTime();
        }
      }
      property=new WorkflowExecutionStatus(status, date);
            session.save();
        } catch (Exception e) {
            throw new RegistryException("Error while retrieving workflow execution status!!!", e);
        } finally {
            closeSession(session);
View Full Code Here

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

        Map<String,WorkflowExecutionStatus> workflowStatusMap = new HashMap<String, WorkflowExecutionStatus>();
        try {
            session = getSession();
            List<String> matchingExperimentIds = getMatchingExperimentIds(regex, session);
            for(String experimentId:matchingExperimentIds){
                WorkflowExecutionStatus workflowStatus = getWorkflowExecutionStatus(experimentId);
                workflowStatusMap.put(experimentId,workflowStatus);
            }
    } catch (RepositoryException e) {
            e.printStackTrace();
            throw new RegistryException(e);
View Full Code Here

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

   
  }

  public boolean saveWorkflowExecutionStatus(String experimentId,
      ExecutionStatus status) throws RegistryException {
    return saveWorkflowExecutionStatus(experimentId,new WorkflowExecutionStatus(status));
  }
View Full Code Here

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

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

        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

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

        }
      }
    });
    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

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

            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

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

            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

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

        }
      }
    });
    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

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

        }
      }
    });
    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
TOP
Copyright © 2018 www.massapi.com. 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.