}
protected void visitInterfaces(Node[] nodes, StringBuilder xmlDump) {
for (Node node: nodes) {
if (node instanceof WorkItemNode) {
Work work = ((WorkItemNode) node).getWork();
if (work != null) {
if ("Service Task".equals(work.getName())) {
String interfaceName = (String) work.getParameter("Interface");
if (interfaceName == null) {
interfaceName = "";
}
String operationName = (String) work.getParameter("Operation");
if (operationName == null) {
operationName = "";
}
String parameterType = (String) work.getParameter("ParameterType");
if (parameterType == null) {
parameterType = "";
}
xmlDump.append(
" <itemDefinition id=\"" + getUniqueNodeId(node) + "_InMessageType\" structureRef=\"" + parameterType + "\"/>" + EOL +
" <message id=\"" + getUniqueNodeId(node) + "_InMessage\" itemRef=\"" + getUniqueNodeId(node) + "_InMessageType\" />" + EOL +
" <interface id=\"" + getUniqueNodeId(node) + "_ServiceInterface\" name=\"" + interfaceName + "\">" + EOL +
" <operation id=\"" + getUniqueNodeId(node) + "_ServiceOperation\" name=\"" + operationName + "\">" + EOL +
" <inMessageRef>" + getUniqueNodeId(node) + "_InMessage</inMessageRef>" + EOL +
" </operation>" + EOL +
" </interface>" + EOL + EOL);
} else if ("Send Task".equals(work.getName())) {
String messageType = (String) work.getParameter("MessageType");
if (messageType == null) {
messageType = "";
}
xmlDump.append(
" <itemDefinition id=\"" + getUniqueNodeId(node) + "_MessageType\" structureRef=\"" + XmlDumper.replaceIllegalChars(messageType) + "\"/>" + EOL +
" <message id=\"" + getUniqueNodeId(node) + "_Message\" itemRef=\"" + getUniqueNodeId(node) + "_MessageType\" />" + EOL + EOL);
} else if ("Receive Task".equals(work.getName())) {
String messageId = (String) work.getParameter("MessageId");
String messageType = (String) work.getParameter("MessageType");
if (messageType == null) {
messageType = "";
}
xmlDump.append(
" <itemDefinition id=\"" + getUniqueNodeId(node) + "_MessageType\" structureRef=\"" + XmlDumper.replaceIllegalChars(messageType) + "\"/>" + EOL +