Package org.apache.airavata.registry.api

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


        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

   
  }

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

TOP

Related Classes of org.apache.airavata.registry.api.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.