Package org.apache.airavata.common.workflow.execution.context

Examples of org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder


  }

  private WorkflowContextHeaderBuilder createWorkflowContextHeaderBuilder(
      ExperimentAdvanceOptions options, String submissionUser)
      throws AiravataAPIInvocationException {
    WorkflowContextHeaderBuilder builder=createWorkflowContextHeader();
    builder.setUserIdentifier(submissionUser);
    NodeSettings[] nodeSettingsList = options.getCustomWorkflowSchedulingSettings().getNodeSettingsList();
    for (NodeSettings nodeSettings : nodeSettingsList) {
      builder.addApplicationSchedulingContext(nodeSettings.getNodeId(), nodeSettings.getServiceId(), nodeSettings.getHostSettings().getHostId(), nodeSettings.getHostSettings().isWSGRAMPreffered(), nodeSettings.getHostSettings().getGatekeeperEPR(), nodeSettings.getHPCSettings().getJobManager(), nodeSettings.getHPCSettings().getCPUCount(), nodeSettings.getHPCSettings().getNodeCount(), nodeSettings.getHPCSettings().getQueueName(), nodeSettings.getHPCSettings().getMaxWallTime());
    }
    OutputDataSettings[] outputDataSettingsList = options.getCustomWorkflowOutputDataSettings().getOutputDataSettingsList();
    for (OutputDataSettings outputDataSettings : outputDataSettingsList) {
      builder.addApplicationOutputDataHandling(outputDataSettings.getNodeId(),outputDataSettings.getOutputDataDirectory(), outputDataSettings.getDataRegistryUrl(), outputDataSettings.isDataPersistent());
    }
    return builder;
  }
View Full Code Here


  @Override
  public WorkflowContextHeaderBuilder createWorkflowContextHeader()
      throws AiravataAPIInvocationException {
    try {
      return new WorkflowContextHeaderBuilder(null,
          null,null,null,null,
          null);
    } catch (Exception e) {
      throw new AiravataAPIInvocationException(e);
    }
View Full Code Here

  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

      updateClientConfiguration(configuration);

      // At this point we do not know the workflowExperimentId
      // FIXME: Registry URL is set null as its not used. Set this when we
      // have rest services
      builder = new WorkflowContextHeaderBuilder(
          configuration.get(BROKER), configuration.get(GFAC), null,
          null, null, configuration.get(MSGBOX));

      // TODO: At some point this should contain the current user the
      // airavata
View Full Code Here

          String submissionUser = getClient().getUserManager().getAiravataUser();
      String executionUser=options.getExperimentExecutionUser();
      if (executionUser==null){
        executionUser=submissionUser;
      }
      WorkflowContextHeaderBuilder builder = createWorkflowContextHeaderBuilder(options, submissionUser);
      runPreWorkflowExecutionTasks(experimentID, executionUser, options.getExperimentMetadata(), options.getExperimentName());
      NameValue[] inputVals = inputValues.toArray(new NameValue[] {});
      if (listener!=null){
        getExperimentMonitor(experimentID, listener).startMonitoring();
      }
View Full Code Here

  }

  private WorkflowContextHeaderBuilder createWorkflowContextHeaderBuilder(
      ExperimentAdvanceOptions options, String submissionUser)
      throws AiravataAPIInvocationException {
    WorkflowContextHeaderBuilder builder=createWorkflowContextHeader();
    builder.setUserIdentifier(submissionUser);
    NodeSettings[] nodeSettingsList = options.getCustomWorkflowSchedulingSettings().getNodeSettingsList();
    for (NodeSettings nodeSettings : nodeSettingsList) {
      List<NameValuePairType> nameValuePairTypes = nodeSettings.getNameValuePair();
      for (NameValuePairType nameValuePairType : nameValuePairTypes) {
        builder.addApplicationSchedulingKeyPair(nodeSettings.getNodeId(),nameValuePairType.getName(), nameValuePairType.getValue(), nameValuePairType.getDescription());
      }
      builder.addApplicationSchedulingContext(nodeSettings.getNodeId(), nodeSettings.getServiceId(), nodeSettings.getHostSettings().getHostId(), nodeSettings.getHostSettings().isWSGRAMPreffered(), nodeSettings.getHostSettings().getGatekeeperEPR(), nodeSettings.getHPCSettings().getJobManager(), nodeSettings.getHPCSettings().getCPUCount(), nodeSettings.getHPCSettings().getNodeCount(), nodeSettings.getHPCSettings().getQueueName(), nodeSettings.getHPCSettings().getMaxWallTime());
   
    }
    OutputDataSettings[] outputDataSettingsList = options.getCustomWorkflowOutputDataSettings().getOutputDataSettingsList();
    for (OutputDataSettings outputDataSettings : outputDataSettingsList) {
      builder.addApplicationOutputDataHandling(outputDataSettings.getNodeId(),outputDataSettings.getOutputDataDirectory(), outputDataSettings.getDataRegistryUrl(), outputDataSettings.isDataPersistent());
    }

        if (options.getCustomSecuritySettings().getAmazonWSSettings().getAccessKeyId() != null) {
            builder.setAmazonWebServices(options.getCustomSecuritySettings().getAmazonWSSettings().getAccessKeyId(),
                    options.getCustomSecuritySettings().getAmazonWSSettings().getSecretAccessKey());
        }

        if (options.getCustomSecuritySettings().getCredentialStoreSecuritySettings() != null) {
            builder.setCredentialManagementService(options.getCustomSecuritySettings().
                    getCredentialStoreSecuritySettings().getTokenId(),
                    submissionUser);
        }

View Full Code Here

  //------------------Deprecated Functions---------------------//
 
  private WorkflowContextHeaderBuilder createWorkflowContextHeader()
      throws AiravataAPIInvocationException {
    try {
      return new WorkflowContextHeaderBuilder(null,
          null,null,null,null,
          null);
    } catch (Exception e) {
      throw new AiravataAPIInvocationException(e);
    }
View Full Code Here

  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

      updateClientConfiguration(configuration);

      // At this point we do not know the workflowExperimentId
      // FIXME: Registry URL is set null as its not used. Set this when we
      // have rest services
      builder = new WorkflowContextHeaderBuilder(
          configuration.get(BROKER), configuration.get(GFAC), null,
          null, null, configuration.get(MSGBOX));

      // TODO: At some point this should contain the current user the
      // airavata
View Full Code Here

  @Override
  public WorkflowContextHeaderBuilder createWorkflowContextHeader()
      throws AiravataAPIInvocationException {
    AiravataClientConfiguration config = getClient().getClientConfiguration();
    try {
      return new WorkflowContextHeaderBuilder(config.getMessagebrokerURL().toString(),
          config.getGfacURL().toString(),config.getJcrURL().toString(),null,null,
          config.getMessageboxURL().toString());
    } catch (Exception e) {
      throw new AiravataAPIInvocationException(e);
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder

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.