final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
builder.newFragment("inputs");
new ODEClient();
for (int i = 0; i < inputNodes.size(); i++) {
InputNode inputNode = inputNodes.get(i);
XBayaTextField parameterTextField = this.parameterTextFields.get(i);
inputNode.getID();
String value = parameterTextField.getText();
inputNode.setDefaultValue(value);
}
final String workflowInterpreterUrl = this.workflowInterpreterTextField.getText();
if (null != workflowInterpreterUrl && !"".equals(workflowInterpreterUrl)) {
try {
this.engine.getConfiguration().setWorkflowInterpreterURL(new URI(workflowInterpreterUrl));
} catch (URISyntaxException e) {
this.engine.getGUI().getErrorWindow().error(e);
}
}
final String gFacUrl = this.gfacTextField.getText();
if (null != gFacUrl && !"".equals(gFacUrl)) {
try {
this.engine.getConfiguration().setGFacURL(new URI(gFacUrl));
} catch (URISyntaxException e) {
this.engine.getGUI().getErrorWindow().error(e);
}
}
this.engine.getConfiguration().setTopic(topic);
new Thread() {
@Override
public void run() {
try {
List<WorkflowInput> workflowInputs=new ArrayList<WorkflowInput>();
for (int i = 0; i < inputNodes.size(); i++) {
InputNode inputNode = inputNodes.get(i);
workflowInputs.add(new WorkflowInput(inputNode.getID(), inputNode.getDefaultValue().toString()));
}
AiravataAPI api = engine.getConfiguration().getAiravataAPI();
ExperimentAdvanceOptions options = api.getExecutionManager().createExperimentAdvanceOptions(instanceNameFinal, api.getCurrentUser(), null);
String experimentId = api.getExecutionManager().runExperiment(api.getWorkflowManager().getWorkflowAsString(workflow), workflowInputs,options);