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

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


      String hostDescriptionId, String applicationDescriptionId)
      throws RegistryException {
    List<ApplicationJob> jobs=new ArrayList<ApplicationJob>();
    List<GFacJobDataResource> gFacJobs = jpa.getWorker().getGFacJobs(serviceDescriptionId,hostDescriptionId,applicationDescriptionId);
    for (GFacJobDataResource resource : gFacJobs) {
      ApplicationJob job = new ApplicationJob();
      setupValues(resource, job);
      jobs.add(job);
    }
    return jobs;
  }
View Full Code Here


        throw new WorkflowInstanceNodeDoesNotExistsException(workflowExecutionId, nodeId);
      }
      gFacJobs = jpa.getWorker().getExperiment(experimentId).getData().getWorkflowInstance(workflowExecutionId).getNodeData(nodeId).getGFacJobs();
    }
    for (Resource resource : gFacJobs) {
      ApplicationJob job = new ApplicationJob();
      setupValues((GFacJobDataResource)resource, job);
      jobs.add(job);
    }
    return jobs;
  }
View Full Code Here

  public void updateWorkflowNodeGramData(
      WorkflowNodeGramData workflowNodeGramData) throws RegistryException {
        if (provenanceRegistry != null){
            provenanceRegistry.updateWorkflowNodeGramData(workflowNodeGramData);
        }else {
          ApplicationJob job = new ApplicationJob();
          job.setJobId(workflowNodeGramData.getGramJobID());
          job.setHostDescriptionId(workflowNodeGramData.getInvokedHost());
          job.setExperimentId(workflowNodeGramData.getWorkflowInstanceId());
          job.setWorkflowExecutionId(workflowNodeGramData.getWorkflowInstanceId());
          job.setNodeId(workflowNodeGramData.getNodeID());
          job.setJobData(workflowNodeGramData.getRsl());
          if (isApplicationJobExists(job.getJobId())){
            updateApplicationJob(job);
          }else{
            addApplicationJob(job);
          }
        }
View Full Code Here

  }

  @Override
  public ApplicationJob getApplicationJob(String gfacJobId) throws RegistryException {
    GFacJobDataResource gfacJob = validateAndGetGFacJob(gfacJobId);
    ApplicationJob job = new ApplicationJob();
    setupValues(gfacJob, job);
    return job;
  }
View Full Code Here

      String hostDescriptionId, String applicationDescriptionId)
      throws RegistryException {
    List<ApplicationJob> jobs=new ArrayList<ApplicationJob>();
    List<GFacJobDataResource> gFacJobs = jpa.getWorker().getGFacJobs(serviceDescriptionId,hostDescriptionId,applicationDescriptionId);
    for (GFacJobDataResource resource : gFacJobs) {
      ApplicationJob job = new ApplicationJob();
      setupValues(resource, job);
      jobs.add(job);
    }
    return jobs;
  }
View Full Code Here

        throw new WorkflowInstanceNodeDoesNotExistsException(workflowExecutionId, nodeId);
      }
      gFacJobs = jpa.getWorker().getExperiment(experimentId).getData().getWorkflowInstance(workflowExecutionId).getNodeData(nodeId).getGFacJobs();
    }
    for (Resource resource : gFacJobs) {
      ApplicationJob job = new ApplicationJob();
      setupValues((GFacJobDataResource)resource, job);
      jobs.add(job);
    }
    return jobs;
  }
View Full Code Here

        initEc2Environment(jobExecutionContext, ec2client);
        checkConnection(instance, ec2client);
    }

  private void saveApplicationJob(JobExecutionContext jobExecutionContext) {
    ApplicationJob job = GFacUtils.createApplicationJob(jobExecutionContext);
        job.setJobId(jobId);
        job.setStatus(ApplicationJobStatus.VALIDATE_INPUT);
        job.setSubmittedTime(Calendar.getInstance().getTime());
        job.setStatusUpdateTime(job.getSubmittedTime());
        GFacUtils.recordApplicationJob(jobExecutionContext, job);
  }
View Full Code Here

      throw new GFacProviderException(e.getLocalizedMessage(), e);
    }
  }

  private void saveApplicationJob(JobExecutionContext jobExecutionContext, String executableName) {
    ApplicationJob job = GFacUtils.createApplicationJob(jobExecutionContext);
    job.setJobId(jobID);
    job.setStatus(ApplicationJobStatus.INITIALIZE);
    job.setSubmittedTime(Calendar.getInstance().getTime());
    job.setStatusUpdateTime(job.getSubmittedTime());
    job.setJobData(executableName);
    GFacUtils.recordApplicationJob(jobExecutionContext, job);
  }
View Full Code Here

  public void updateWorkflowNodeGramData(
      WorkflowNodeGramData workflowNodeGramData) throws RegistryException {
        if (provenanceRegistry != null){
            provenanceRegistry.updateWorkflowNodeGramData(workflowNodeGramData);
        }else {
          ApplicationJob job = new ApplicationJob();
          job.setJobId(workflowNodeGramData.getGramJobID());
          job.setHostDescriptionId(workflowNodeGramData.getInvokedHost());
          job.setExperimentId(workflowNodeGramData.getWorkflowInstanceId());
          job.setWorkflowExecutionId(workflowNodeGramData.getWorkflowInstanceId());
          job.setNodeId(workflowNodeGramData.getNodeID());
          job.setJobData(workflowNodeGramData.getRsl());
          if (isApplicationJobExists(job.getJobId())){
            updateApplicationJob(job);
          }else{
            addApplicationJob(job);
          }
        }
View Full Code Here

  }

  @Override
  public ApplicationJob getApplicationJob(String gfacJobId) throws RegistryException {
    GFacJobDataResource gfacJob = validateAndGetGFacJob(gfacJobId);
    ApplicationJob job = new ApplicationJob();
    setupValues(gfacJob, job);
    return job;
  }
View Full Code Here

TOP

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

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.