Project project=new Project();
project.setName("project1");
project.setProjectID("project1");
project.setOwner(user);
Client client = getClient();
String projectId=client.createProject(project);
System.out.println("Created new project '"+project.getName()+"' with project id "+projectId);
List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
DataObjectType input = new DataObjectType();
input.setKey("echo_input");
input.setType(DataType.STRING);
input.setValue("echo_output=Hello World");
exInputs.add(input);
List<DataObjectType> exOut = new ArrayList<DataObjectType>();
DataObjectType output = new DataObjectType();
output.setKey("echo_output");
output.setType(DataType.STDOUT);
output.setValue("");
exOut.add(output);
Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment(projectId, user, "echoExperiment", "SimpleEcho0", "SimpleEcho0", exInputs);
simpleExperiment.setExperimentOutputs(exOut);
ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("localhost", 1, 1, 1, "normal", 0, 0, 1, "sds128");
scheduling.setResourceHostId("localhost");
UserConfigurationData userConfigurationData = new UserConfigurationData();
userConfigurationData.setAiravataAutoSchedule(false);
userConfigurationData.setOverrideManualScheduledParams(false);
userConfigurationData.setComputationalResourceScheduling(scheduling);
simpleExperiment.setUserConfigurationData(userConfigurationData);
final String expId = client.createExperiment(simpleExperiment);
System.out.println("Experiment Id returned : " + expId);
client.launchExperiment(expId,"testToken");
System.out.println("Launched successfully");
}