}
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;
}