}
}
if (inputs!=null) {
try {
this.registry.updateWorkflowNodeInput(new WorkflowInstanceNode(new WorkflowInstance(experimentId,experimentId),node.getID()),xsul5.XmlConstants.BUILDER.serializeToString(inputs));
} catch (RegistryException e) {
throw new WorkflowException(e);
}
// deal with the outputs
}
XmlElement outputs = elem.newElement("outputs");
elem.addChild(outputs);
List<DataPort> outputPorts = node.getOutputPorts();
for (DataPort outputPort : outputPorts) {
String outputName = outputPort.getName();
XmlElement outputParamElement = outputs.newElement(outputName);
outputs.addChild(outputParamElement);
Object ouputParamValue = invokerMap.get(node).getOutput(
outputName);
if (ouputParamValue instanceof org.xmlpull.v1.builder.XmlElement) {
ouputParamValue = XMLUtil
.xmlElement3ToXmlElement5((org.xmlpull.v1.builder.XmlElement) ouputParamValue);
}
if (ouputParamValue != null) {
outputParamElement.addChild(ouputParamValue);
} else {
outputParamElement.addChild("null");
}
}
try {
this.registry.updateWorkflowNodeOutput(new WorkflowInstanceNode(new WorkflowInstance(experimentId,experimentId),node.getID()),xsul5.XmlConstants.BUILDER.serializeToString(outputs));
} catch (RegistryException e) {
throw new WorkflowException(e);
}
}
}