ProcessHandler.linkConnections(dynamicNode, connections);
ProcessHandler.linkBoundaryEvents(dynamicNode);
}
public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) {
DynamicNode dynamicNode = (DynamicNode) node;
writeNode("adHocSubProcess", dynamicNode, xmlDump, metaDataType);
if (!dynamicNode.isCancelRemainingInstances()) {
xmlDump.append(" cancelRemainingInstances=\"false\"");
}
xmlDump.append(" ordering=\"Parallel\" >" + EOL);
// nodes
List<Node> subNodes = getSubNodes(dynamicNode);
xmlDump.append(" <!-- nodes -->" + EOL);
for (Node subNode: subNodes) {
XmlBPMNProcessDumper.INSTANCE.visitNode(subNode, xmlDump, metaDataType);
}
// connections
List<Connection> connections = getSubConnections(dynamicNode);
xmlDump.append(" <!-- connections -->" + EOL);
for (Connection connection: connections) {
XmlBPMNProcessDumper.INSTANCE.visitConnection(connection, xmlDump, metaDataType);
}
if (dynamicNode.isAutoComplete()) {
xmlDump.append(" <completionCondition xsi:type=\"tFormalExpression\">getActivityInstanceAttribute(\"numberOfActiveInstances\") == 0</completionCondition>" + EOL);
}
endNode("adHocSubProcess", xmlDump);
}