for (Swimlane swimlane : swimlanes) {
Element swimlaneElement = writeElement(document, root, swimlane);
writeDelegation(document, swimlaneElement, swimlane);
}
StartState startState = definition.getFirstChild(StartState.class);
if (startState != null) {
Element startStateElement = writeElement(document, root, startState);
setAttribute(startStateElement, SWIMLANE_NODE, startState.getSwimlaneName());
writeTransitions(document, startStateElement, startState);
}
List<Subprocess> subprocesses = definition.getChildren(Subprocess.class);
for (org.jbpm.ui.common.model.Node node : subprocesses) {