//------------------End of Deprecated Functions---------------------//
public static WorkflowContextHeaderBuilder createWorkflowContextHeaderBuilder(
ExperimentAdvanceOptions options, String executionUser, String submissionUser)
throws AiravataAPIInvocationException {
WorkflowContextHeaderBuilder builder=createWorkflowContextHeader();
builder.setUserIdentifier(executionUser);
builder.setSubmissionUser(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(),
options.getCustomSecuritySettings().
getCredentialStoreSecuritySettings().getPortalUser(),
options.getCustomSecuritySettings().
getCredentialStoreSecuritySettings().getGatewayId());