}
}
log.debug("Input all set");
XBayaConfiguration conf = null;
try {
conf = getConfiguration(configurations);
conf.setTopic(topic);
conf.setRunWithCrossProduct(true);
} catch (URISyntaxException e1) {
throw new WorkflowRuntimeException(e1);
}
WorkflowInterpretorEventListener listener = null;
WorkflowInterpreter interpreter = null;
AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(gatewayId, username);
WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow,topic,conf.getMessageBoxURL(), conf.getBrokerURL(), airavataAPI, conf, null, null);
workflowInterpreterConfiguration.setGfacEmbeddedMode(gfacEmbeddedMode);
workflowInterpreterConfiguration.setActOnProvenance(provenance);
if (builder.getSecurityContext().getAmazonWebservices() != null) {
workflowInterpreterConfiguration.setAwsSecretKey(builder.getSecurityContext().getAmazonWebservices().getSecretAccessKey());
workflowInterpreterConfiguration.setAwsAccessKey(builder.getSecurityContext().getAmazonWebservices().getAccessKeyId());
}
// WorkflowInterpreter object should create prior creation of Listener, because listener needs the threadlocal variable
interpreter = new WorkflowInterpreter(workflowInterpreterConfiguration, new SSWorkflowInterpreterInteractorImpl());
listener = new WorkflowInterpretorEventListener(workflow, conf);
try {
log.debug("start listener set");
listener.start();
} catch (MonitorException e1) {
e1.printStackTrace();
}
WorkflowContextHeaderBuilder.setCurrentContextHeader(builder.getContextHeader());
final WorkflowInterpretorEventListener finalListener = listener;
conf.setAiravataAPI(getAiravataAPI());
final WorkflowInterpreter finalInterpreter = interpreter;
// interpreter.setActOnProvenance(provenance);
interpreter.setProvenanceWriter(runner);
final String experimentId = topic;