Package org.apache.airavata.client.api

Examples of org.apache.airavata.client.api.ExperimentAdvanceOptions


  }

  @Override
  public String runExperiment(Workflow workflow, List<WorkflowInput> inputs,
      String user, String metadata) throws AiravataAPIInvocationException {
    ExperimentAdvanceOptions options=createExperimentAdvanceOptions(workflow.getName()+"_"+Calendar.getInstance().getTime().toString(), user, metadata);
    return runExperiment(workflow,inputs,options);
  }
View Full Code Here


  @Override
  public String runExperiment(String workflowTemplateId,
      List<WorkflowInput> inputs, String user, String metadata,
      String workflowInstanceName, WorkflowContextHeaderBuilder builder)
      throws AiravataAPIInvocationException {
    ExperimentAdvanceOptions options = createExperimentAdvanceOptions(workflowInstanceName, user, metadata);
    ApplicationSchedulingContext[] nodeSchedules = builder.getWorkflowSchedulingContext().getApplicationSchedulingContextArray();
    for (ApplicationSchedulingContext context : nodeSchedules) {
      NodeSettings nodeSettings = options.getCustomWorkflowSchedulingSettings().addNewNodeSettings(context.getWorkflowNodeId());
      if (context.isSetServiceId()) nodeSettings.setServiceId(context.getServiceId());
      if (context.isSetGatekeeperEpr()) nodeSettings.getHostSettings().setGatekeeperEPR(context.getGatekeeperEpr());
      if (context.isSetHostName()) nodeSettings.getHostSettings().setHostId(context.getHostName());
      if (context.isSetWsgramPreferred()) nodeSettings.getHostSettings().setWSGramPreffered(context.getWsgramPreferred());
      if (context.isSetCpuCount()) nodeSettings.getHPCSettings().setCPUCount(context.getCpuCount());
      if (context.isSetJobManager()) nodeSettings.getHPCSettings().setJobManager(context.getJobManager());
      if (context.isSetMaxWallTime()) nodeSettings.getHPCSettings().setMaxWallTime(context.getMaxWallTime());
      if (context.isSetNodeCount()) nodeSettings.getHPCSettings().setNodeCount(context.getNodeCount());
      if (context.isSetQueueName()) nodeSettings.getHPCSettings().setQueueName(context.getQueueName());
    }
    ApplicationOutputDataHandling[] dataHandlingSettings = builder.getWorkflowOutputDataHandling().getApplicationOutputDataHandlingArray();
    for (ApplicationOutputDataHandling handling : dataHandlingSettings) {
      options.getCustomWorkflowOutputDataSettings().addNewOutputDataSettings(handling.getNodeId(), handling.getOutputDataDirectory(),handling.getDataRegistryUrl(),handling.getDataPersistance());
    }
    //TODO rest of the builder configurations as they are added to the experiment options
    return runExperiment(workflowTemplateId, inputs, options);
  }
View Full Code Here

  @Override
  public String runExperiment(String workflowName,
      List<WorkflowInput> inputs, String user, String metadata,
      String workflowInstanceName, String experimentName)
      throws AiravataAPIInvocationException {
    ExperimentAdvanceOptions options = createExperimentAdvanceOptions(workflowInstanceName, user, metadata);
    options.setCustomExperimentId(experimentName);
    return runExperiment(workflowName, inputs, options);
  }
View Full Code Here

  //------------------End of Deprecated Functions---------------------//

  public static void main(String[] args) {
    ExecutionManagerImpl a = new ExecutionManagerImpl(null);
    try {
      ExperimentAdvanceOptions b = a.createExperimentAdvanceOptions();
      b.getCustomWorkflowOutputDataSettings().addNewOutputDataSettings("la", "di", "da", false);
      WorkflowContextHeaderBuilder c = a.createWorkflowContextHeaderBuilder(b, "meeee");
      System.out.println(XMLUtil.xmlElementToString(c.getXml()));
    } catch (AiravataAPIInvocationException e) {
      e.printStackTrace();
    }
View Full Code Here

  }

  @Override
  public String runExperiment(String workflowTemplateId,
      List<WorkflowInput> inputs) throws AiravataAPIInvocationException {
    ExperimentAdvanceOptions options = createExperimentAdvanceOptions(workflowTemplateId+"_"+Calendar.getInstance().getTime().toString(), getClient().getCurrentUser(), null);
    return runExperiment(workflowTemplateId, inputs ,options);
  }
View Full Code Here

 

  @Override
  public ExperimentAdvanceOptions createExperimentAdvanceOptions()
      throws AiravataAPIInvocationException {
    return new ExperimentAdvanceOptions();
  }
View Full Code Here

  @Override
  public ExperimentAdvanceOptions createExperimentAdvanceOptions(
      String experimentName, String experimentUser,
      String experimentMetadata) throws AiravataAPIInvocationException {
    ExperimentAdvanceOptions options = createExperimentAdvanceOptions();
    options.setExperimentName(experimentName);
    options.setExperimentCustomMetadata(experimentMetadata);
    options.setExperimentExecutionUser(experimentUser);
    return options;
  }
View Full Code Here

  //------------------End of Deprecated Functions---------------------//

  public static void main(String[] args) {
    ExecutionManagerImpl a = new ExecutionManagerImpl(null);
    try {
      ExperimentAdvanceOptions b = a.createExperimentAdvanceOptions();
      b.getCustomWorkflowOutputDataSettings().addNewOutputDataSettings("la", "di", "da", false);
      WorkflowContextHeaderBuilder c = a.createWorkflowContextHeaderBuilder(b, "meeee");
      System.out.println(XMLUtil.xmlElementToString(c.getXml()));
    } catch (AiravataAPIInvocationException e) {
      e.printStackTrace();
    }
View Full Code Here

        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
                new PasswordCallbackImpl());
        List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
        String workflowName = workflow.getName();
        ExperimentAdvanceOptions options = airavataAPI.getExecutionManager().createExperimentAdvanceOptions(
                workflowName, getUserName(), null);

        options.getCustomSecuritySettings().getCredentialStoreSecuritySettings().setTokenId("1234");

        String experimentId = airavataAPI.getExecutionManager().runExperiment(workflowName, workflowInputs, options);

        Assert.assertNotNull(experimentId);
View Full Code Here

        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
                new PasswordCallbackImpl());
        List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
        String workflowName = workflow.getName();
        ExperimentAdvanceOptions options = airavataAPI.getExecutionManager().createExperimentAdvanceOptions(
                workflowName, getUserName(), null);
        String experimentId = airavataAPI.getExecutionManager().runExperiment(workflowName, workflowInputs, options,
                new EventDataListenerAdapter() {
                    public void notify(EventDataRepository eventDataRepo, EventData eventData) {
                        // do nothing
View Full Code Here

TOP

Related Classes of org.apache.airavata.client.api.ExperimentAdvanceOptions

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.