}
}
if (inputs!=null) {
try {
this.airavataAPI.getProvenanceManager().setWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, experimentId), node.getID()), xsul5.XmlConstants.BUILDER.serializeToString(inputs));
} catch (AiravataAPIInvocationException 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.airavataAPI.getProvenanceManager().setWorkflowInstanceNodeOutput(new WorkflowInstanceNode(new WorkflowExecution(experimentId,experimentId),node.getID()),xsul5.XmlConstants.BUILDER.serializeToString(outputs));
} catch (AiravataAPIInvocationException e) {
throw new WorkflowException(e);
}
}
}