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

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


                "    <wor:workflow-scheduling-context />\n" +
                "    <wor:security-context />\n" +
                "</wor:context-header>");
        }
        Map<String, String> configuration = new HashMap<String, String>();
        WorkflowContextHeaderBuilder workflowContextHeaderBuilder = parseContextHeader(workflowContext, configuration);
        String user = workflowContextHeaderBuilder.getUserIdentifier();

        String s = null;
        try {
             s = setupAndLaunch(workflowAsString, topic, ServerSettings.getDefaultGatewayId(),
                    user,inputs, configuration, runInThread, workflowContextHeaderBuilder);
View Full Code Here


        } catch (XmlException e) {
            log.error(e.getMessage());
        } catch (AiravataAPIInvocationException e) {
            log.error(e.getMessage());
        }
        return new WorkflowContextHeaderBuilder(parse.getContextHeader());
    }
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) {
      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());
        }
    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

                "    <wor:workflow-scheduling-context />\n" +
                "    <wor:security-context />\n" +
                "</wor:context-header>");
        }
        Map<String, String> configuration = new HashMap<String, String>();
        WorkflowContextHeaderBuilder workflowContextHeaderBuilder = parseContextHeader(workflowContext, configuration);
        String user = workflowContextHeaderBuilder.getUserIdentifier();

        String s = null;
        try {
             s = setupAndLaunch(workflowAsString, topic, ServerSettings.getDefaultGatewayId(),
                    user,inputs, configuration, runInThread, workflowContextHeaderBuilder);
View Full Code Here

        } catch (XmlException e) {
            log.error(e.getMessage());
        } catch (AiravataAPIInvocationException e) {
            log.error(e.getMessage());
        }
        return new WorkflowContextHeaderBuilder(parse.getContextHeader());
    }
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

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.