// Use topic as a base of workflow instance ID so that the monitor can
// find it.
URI workfowInstanceID = URI.create(StringUtil.convertToJavaIdentifier(topic));
this.workflow.setGPELInstanceID(workfowInstanceID);
MonitorConfiguration notifConfig = this.engine.getMonitor().getConfiguration();
notifConfig.setTopic(topic);
arguments.add("-" + JythonScript.TOPIC_VARIABLE);
arguments.add(topic);
// TODO error check for user inputs
List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
for (int i = 0; i < inputNodes.size(); i++) {
InputNode inputNode = inputNodes.get(i);
XBayaTextField parameterTextField = this.parameterTextFields.get(i);
String id = inputNode.getID();
String value = parameterTextField.getText();
arguments.add("-" + id);
arguments.add(value);
}
XBayaConfiguration config = this.engine.getConfiguration();
String gfacString = this.gfacTextField.getText();
if (gfacString.length() != 0) {
try {
URI uri = new URI(gfacString).parseServerAuthority();
config.setGFacURL(uri);
} catch (URISyntaxException e) {
this.engine.getErrorWindow().error(ErrorMessages.GFAC_URL_WRONG, e);
return;
}
arguments.add("-" + JythonScript.GFAC_VARIABLE);
arguments.add(gfacString);
}
arguments.add("-" + JythonScript.BROKER_URL_VARIABLE);
arguments.add(notifConfig.getBrokerURL().toString());
if (notifConfig.isPullMode()) {
arguments.add("-" + JythonScript.MESSAGE_BOX_URL_VARIABLE);
arguments.add(notifConfig.getMessageBoxURL().toString());
}
try {
for (WSNode node : GraphUtil.getWSNodes(this.workflow.getGraph())) {
WSComponent component = node.getComponent();