Examples of WorkflowDataResource


Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            if (isWorkflowInstanceExists(workflowInstanceId)){
                throw new WorkflowInstanceAlreadyExistsException(workflowInstanceId);
            }
            ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
            ExperimentDataResource data = experiment.getData();
            WorkflowDataResource workflowInstanceResource = data.createWorkflowInstanceResource(workflowInstanceId);
            workflowInstanceResource.setTemplateName(templateName);
            workflowInstanceResource.save();
        }
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            return provenanceRegistry.getWorkflowExecutionTemplateName(workflowInstanceId);
        }
    if (!isWorkflowInstanceExists(workflowInstanceId, true)){
      throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
    }
    WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
    return wi.getTemplateName();
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            provenanceRegistry.setWorkflowInstanceTemplateName(workflowInstanceId, templateName);
        }else {
            if (!isWorkflowInstanceExists(workflowInstanceId, true)){
                throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
            wi.setTemplateName(templateName);
            wi.save();
        }
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            provenanceRegistry.updateWorkflowInstanceStatus(instanceId, status);
        }else {
            if (!isWorkflowInstanceExists(instanceId, true)){
                throw new WorkflowInstanceDoesNotExistsException(instanceId);
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(instanceId);
            Timestamp currentTime = new Timestamp(Calendar.getInstance().getTime().getTime());
            wi.setStatus(status.toString());
            if (status==State.STARTED){
                wi.setStartTime(currentTime);
            }
            wi.setLastUpdatedTime(currentTime);
            wi.save();
        }
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            provenanceRegistry.updateWorkflowInstanceStatus(status);
        }else {
            if (!isWorkflowInstanceExists(status.getWorkflowInstance().getWorkflowExecutionId(), true)){
                throw new WorkflowInstanceDoesNotExistsException(status.getWorkflowInstance().getWorkflowExecutionId());
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(status.getWorkflowInstance().getWorkflowExecutionId());
            Timestamp currentTime = new Timestamp(status.getStatusUpdateTime().getTime());
            if(status.getExecutionStatus() != null){
                wi.setStatus(status.getExecutionStatus().toString());
            }

            if (status.getExecutionStatus()==State.STARTED){
                wi.setStartTime(currentTime);
            }
            wi.setLastUpdatedTime(currentTime);
            wi.save();
        }
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            return provenanceRegistry.getWorkflowInstanceStatus(instanceId);
        }
        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

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            return provenanceRegistry.getWorkflowExecutionTemplateName(workflowInstanceId);
        }
    if (!isWorkflowInstanceExists(workflowInstanceId, true)){
      throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
    }
    WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
    return wi.getTemplateName();
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            provenanceRegistry.setWorkflowInstanceTemplateName(workflowInstanceId, templateName);
        }else {
            if (!isWorkflowInstanceExists(workflowInstanceId, true)){
                throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
            wi.setTemplateName(templateName);
            wi.save();
        }
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            provenanceRegistry.updateWorkflowInstanceStatus(instanceId, status);
        }else {
            if (!isWorkflowInstanceExists(instanceId, true)){
                throw new WorkflowInstanceDoesNotExistsException(instanceId);
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(instanceId);
            Timestamp currentTime = new Timestamp(Calendar.getInstance().getTime().getTime());
            wi.setStatus(status.toString());
            if (status==State.STARTED){
                wi.setStartTime(currentTime);
            }
            wi.setLastUpdatedTime(currentTime);
            wi.save();
        }
  }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource

            provenanceRegistry.updateWorkflowInstanceStatus(status);
        }else {
            if (!isWorkflowInstanceExists(status.getWorkflowInstance().getWorkflowExecutionId(), true)){
                throw new WorkflowInstanceDoesNotExistsException(status.getWorkflowInstance().getWorkflowExecutionId());
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(status.getWorkflowInstance().getWorkflowExecutionId());
            Timestamp currentTime = new Timestamp(status.getStatusUpdateTime().getTime());
            if(status.getExecutionStatus() != null){
                wi.setStatus(status.getExecutionStatus().toString());
            }

            if (status.getExecutionStatus()==State.STARTED){
                wi.setStartTime(currentTime);
            }
            wi.setLastUpdatedTime(currentTime);
            wi.save();
        }
  }
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.