try {
WorkflowInterpretorStub stub = new WorkflowInterpretorStub(engine.getConfiguration()
.getWorkflowInterpreterURL().toString());
NameValue[] configurations = new NameValue[6];
configurations[0] = new NameValue();
configurations[0].setName(HeaderConstants.HEADER_ELEMENT_GFAC);
configurations[0].setValue(engine.getConfiguration().getGFacURL().toString());
configurations[1] = new NameValue();
configurations[1].setName(HeaderConstants.HEADER_ELEMENT_REGISTRY);
if (null == engine.getConfiguration().getRegistryURL()) {
configurations[1].setValue(XBayaConstants.REGISTRY_URL.toString());
} else {
configurations[1].setValue(engine.getConfiguration().getRegistryURL().toString());
}
configurations[2] = new NameValue();
configurations[2].setName(HeaderConstants.HEADER_ELEMENT_PROXYSERVER);
configurations[2].setValue(engine.getConfiguration().getMyProxyServer());
configurations[3] = new NameValue();
configurations[3].setName(HeaderConstants.HEADER_ELEMENT_BROKER);
configurations[3].setValue(engine.getConfiguration().getBrokerURL().toString());
configurations[4] = new NameValue();
configurations[4].setName(HeaderConstants.HEADER_ELEMENT_MSGBOX);
configurations[4].setValue(engine.getConfiguration().getMessageBoxURL().toString());
configurations[5] = new NameValue();
configurations[5].setName(HeaderConstants.HEADER_ELEMENT_DSC);
configurations[5].setValue(engine.getConfiguration().getDSCURL().toString());
NameValue[] inputNameVals = new NameValue[inputNodes.size()];
for (int i = 0; i < inputNodes.size(); i++) {
inputNameVals[i] = new NameValue();
InputNode inputNode = inputNodes.get(i);
String id = inputNode.getID();
String value = inputNode.getDefaultValue().toString();
inputNameVals[i].setName(id);
inputNameVals[i].setValue(value);